org.objectweb.jac.ide.diagrams
Class AttachedTextFigure

java.lang.Object
  |
  +--CH.ifa.draw.standard.AbstractFigure
        |
        +--CH.ifa.draw.figures.AttributeFigure
              |
              +--org.objectweb.jac.ide.diagrams.TextFigure
                    |
                    +--org.objectweb.jac.ide.diagrams.AttachedTextFigure
All Implemented Interfaces:
Cloneable, EventListener, CH.ifa.draw.framework.Figure, CH.ifa.draw.framework.FigureChangeListener, ModelElementFigure, Serializable, CH.ifa.draw.standard.TextHolder

public class AttachedTextFigure
extends TextFigure
implements ModelElementFigure

Text attached to relations (relation name, cardinalities and role names)

See Also:
Serialized Form

Field Summary
static int END_CARDINALITY
           
static int END_ROLE
           
static int NAME
           
static int START_CARDINALITY
           
static int START_ROLE
           
 
Fields inherited from class org.objectweb.jac.ide.diagrams.TextFigure
fOriginX, fOriginY
 
Fields inherited from interface CH.ifa.draw.framework.Figure
POPUP_MENU
 
Constructor Summary
AttachedTextFigure()
           
AttachedTextFigure(LinkFigure linkFig, int type)
           
 
Method Summary
protected  void basicMoveBy(int dx, int dy)
           
 void close()
          Unregister from update events
 void connect(CH.ifa.draw.framework.Figure f)
           
static AttachedTextFigure createEndCardinality(LinkFigure lf)
           
static AttachedTextFigure createEndRole(LinkFigure lf)
           
static AttachedTextFigure createName(LinkFigure lf)
           
static AttachedTextFigure createStartCardinality(LinkFigure lf)
           
static AttachedTextFigure createStartRole(LinkFigure lf)
           
 LinkFigure getConnectedLink()
          Get the value of connectedLink.
 ModelElement getSubstance()
          Returns the model element associated with this figure.
 int getType()
          Get the value of type.
 void refresh()
           
 void setConnectedLink(LinkFigure v)
          Set the value of connectedLink.
 void setText(String s)
          Sets the text shown by the text figure.
 void setType(int v)
          Set the value of type.
 
Methods inherited from class org.objectweb.jac.ide.diagrams.TextFigure
acceptsTyping, basicDisplayBox, changed, createCurrentFont, disconnect, displayBox, drawBackground, drawFrame, figureChanged, figureInvalidated, figureRemoved, figureRequestRemove, figureRequestUpdate, getAttribute, getFont, getText, getTextColor, handles, moveBy, overlayColumns, readOnly, release, setAttribute, setCurrentFontName, setCurrentFontSize, setCurrentFontStyle, setFont, setReadOnly, textDisplayBox, updateLocation
 
Methods inherited from class CH.ifa.draw.figures.AttributeFigure
draw, getDefaultAttribute, getFillColor, getFrameColor
 
Methods inherited from class CH.ifa.draw.standard.AbstractFigure
addFigureChangeListener, addToContainer, canConnect, center, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, figures, findFigureInside, getZValue, includes, invalidate, isEmpty, listener, removeFigureChangeListener, removeFromContainer, setZValue, size, willChange
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface CH.ifa.draw.framework.Figure
addFigureChangeListener, addToContainer, basicDisplayBox, canConnect, center, changed, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, displayBox, draw, figures, findFigureInside, getAttribute, getZValue, handles, includes, invalidate, isEmpty, listener, moveBy, release, removeFigureChangeListener, removeFromContainer, setAttribute, setZValue, size, willChange
 

Field Detail

NAME

public static final int NAME
See Also:
Constant Field Values

START_CARDINALITY

public static final int START_CARDINALITY
See Also:
Constant Field Values

END_CARDINALITY

public static final int END_CARDINALITY
See Also:
Constant Field Values

START_ROLE

public static final int START_ROLE
See Also:
Constant Field Values

END_ROLE

public static final int END_ROLE
See Also:
Constant Field Values
Constructor Detail

AttachedTextFigure

public AttachedTextFigure()

AttachedTextFigure

public AttachedTextFigure(LinkFigure linkFig,
                          int type)
Method Detail

close

public void close()
Description copied from interface: ModelElementFigure
Unregister from update events

Specified by:
close in interface ModelElementFigure

createName

public static AttachedTextFigure createName(LinkFigure lf)

createStartCardinality

public static AttachedTextFigure createStartCardinality(LinkFigure lf)

createEndCardinality

public static AttachedTextFigure createEndCardinality(LinkFigure lf)

createStartRole

public static AttachedTextFigure createStartRole(LinkFigure lf)

createEndRole

public static AttachedTextFigure createEndRole(LinkFigure lf)

getSubstance

public ModelElement getSubstance()
Description copied from interface: ModelElementFigure
Returns the model element associated with this figure.

Specified by:
getSubstance in interface ModelElementFigure

setText

public void setText(String s)
Description copied from class: TextFigure
Sets the text shown by the text figure.

Specified by:
setText in interface CH.ifa.draw.standard.TextHolder
Overrides:
setText in class TextFigure

refresh

public void refresh()

basicMoveBy

protected void basicMoveBy(int dx,
                           int dy)
Overrides:
basicMoveBy in class TextFigure

getType

public int getType()
Get the value of type.

Returns:
value of type.

setType

public void setType(int v)
Set the value of type.

Parameters:
v - Value to assign to type.

getConnectedLink

public LinkFigure getConnectedLink()
Get the value of connectedLink.

Returns:
value of connectedLink.

setConnectedLink

public void setConnectedLink(LinkFigure v)
Set the value of connectedLink.

Parameters:
v - Value to assign to connectedLink.

connect

public void connect(CH.ifa.draw.framework.Figure f)
Specified by:
connect in interface CH.ifa.draw.standard.TextHolder
Overrides:
connect in class TextFigure