org.jhotdraw.draw
Class AbstractDrawing
- java.lang.Object
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, CompositeFigure, Drawing, Figure, DOMStorable
- Direct Known Subclasses:
- DefaultDrawing, QuadTreeDrawing
public abstract class AbstractDrawing extends AbstractAttributedCompositeFigure implements Drawing
This abstract class can be extended to implement aDrawing.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.jhotdraw.draw.CompositeFigure
LAYOUT_INSETS
-
Fields inherited from interface org.jhotdraw.draw.Figure
CONNECTABLE_PROPERTY, REMOVABLE_PROPERTY, SELECTABLE_PROPERTY, TRANSFORMABLE_PROPERTY
-
-
Constructor Summary
Constructors Constructor and Description AbstractDrawing()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddInputFormat(InputFormat format)Adds an input format to the drawing.voidaddOutputFormat(OutputFormat format)Adds an output format to the drawing.voidaddUndoableEditListener(javax.swing.event.UndoableEditListener l)Adds a listener for undooable edit events.AbstractDrawingclone()Returns a clone of the figure, with clones of all aggregated figures, such as children and decorators.voidfireUndoableEditHappened(javax.swing.undo.UndoableEdit edit)Notify all listenerList that have registered interest for notification on this event type.DrawinggetDrawing()java.awt.font.FontRenderContextgetFontRenderContext()Returns the font render context used to do text leyout and text drawing.java.util.List<InputFormat>getInputFormats()Gets input formats for the Drawing in order of preferred formats.java.lang.ObjectgetLock()The drawing view synchronizes on the lock when drawing a drawing.java.util.List<OutputFormat>getOutputFormats()Gets output formats for the Drawing in order of preferred formats.voidread(DOMInput in)voidremoveUndoableEditListener(javax.swing.event.UndoableEditListener l)Removes a listener for undoable edit events.voidsetFontRenderContext(java.awt.font.FontRenderContext frc)Sets the font render context used to do text leyout and text drawing.voidsetInputFormats(java.util.List<InputFormat> formats)Sets input formats for the Drawing in order of preferred formats.voidsetOutputFormats(java.util.List<OutputFormat> formats)Sets output formats for the Drawing in order of preferred formats.voidwrite(DOMOutput out)-
Methods inherited from class org.jhotdraw.draw.AbstractAttributedCompositeFigure
drawFigure, get, getAttributes, getAttributesRestoreData, getFigureDrawBounds, getStroke, getStrokeMiterLimitFactor, hasAttribute, isAttributeEnabled, removeAttribute, restoreAttributesTo, set, setAttributeEnabled, setAttributes
-
Methods inherited from class org.jhotdraw.draw.AbstractCompositeFigure
add, add, addAll, addAll, addCompositeFigureListener, addNotify, basicAdd, basicAdd, basicAddAll, basicRemove, basicRemoveAll, basicRemoveAllChildren, basicRemoveChild, bringToFront, changed, contains, contains, createHandles, draw, findChild, findChildIndex, findFigureInside, getBounds, getChild, getChildCount, getChildren, getChildrenFrontToBack, getDecomposition, getDrawingArea, getLayouter, getPreferredSize, getTransformRestoreData, indexOf, layout, remove, removeAll, removeAllChildren, removeChild, removeCompositeFigureListener, removeNotify, restoreTransformTo, sendToBack, setBounds, setLayouter, transform, willChange
-
Methods inherited from class org.jhotdraw.draw.AbstractFigure
addFigureListener, findCompatibleConnector, findConnector, fireAreaInvalidated, fireFigureChanged, getActions, getConnectors, getCursor, getEndPoint, getLayer, getStartPoint, getTool, getToolTipText, handleDrop, handleMouseClick, includes, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, remap, removeFigureListener, requestRemove, setBounds, setConnectable, setRemovable, setSelectable, setTransformable, setVisible, toString
-
Methods inherited from class org.jhotdraw.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jhotdraw.draw.Drawing
add, add, addAll, addAll, basicAdd, basicAdd, basicAddAll, basicRemove, basicRemoveAll, bringToFront, drawCanvas, findFigure, findFigureBehind, findFigureBehind, findFigureExcept, findFigureExcept, findFigureInside, findFigures, findFiguresWithin, getFiguresFrontToBack, remove, removeAll, sendToBack, sort
-
Methods inherited from interface org.jhotdraw.draw.CompositeFigure
addCompositeFigureListener, basicRemoveAllChildren, basicRemoveChild, contains, getChild, getChildCount, getChildren, getLayouter, indexOf, layout, removeAllChildren, removeChild, removeCompositeFigureListener, setLayouter
-
Methods inherited from interface org.jhotdraw.draw.Figure
addFigureListener, addNotify, addPropertyChangeListener, changed, contains, createHandles, draw, findCompatibleConnector, findConnector, get, getActions, getAttributes, getAttributesRestoreData, getBounds, getConnectors, getCursor, getDecomposition, getDrawingArea, 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
-
-
-
-
Method Detail
-
addUndoableEditListener
public void addUndoableEditListener(javax.swing.event.UndoableEditListener l)
Description copied from interface:DrawingAdds a listener for undooable edit events.- Specified by:
addUndoableEditListenerin interfaceDrawing
-
removeUndoableEditListener
public void removeUndoableEditListener(javax.swing.event.UndoableEditListener l)
Description copied from interface:DrawingRemoves a listener for undoable edit events.- Specified by:
removeUndoableEditListenerin interfaceDrawing
-
fireUndoableEditHappened
public void fireUndoableEditHappened(javax.swing.undo.UndoableEdit edit)
Notify all listenerList that have registered interest for notification on this event type.- Specified by:
fireUndoableEditHappenedin interfaceDrawing
-
getFontRenderContext
public java.awt.font.FontRenderContext getFontRenderContext()
Description copied from interface:DrawingReturns the font render context used to do text leyout and text drawing.- Specified by:
getFontRenderContextin interfaceDrawing
-
setFontRenderContext
public void setFontRenderContext(java.awt.font.FontRenderContext frc)
Description copied from interface:DrawingSets the font render context used to do text leyout and text drawing.- Specified by:
setFontRenderContextin interfaceDrawing
-
read
public void read(DOMInput in) throws java.io.IOException
- Specified by:
readin interfaceDOMStorable- Overrides:
readin classAbstractAttributedCompositeFigure- Throws:
java.io.IOException
-
write
public void write(DOMOutput out) throws java.io.IOException
- Specified by:
writein interfaceDOMStorable- Overrides:
writein classAbstractAttributedCompositeFigure- Throws:
java.io.IOException
-
getLock
public java.lang.Object getLock()
The drawing view synchronizes on the lock when drawing a drawing.
-
addInputFormat
public void addInputFormat(InputFormat format)
Description copied from interface:DrawingAdds an input format to the drawing.- Specified by:
addInputFormatin interfaceDrawing
-
addOutputFormat
public void addOutputFormat(OutputFormat format)
Description copied from interface:DrawingAdds an output format to the drawing.- Specified by:
addOutputFormatin interfaceDrawing
-
setOutputFormats
public void setOutputFormats(java.util.List<OutputFormat> formats)
Description copied from interface:DrawingSets output formats for the Drawing in order of preferred formats.The output formats are used for saving the Drawing into a file and for cutting and copying Figures from the Drawing into the clipboard.
- Specified by:
setOutputFormatsin interfaceDrawing
-
setInputFormats
public void setInputFormats(java.util.List<InputFormat> formats)
Description copied from interface:DrawingSets input formats for the Drawing in order of preferred formats.The input formats are used for loading the Drawing from a file and for pasting Figures from the clipboard into the Drawing.
- Specified by:
setInputFormatsin interfaceDrawing
-
getInputFormats
public java.util.List<InputFormat> getInputFormats()
Description copied from interface:DrawingGets input formats for the Drawing in order of preferred formats.- Specified by:
getInputFormatsin interfaceDrawing
-
getOutputFormats
public java.util.List<OutputFormat> getOutputFormats()
Description copied from interface:DrawingGets output formats for the Drawing in order of preferred formats.- Specified by:
getOutputFormatsin interfaceDrawing
-
getDrawing
public Drawing getDrawing()
-
clone
public AbstractDrawing clone()
Description copied from interface:FigureReturns a clone of the figure, with clones of all aggregated figures, such as children and decorators. The cloned figure does not clone the list of FigureListeners from its original.- Specified by:
clonein interfaceFigure- Overrides:
clonein classAbstractAttributedCompositeFigure
-
-
DataMelt 3.0 © DataMelt by jWork.ORG