|
JHotDraw 7.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jhotdraw.beans.AbstractBean org.jhotdraw.draw.AbstractFigure org.jhotdraw.draw.AbstractAttributedFigure org.jhotdraw.draw.AbstractAttributedDecoratedFigure org.jhotdraw.draw.TextFigure org.jhotdraw.samples.net.figures.NodeFigure
public class NodeFigure
NodeFigure.
Field Summary |
---|
Fields inherited from class org.jhotdraw.draw.TextFigure |
---|
editable, origin, textLayout |
Fields inherited from class org.jhotdraw.draw.AbstractFigure |
---|
changingDepth, listenerList |
Fields inherited from class org.jhotdraw.beans.AbstractBean |
---|
propertySupport |
Constructor Summary | |
---|---|
NodeFigure()
Creates a new instance. |
Method Summary | ||
---|---|---|
NodeFigure |
clone()
Returns a clone of the figure, with clones of all aggregated figures, such as chilrend 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()
Gets the layer number of the figure. |
|
protected void |
readDecorator(DOMInput in)
|
|
|
setAttribute(AttributeKey<T> key,
T newValue)
Sets an attribute of the figure. |
|
protected void |
writeDecorator(DOMOutput out)
|
Methods inherited from class org.jhotdraw.draw.TextFigure |
---|
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 |
Methods inherited from class org.jhotdraw.draw.AbstractAttributedDecoratedFigure |
---|
contains, draw, drawDecorator, drawFigure, getDecorator, getDrawingArea, setDecorator, updateDecoratorBounds |
Methods inherited from class org.jhotdraw.draw.AbstractAttributedFigure |
---|
applyAttributesTo, getAttribute, getAttributeKey, getAttributes, getAttributesRestoreData, getStroke, getStrokeMiterLimitFactor, hasAttribute, isAttributeEnabled, readAttributes, removeAttribute, restoreAttributesTo, setAttributeEnabled, setAttributes, writeAttributes |
Methods inherited from class org.jhotdraw.beans.AbstractBean |
---|
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jhotdraw.draw.Figure |
---|
addFigureListener, addNotify, canConnect, changed, contains, draw, findFigureInside, getActions, getAttribute, getAttributes, getAttributesRestoreData, getCursor, getDecomposition, getDrawingArea, getEndPoint, getStartPoint, getToolTipText, handleDrop, handleMouseClick, includes, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, removeNotify, requestRemove, restoreAttributesTo, willChange |
Constructor Detail |
---|
public NodeFigure()
Method Detail |
---|
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()
Figure
FigureListener.figureChanged
event to
its figure listeners.
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 setAttribute(AttributeKey<T> key, T newValue)
AbstractAttributedFigure
setAttribute
in interface Figure
setAttribute
in class AbstractAttributedFigure
AttributeKey.set(org.jhotdraw.draw.Figure, T)
|
Copyright 1996-2009 (c) by the authors and contributors of the JHotDraw project. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |