public class NodeFigure extends TextFigure
editable, origin, textLayoutchangingDepth, listenerListpropertySupportCONNECTABLE_PROPERTY, REMOVABLE_PROPERTY, SELECTABLE_PROPERTY, TRANSFORMABLE_PROPERTY| Constructor and Description |
|---|
NodeFigure()
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
NodeFigure |
clone()
Returns a clone of the figure, with clones of all aggregated figures,
such as children and decorators.
|
java.util.Collection<Handle> |
createHandles(int detailLevel)
Creates handles used to manipulate the figure.
|
Connector |
findCompatibleConnector(Connector c,
boolean isStart)
Gets a compatible connector.
|
Connector |
findConnector(java.awt.geom.Point2D.Double p,
ConnectionFigure figure)
Returns the Figures connector for the specified location.
|
java.util.Collection<Connector> |
getConnectors(ConnectionFigure prototype)
Returns all connectors of this Figure for the specified prototype of
a ConnectionFigure.
|
java.awt.geom.Rectangle2D.Double |
getFigureDrawingArea()
Gets the drawing area without taking the decorator into account.
|
int |
getLayer()
AbstractFigure always returns 0.
|
protected void |
readDecorator(DOMInput in) |
<T> void |
set(AttributeKey<T> key,
T newValue)
Sets an attribute of the figure.
|
protected void |
writeDecorator(DOMOutput out) |
drawFill, drawStroke, drawText, figureContains, getBaseline, getBounds, getFillColor, getFont, getFontSize, getInsets, getLabelFor, getPreferredSize, getTabSize, getText, getTextColor, getTextColumns, getTextLayout, getTool, getTransformRestoreData, invalidate, isEditable, isTextOverflow, read, restoreTransformTo, setBounds, setEditable, setFontSize, setText, transform, validate, writecontains, draw, drawDecorator, drawFigure, getDecorator, getDrawingArea, setDecorator, updateDecoratorBoundsapplyAttributesTo, get, getAttributeKey, getAttributes, getAttributesRestoreData, getStroke, getStrokeMiterLimitFactor, hasAttribute, isAttributeEnabled, readAttributes, removeAttribute, restoreAttributesTo, setAttributeEnabled, setAttributes, writeAttributesaddFigureListener, addNotify, changed, findFigureInside, fireAreaInvalidated, fireAreaInvalidated, fireAreaInvalidated, fireAttributeChanged, fireFigureAdded, fireFigureChanged, fireFigureChanged, fireFigureChanged, fireFigureHandlesChanged, fireFigureRemoved, fireFigureRequestRemove, fireUndoableEditHappened, getActions, getChangingDepth, getCursor, getDecomposition, getDrawing, getEndPoint, getFontRenderContext, getLock, getStartPoint, getToolTipText, handleDrop, handleMouseClick, includes, isChanging, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, removeNotify, requestRemove, setBounds, setConnectable, setRemovable, setSelectable, setTransformable, setVisible, toString, willChangeaddPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddFigureListener, addNotify, addPropertyChangeListener, changed, contains, draw, findFigureInside, get, getActions, getAttributes, getAttributesRestoreData, getCursor, getDecomposition, getDrawingArea, getEndPoint, getStartPoint, getToolTipText, handleDrop, handleMouseClick, includes, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, removeNotify, removePropertyChangeListener, requestRemove, restoreAttributesTo, willChangepublic java.util.Collection<Connector> getConnectors(ConnectionFigure prototype)
FigureThis is used by connection tools and connection handles to visualize the connectors when the user is about to create a ConnectionFigure to this Figure.
getConnectors in interface FiguregetConnectors in class AbstractFigureprototype - The prototype used to create a connection or null if
unknown. This allows for specific connectors for different
connection figures.public java.util.Collection<Handle> createHandles(int detailLevel)
FigurecreateHandles in interface FigurecreateHandles in class TextFiguredetailLevel - The detail level of the handles. Usually this is 0 for
bounding box handles and 1 for point handles. The value -1 is used
by the SelectAreaTracker and the HandleTracker to highlight figures, over which the mouse
pointer is hovering.Handlepublic java.awt.geom.Rectangle2D.Double getFigureDrawingArea()
TextFiguregetFigureDrawingArea in class TextFigurepublic Connector findConnector(java.awt.geom.Point2D.Double p, ConnectionFigure figure)
AbstractFigurefindConnector in interface FigurefindConnector in class AbstractFigurep - the location of the connector.figure - The prototype used to create a connection or null if
unknown. This allows for specific connectors for different
connection figures.ChopRectangleConnectorpublic Connector findCompatibleConnector(Connector c, boolean isStart)
FigurefindCompatibleConnector in interface FigurefindCompatibleConnector in class AbstractFigurepublic NodeFigure clone()
Figureclone in interface Figureclone in class TextFigurepublic int getLayer()
AbstractFiguregetLayer in interface FiguregetLayer in class AbstractFigureprotected void writeDecorator(DOMOutput out) throws java.io.IOException
writeDecorator in class AbstractAttributedDecoratedFigurejava.io.IOExceptionprotected void readDecorator(DOMInput in) throws java.io.IOException
readDecorator in class AbstractAttributedDecoratedFigurejava.io.IOExceptionpublic <T> void set(AttributeKey<T> key, T newValue)
AbstractAttributedFigureset in interface Figureset in class AbstractAttributedFigureAttributeKey.set(org.jhotdraw.draw.Figure, T)