All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class CH.ifa.draw.standard.StandardDrawing

CH.ifa.draw.standard.AbstractFigure
   |
   +----CH.ifa.draw.standard.CompositeFigure
           |
           +----CH.ifa.draw.standard.StandardDrawing

public class StandardDrawing
extends CompositeFigure
implements Drawing
The standard implementation of the Drawing interface.

See Also:
Drawing

Constructor Index

 o StandardDrawing()
Constructs the Drawing.

Method Index

 o accept(Figure)
Any figure can be dropped onto a drawing.
 o addDrawingChangeListener(DrawingChangeListener)
Adds a listener for this drawing.
 o basicDisplayBox(Point, Point)
Sets the display box of a figure.
 o bringToFront(Figure)
Brings a figure to the front.
 o displayBox()
Gets the display box.
 o draw(Graphics)
Draws all the figures back to front.
 o drawingChangeListeners()
Gets the listeners of a drawing.
 o drawingChangeListeners()
Adds a listener for this drawing.
 o drop(Figure)
Add the dragged figure to this.
 o figureChanged(FigureChangeEvent)
Cause immediate validation of the layout of the drawing??? / public void markDirty() { validate(); }
 o figureInvalidated(FigureChangeEvent)
Invalidates a rectangle and merges it with the existing damaged area.
 o figureRequestRemove(FigureChangeEvent)
Handles a removeFromDrawing request that is passed up the figure container hierarchy.
 o figureRequestUpdate(FigureChangeEvent)
Forces an update
 o findConnectable(int, int, Figure)
Find the figure that can be connected at the given point.
 o findCtrlSelectable(int, int)
Returns null.
 o findDropTarget(int, int, Figure)
Find a figure at the given point that can accept the dragTarget.
 o findSelectable(int, int)
CompositeFigure serves as a base abstraction for GroupFigure.
 o handles()
Return's the figure's handles.
 o lock()
Acquires the drawing lock.
 o remove(Figure)
Removes the figure from the drawing and releases it.
 o removeChild(Figure)
Remove a top-level figure from this (the drawing), but do not release it.
 o removeDrawingChangeListener(DrawingChangeListener)
Removes a listener from this drawing.
 o unlock()
Releases the drawing lock.

Constructors

 o StandardDrawing
 public StandardDrawing()
Constructs the Drawing.

Methods

 o bringToFront
 public synchronized void bringToFront(Figure figure)
Brings a figure to the front.

Overrides:
bringToFront in class CompositeFigure
 o accept
 public boolean accept(Figure figure)
Any figure can be dropped onto a drawing.

Overrides:
accept in class AbstractFigure
 o drop
 public Figure drop(Figure dragTarget)
Add the dragged figure to this.

Overrides:
drop in class AbstractFigure
 o findSelectable
 public Figure findSelectable(int x,
                              int y)
CompositeFigure serves as a base abstraction for GroupFigure. Unfortunately Drawing is not a GroupFigure - it is more like PanelComposite without a frame. This is why we can't use the findFigure() in CompositeFigure for hit detection. Hit detection should not descend into the children of a GroupFigure but it should descend into the children of PanelComposites.

Overrides:
findSelectable in class AbstractFigure
 o findCtrlSelectable
 public Figure findCtrlSelectable(int x,
                                  int y)
Returns null.

Overrides:
findCtrlSelectable in class AbstractFigure
 o findConnectable
 public Figure findConnectable(int x,
                               int y,
                               Figure connection)
Find the figure that can be connected at the given point. Return null, if no figure is found.

Overrides:
findConnectable in class AbstractFigure
 o findDropTarget
 public Figure findDropTarget(int x,
                              int y,
                              Figure dragTarget)
Find a figure at the given point that can accept the dragTarget. Return this, if no other figure is found (can always add the figure in the drawing).

Overrides:
findDropTarget in class AbstractFigure
 o addDrawingChangeListener
 public void addDrawingChangeListener(DrawingChangeListener listener)
Adds a listener for this drawing.

 o removeDrawingChangeListener
 public void removeDrawingChangeListener(DrawingChangeListener listener)
Removes a listener from this drawing.

 o drawingChangeListeners
 public Enumeration drawingChangeListeners()
Adds a listener for this drawing.

 o remove
 public synchronized Figure remove(Figure figure)
Removes the figure from the drawing and releases it.

Overrides:
remove in class CompositeFigure
 o figureRequestRemove
 public void figureRequestRemove(FigureChangeEvent e)
Handles a removeFromDrawing request that is passed up the figure container hierarchy.

Overrides:
figureRequestRemove in class CompositeFigure
See Also:
FigureChangeListener
 o removeChild
 public Figure removeChild(Figure childFigure)
Remove a top-level figure from this (the drawing), but do not release it. First orphan it, and then remove this from the containers of the figure.

Overrides:
removeChild in class CompositeFigure
 o figureChanged
 public void figureChanged(FigureChangeEvent e)
Cause immediate validation of the layout of the drawing??? / public void markDirty() { validate(); }

Overrides:
figureChanged in class CompositeFigure
 o figureInvalidated
 public void figureInvalidated(FigureChangeEvent e)
Invalidates a rectangle and merges it with the existing damaged area.

Overrides:
figureInvalidated in class CompositeFigure
See Also:
FigureChangeListener
 o figureRequestUpdate
 public void figureRequestUpdate(FigureChangeEvent e)
Forces an update

Overrides:
figureRequestUpdate in class CompositeFigure
 o handles
 public Vector handles()
Return's the figure's handles. This is only used when a drawing is nested inside another drawing.

Overrides:
handles in class AbstractFigure
 o displayBox
 public Rectangle displayBox()
Gets the display box. This is the union of all figures.

Overrides:
displayBox in class AbstractFigure
 o basicDisplayBox
 public void basicDisplayBox(Point p1,
                             Point p2)
Sets the display box of a figure.

Overrides:
basicDisplayBox in class AbstractFigure
 o lock
 public synchronized void lock()
Acquires the drawing lock.

 o unlock
 public synchronized void unlock()
Releases the drawing lock.


All Packages  Class Hierarchy  This Package  Previous  Next  Index