net.sf.sdedit.drawable
Class SequenceElement

java.lang.Object
  extended by net.sf.sdedit.drawable.Drawable
      extended by net.sf.sdedit.drawable.SequenceElement
All Implemented Interfaces:
Constants
Direct Known Subclasses:
Arrow, Note

public abstract class SequenceElement
extends Drawable
implements Constants


Field Summary
protected  Configuration configuration
           
protected  Diagram diagram
           
 
Fields inherited from interface net.sf.sdedit.Constants
ACTIVE_LIFELINE_COLOR, ANTI_ALIAS, dashed, DEFAULT_CODE_FONT, DEFAULT_CURSOR, DEFAULT_ENCODING_SCHEME, dotted, emptyStroke, GLOBAL_CONF_FILE, HAND_CURSOR, MOVE_CURSOR, SAVE_AS_FILE_PROPERTY, SAVE_AS_TYPE_PROPERTY, solid, TEST_FREEHEP_CLASSNAME, thick, thick_dashed, THREAD_COLORS
 
Constructor Summary
protected SequenceElement(Diagram diagram, Lifeline boundary0, Lifeline boundary1, String[] label, Direction align, int y)
           
 
Method Summary
protected  Configuration configuration()
           
protected  Diagram diagram()
           
protected  void drawMultilineString(Graphics2D g, int x, int y, boolean bottomOrTop, Color background)
           
 Direction getAlign()
          Returns Direction.RIGHT, if the sequence element is arranged to the right of its anchor, otherwise Direction.LEFT.
 ExtensibleDrawable getLeftEndpoint()
           
 ExtensibleDrawable getLeftLimit()
           
 ExtensibleDrawable getRightEndpoint()
           
 ExtensibleDrawable getRightLimit()
           
 int getSpace()
           
protected  int leftPadding()
           
protected  int rightPadding()
           
protected  void setLeftEndpoint(ExtensibleDrawable leftEndpoint)
           
 void setLeftLimit(ExtensibleDrawable leftLimit)
           
protected  void setRightEndpoint(ExtensibleDrawable rightEndpoint)
           
 void setRightLimit(ExtensibleDrawable rightLimit)
           
protected  int textHeight()
           
protected  int textWidth()
           
 
Methods inherited from class net.sf.sdedit.drawable.Drawable
computeLayoutInformation, contains, draw, drawMultilineString, getBottom, getHeight, getLeft, getRight, getTop, getWidth, intersects, isVisible, setBottom, setHeight, setLeft, setRight, setTop, setVisible, setWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

diagram

protected final Diagram diagram

configuration

protected final Configuration configuration
Constructor Detail

SequenceElement

protected SequenceElement(Diagram diagram,
                          Lifeline boundary0,
                          Lifeline boundary1,
                          String[] label,
                          Direction align,
                          int y)
Method Detail

diagram

protected final Diagram diagram()

rightPadding

protected final int rightPadding()

leftPadding

protected final int leftPadding()

configuration

protected final Configuration configuration()

getAlign

public final Direction getAlign()
Returns Direction.RIGHT, if the sequence element is arranged to the right of its anchor, otherwise Direction.LEFT. For arrows the anchor is the caller lifeline, for notes it is the lifeline to which the note is attached.

Returns:
Direction.RIGHT, if the sequence element is arranged to the right of its anchor, otherwise Direction.LEFT

getSpace

public int getSpace()

getLeftEndpoint

public ExtensibleDrawable getLeftEndpoint()

getRightEndpoint

public ExtensibleDrawable getRightEndpoint()

setLeftEndpoint

protected void setLeftEndpoint(ExtensibleDrawable leftEndpoint)

setRightEndpoint

protected void setRightEndpoint(ExtensibleDrawable rightEndpoint)

textWidth

protected int textWidth()

textHeight

protected int textHeight()

drawMultilineString

protected void drawMultilineString(Graphics2D g,
                                   int x,
                                   int y,
                                   boolean bottomOrTop,
                                   Color background)

getLeftLimit

public final ExtensibleDrawable getLeftLimit()

setLeftLimit

public final void setLeftLimit(ExtensibleDrawable leftLimit)

getRightLimit

public final ExtensibleDrawable getRightLimit()

setRightLimit

public final void setRightLimit(ExtensibleDrawable rightLimit)


Copyright © 2011. All Rights Reserved.