public abstract class AbstractAttributedDecoratedFigure extends AbstractAttributedFigure implements DecoratedFigure, DOMStorable
DecoratedFigure
which has an attribute set.changingDepth, listenerList
propertySupport
CONNECTABLE_PROPERTY, REMOVABLE_PROPERTY, SELECTABLE_PROPERTY, TRANSFORMABLE_PROPERTY
Constructor and Description |
---|
AbstractAttributedDecoratedFigure() |
Modifier and Type | Method and Description |
---|---|
AbstractAttributedDecoratedFigure |
clone()
Returns a clone of the figure, with clones of all aggregated figures,
such as children and decorators.
|
boolean |
contains(java.awt.geom.Point2D.Double p)
Checks if a point is contained by the figure.
|
void |
draw(java.awt.Graphics2D g)
Draws the figure.
|
protected void |
drawDecorator(java.awt.Graphics2D g) |
protected void |
drawFigure(java.awt.Graphics2D g) |
protected abstract boolean |
figureContains(java.awt.geom.Point2D.Double p) |
Figure |
getDecorator()
Gets the decorator for this figure.
|
java.awt.geom.Rectangle2D.Double |
getDrawingArea()
Returns the drawing area of the figure as a Rectangle.
|
protected java.awt.geom.Rectangle2D.Double |
getFigureDrawingArea() |
void |
read(DOMInput in) |
protected void |
readDecorator(DOMInput in) |
void |
setDecorator(Figure newValue)
Sets a decorator Figure, for example a visual adornment to this Figure.
|
protected void |
updateDecoratorBounds() |
void |
write(DOMOutput out) |
protected void |
writeDecorator(DOMOutput out) |
applyAttributesTo, drawFill, drawStroke, drawText, get, getAttributeKey, getAttributes, getAttributesRestoreData, getStroke, getStrokeMiterLimitFactor, hasAttribute, isAttributeEnabled, readAttributes, removeAttribute, restoreAttributesTo, set, setAttributeEnabled, setAttributes, writeAttributes
addFigureListener, addNotify, changed, createHandles, findCompatibleConnector, findConnector, findFigureInside, fireAreaInvalidated, fireAreaInvalidated, fireAreaInvalidated, fireAttributeChanged, fireFigureAdded, fireFigureChanged, fireFigureChanged, fireFigureChanged, fireFigureHandlesChanged, fireFigureRemoved, fireFigureRequestRemove, fireUndoableEditHappened, getActions, getChangingDepth, getConnectors, getCursor, getDecomposition, getDrawing, getEndPoint, getFontRenderContext, getLayer, getLock, getPreferredSize, getStartPoint, getTool, getToolTipText, handleDrop, handleMouseClick, includes, invalidate, isChanging, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, removeNotify, requestRemove, setBounds, setBounds, setConnectable, setRemovable, setSelectable, setTransformable, setVisible, toString, validate, willChange
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addFigureListener, addNotify, addPropertyChangeListener, changed, createHandles, findCompatibleConnector, findConnector, findFigureInside, get, getActions, getAttributes, getAttributesRestoreData, getBounds, getConnectors, getCursor, getDecomposition, getEndPoint, getLayer, getPreferredSize, getStartPoint, getTool, getToolTipText, getTransformRestoreData, handleDrop, handleMouseClick, includes, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, removeNotify, removePropertyChangeListener, requestRemove, restoreAttributesTo, restoreTransformTo, set, setBounds, transform, willChange
public final void draw(java.awt.Graphics2D g)
Figure
draw
in interface Figure
draw
in class AbstractAttributedFigure
g
- The Graphics2D to draw to.protected void drawFigure(java.awt.Graphics2D g)
protected void drawDecorator(java.awt.Graphics2D g)
public final java.awt.geom.Rectangle2D.Double getDrawingArea()
Figure
The drawing area is used to inform DrawingView
about the
area that is needed to draw this figure.
The drawing area needs to be large enough, to take line width, line caps and other decorations into account that exceed the bounds of the Figure.
getDrawingArea
in interface Figure
getDrawingArea
in class AbstractAttributedFigure
protected java.awt.geom.Rectangle2D.Double getFigureDrawingArea()
public void setDecorator(Figure newValue)
DecoratedFigure
setDecorator
in interface DecoratedFigure
public Figure getDecorator()
DecoratedFigure
getDecorator
in interface DecoratedFigure
protected void updateDecoratorBounds()
public final boolean contains(java.awt.geom.Point2D.Double p)
Figure
This is used for hit testing by Tool's.
protected abstract boolean figureContains(java.awt.geom.Point2D.Double p)
public void read(DOMInput in) throws java.io.IOException
read
in interface DOMStorable
read
in class AbstractAttributedFigure
java.io.IOException
public void write(DOMOutput out) throws java.io.IOException
write
in interface DOMStorable
write
in class AbstractAttributedFigure
java.io.IOException
protected void writeDecorator(DOMOutput out) throws java.io.IOException
java.io.IOException
protected void readDecorator(DOMInput in) throws java.io.IOException
java.io.IOException
public AbstractAttributedDecoratedFigure clone()
Figure
clone
in interface Figure
clone
in class AbstractAttributedFigure