public class NodeFigure extends TextFigure
editable, origin, textLayout
changingDepth, listenerList
propertySupport
CONNECTABLE_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, write
contains, draw, drawDecorator, drawFigure, getDecorator, getDrawingArea, setDecorator, updateDecoratorBounds
applyAttributesTo, get, getAttributeKey, getAttributes, getAttributesRestoreData, getStroke, getStrokeMiterLimitFactor, hasAttribute, isAttributeEnabled, readAttributes, removeAttribute, restoreAttributesTo, setAttributeEnabled, setAttributes, writeAttributes
addFigureListener, 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, willChange
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addFigureListener, 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, willChange
public java.util.Collection<Connector> getConnectors(ConnectionFigure prototype)
Figure
This 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 Figure
getConnectors
in class AbstractFigure
prototype
- 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)
Figure
createHandles
in interface Figure
createHandles
in class TextFigure
detailLevel
- 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.Handle
public java.awt.geom.Rectangle2D.Double getFigureDrawingArea()
TextFigure
getFigureDrawingArea
in class TextFigure
public Connector findConnector(java.awt.geom.Point2D.Double p, ConnectionFigure figure)
AbstractFigure
findConnector
in interface Figure
findConnector
in class AbstractFigure
p
- 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.ChopRectangleConnector
public Connector findCompatibleConnector(Connector c, boolean isStart)
Figure
findCompatibleConnector
in interface Figure
findCompatibleConnector
in class AbstractFigure
public NodeFigure clone()
Figure
clone
in interface Figure
clone
in class TextFigure
public int getLayer()
AbstractFigure
getLayer
in interface Figure
getLayer
in class AbstractFigure
protected void writeDecorator(DOMOutput out) throws java.io.IOException
writeDecorator
in class AbstractAttributedDecoratedFigure
java.io.IOException
protected void readDecorator(DOMInput in) throws java.io.IOException
readDecorator
in class AbstractAttributedDecoratedFigure
java.io.IOException
public <T> void set(AttributeKey<T> key, T newValue)
AbstractAttributedFigure
set
in interface Figure
set
in class AbstractAttributedFigure
AttributeKey.set(org.jhotdraw.draw.Figure, T)