CH.ifa.draw.standard
Class StandardDrawing
- java.lang.Object
-
- CH.ifa.draw.standard.AbstractFigure
-
- CH.ifa.draw.standard.CompositeFigure
-
- CH.ifa.draw.standard.StandardDrawing
-
- All Implemented Interfaces:
- Drawing, Figure, FigureChangeListener, Storable, java.io.Serializable, java.lang.Cloneable, java.util.EventListener
- Direct Known Subclasses:
- BouncingDrawing, NeuralNetDrawing
public class StandardDrawing extends CompositeFigure implements Drawing
The standard implementation of the Drawing interface.- See Also:
Drawing, Serialized Form
-
-
Field Summary
-
Fields inherited from interface CH.ifa.draw.framework.Figure
POPUP_MENU
-
-
Constructor Summary
Constructors Constructor and Description StandardDrawing()Constructs the Drawing.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddDrawingChangeListener(DrawingChangeListener listener)Adds a listener for this drawing.voidbasicDisplayBox(java.awt.Point p1, java.awt.Point p2)Sets the display box of a figure.java.awt.RectangledisplayBox()Gets the display box.java.util.EnumerationdrawingChangeListeners()Adds a listener for this drawing.voidfigureInvalidated(FigureChangeEvent e)Invalidates a rectangle and merges it with the existing damaged area.voidfigureRequestRemove(FigureChangeEvent e)Handles a removeFromDrawing request that is passed up the figure container hierarchy.voidfigureRequestUpdate(FigureChangeEvent e)Forces an updatejava.util.Vectorhandles()Return's the figure's handles.voidlock()Acquires the drawing lock.Figureremove(Figure figure)Removes the figure from the drawing and releases it.voidremoveDrawingChangeListener(DrawingChangeListener listener)Removes a listener from this drawing.voidunlock()Releases the drawing lock.-
Methods inherited from class CH.ifa.draw.standard.CompositeFigure
add, addAll, bringToFront, draw, figureAt, figureChanged, figureCount, figureRemoved, figures, figuresReverse, findFigure, findFigure, findFigure, findFigureInside, findFigureInsideWithout, findFigureWithout, includes, orphan, orphanAll, read, release, removeAll, removeAll, replace, sendToBack, write
-
Methods inherited from class CH.ifa.draw.standard.AbstractFigure
addFigureChangeListener, addToContainer, canConnect, center, changed, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, getAttribute, invalidate, isEmpty, listener, moveBy, removeFigureChangeListener, removeFromContainer, setAttribute, size, willChange
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface CH.ifa.draw.framework.Drawing
add, addAll, bringToFront, draw, figures, figuresReverse, findFigure, findFigure, findFigure, findFigureInside, findFigureInsideWithout, findFigureWithout, orphan, orphanAll, release, removeAll, replace, sendToBack
-
Methods inherited from interface CH.ifa.draw.framework.FigureChangeListener
figureChanged, figureRemoved
-
-
-
-
Method Detail
-
addDrawingChangeListener
public void addDrawingChangeListener(DrawingChangeListener listener)
Adds a listener for this drawing.- Specified by:
addDrawingChangeListenerin interfaceDrawing
-
removeDrawingChangeListener
public void removeDrawingChangeListener(DrawingChangeListener listener)
Removes a listener from this drawing.- Specified by:
removeDrawingChangeListenerin interfaceDrawing
-
drawingChangeListeners
public java.util.Enumeration drawingChangeListeners()
Adds a listener for this drawing.- Specified by:
drawingChangeListenersin interfaceDrawing
-
remove
public Figure remove(Figure figure)
Removes the figure from the drawing and releases it.- Specified by:
removein interfaceDrawing- Overrides:
removein classCompositeFigure- See Also:
CompositeFigure.removeAll(java.util.Vector)
-
figureRequestRemove
public void figureRequestRemove(FigureChangeEvent e)
Handles a removeFromDrawing request that is passed up the figure container hierarchy.- Specified by:
figureRequestRemovein interfaceDrawing- Specified by:
figureRequestRemovein interfaceFigureChangeListener- Overrides:
figureRequestRemovein classCompositeFigure- See Also:
FigureChangeListener
-
figureInvalidated
public void figureInvalidated(FigureChangeEvent e)
Invalidates a rectangle and merges it with the existing damaged area.- Specified by:
figureInvalidatedin interfaceDrawing- Specified by:
figureInvalidatedin interfaceFigureChangeListener- Overrides:
figureInvalidatedin classCompositeFigure- See Also:
FigureChangeListener
-
figureRequestUpdate
public void figureRequestUpdate(FigureChangeEvent e)
Forces an update- Specified by:
figureRequestUpdatein interfaceDrawing- Specified by:
figureRequestUpdatein interfaceFigureChangeListener- Overrides:
figureRequestUpdatein classCompositeFigure- See Also:
FigureChangeListener
-
handles
public java.util.Vector handles()
Return's the figure's handles. This is only used when a drawing is nested inside another drawing.- Specified by:
handlesin interfaceFigure- Specified by:
handlesin classAbstractFigure- Returns:
- a Vector of handles
- See Also:
Handle
-
displayBox
public java.awt.Rectangle displayBox()
Gets the display box. This is the union of all figures.- Specified by:
displayBoxin interfaceFigure- Specified by:
displayBoxin classAbstractFigure- See Also:
Figure.basicDisplayBox(java.awt.Point, java.awt.Point)
-
basicDisplayBox
public void basicDisplayBox(java.awt.Point p1, java.awt.Point p2)Description copied from class:AbstractFigureSets the display box of a figure. This is the method that subclassers override. Clients usually call displayBox.- Specified by:
basicDisplayBoxin interfaceFigure- Specified by:
basicDisplayBoxin classAbstractFigure- Parameters:
p1- the new originp2- the new corner- See Also:
AbstractFigure.displayBox(java.awt.Point, java.awt.Point)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG