CH.ifa.draw.samples.net
Class NodeFigure
java.lang.Object
CH.ifa.draw.standard.AbstractFigure
CH.ifa.draw.figures.AttributeFigure
CH.ifa.draw.figures.TextFigure
CH.ifa.draw.samples.net.NodeFigure
- All Implemented Interfaces:
- Figure, FigureChangeListener, TextHolder, Storable, java.io.Serializable, java.lang.Cloneable, java.util.EventListener
public class NodeFigure
- extends TextFigure
- See Also:
- Serialized Form
Method Summary |
Connector |
connectorAt(int x,
int y)
Returns the Figures connector for the specified location. |
void |
connectorVisibility(boolean isVisible)
Sets whether the connectors should be visible. |
boolean |
containsPoint(int x,
int y)
Checks if a point is inside the figure. |
java.awt.Rectangle |
displayBox()
Gets the display box of a figure. |
void |
draw(java.awt.Graphics g)
Draws the figure in the given graphics. |
java.util.Vector |
handles()
Returns the handles of a Figure that can be used
to manipulate some of its attributes. |
Methods inherited from class CH.ifa.draw.figures.TextFigure |
acceptsTyping, basicDisplayBox, basicMoveBy, changed, connect, createCurrentFont, disconnect, drawBackground, drawFrame, figureChanged, figureInvalidated, figureRemoved, figureRequestRemove, figureRequestUpdate, getAttribute, getFont, getText, moveBy, overlayColumns, read, readOnly, release, setAttribute, setCurrentFontName, setCurrentFontSize, setCurrentFontStyle, setFont, setReadOnly, setText, textDisplayBox, updateLocation, write |
Methods inherited from class CH.ifa.draw.standard.AbstractFigure |
addFigureChangeListener, addToContainer, canConnect, center, clone, connectedTextLocator, connectionInsets, decompose, displayBox, displayBox, figures, findFigureInside, includes, invalidate, isEmpty, listener, removeFigureChangeListener, removeFromContainer, size, willChange |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeFigure
public NodeFigure()
displayBox
public java.awt.Rectangle displayBox()
- Description copied from class:
AbstractFigure
- Gets the display box of a figure.
- Specified by:
displayBox
in interface Figure
- Overrides:
displayBox
in class TextFigure
- See Also:
Figure.basicDisplayBox(java.awt.Point, java.awt.Point)
containsPoint
public boolean containsPoint(int x,
int y)
- Description copied from class:
AbstractFigure
- Checks if a point is inside the figure.
- Specified by:
containsPoint
in interface Figure
- Overrides:
containsPoint
in class AbstractFigure
draw
public void draw(java.awt.Graphics g)
- Description copied from class:
AttributeFigure
- Draws the figure in the given graphics. Draw is a template
method calling drawBackground followed by drawFrame.
- Specified by:
draw
in interface Figure
- Overrides:
draw
in class AttributeFigure
- Parameters:
g
- the Graphics to draw into
handles
public java.util.Vector handles()
- Description copied from class:
AbstractFigure
- Returns the handles of a Figure that can be used
to manipulate some of its attributes.
- Specified by:
handles
in interface Figure
- Overrides:
handles
in class TextFigure
- Returns:
- a Vector of handles
- See Also:
Handle
connectorVisibility
public void connectorVisibility(boolean isVisible)
- Description copied from class:
AbstractFigure
- Sets whether the connectors should be visible.
By default they are not visible and
- Specified by:
connectorVisibility
in interface Figure
- Overrides:
connectorVisibility
in class AbstractFigure
connectorAt
public Connector connectorAt(int x,
int y)
- Description copied from class:
AbstractFigure
- Returns the Figures connector for the specified location.
By default a ChopBoxConnector is returned.
- Specified by:
connectorAt
in interface Figure
- Overrides:
connectorAt
in class AbstractFigure
- See Also:
ChopBoxConnector