Back to index

moin  1.9.0~rc2
Public Member Functions
CH.ifa.draw.framework.Drawing Interface Reference

Drawing is a container for figures. More...

Inheritance diagram for CH.ifa.draw.framework.Drawing:
Inheritance graph
[legend]
Collaboration diagram for CH.ifa.draw.framework.Drawing:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void release ()
 Releases the drawing and its contained figures.
FigureEnumeration figures ()
 Returns an enumeration to iterate in Z-order back to front over the figures.
FigureEnumeration figuresReverse ()
 Returns an enumeration to iterate in Z-order front to back over the figures.
Figure findFigure (int x, int y)
 Finds a top level Figure.
Figure findFigure (Rectangle r)
 Finds a top level Figure that intersects the given rectangle.
Figure findFigureWithout (int x, int y, Figure without)
 Finds a top level Figure, but supresses the passed in figure.
Figure findFigure (Rectangle r, Figure without)
 Finds a top level Figure that intersects the given rectangle.
Figure findFigureInside (int x, int y)
 Finds a figure but descends into a figure's children.
Figure findFigureInsideWithout (int x, int y, Figure without)
 Finds a figure but descends into a figure's children.
void addDrawingChangeListener (DrawingChangeListener listener)
 Adds a listener for this drawing.
void removeDrawingChangeListener (DrawingChangeListener listener)
 Removes a listener from this drawing.
Enumeration drawingChangeListeners ()
 Gets the listeners of a drawing.
Figure add (Figure figure)
 Adds a figure and sets its container to refer to this drawing.
void addAll (Vector newFigures)
 Adds a vector of figures.
Figure remove (Figure figure)
 Removes the figure from the drawing and releases it.
Figure orphan (Figure figure)
 Removes a figure from the figure list, but doesn't release it.
void orphanAll (Vector newFigures)
 Removes a vector of figures from the figure's list without releasing the figures.
void removeAll (Vector figures)
 Removes a vector of figures .
void replace (Figure figure, Figure replacement)
 Replaces a figure in the drawing without removing it from the drawing.
void sendToBack (Figure figure)
 Sends a figure to the back of the drawing.
void bringToFront (Figure figure)
 Brings a figure to the front.
void draw (Graphics g, boolean showGuides)
 Draws all the figures back to front.
void figureInvalidated (FigureChangeEvent e)
 Invalidates a rectangle and merges it with the existing damaged area.
void figureRequestUpdate (FigureChangeEvent e)
 Forces an update of the drawing change listeners.
void figureRequestRemove (FigureChangeEvent e)
 Handles a removeFrfigureRequestRemove request that is passed up the figure container hierarchy.
void lock ()
 Acquires the drawing lock.
void unlock ()
 Releases the drawing lock.
void write (StorableOutput dw)
 Writes the object to the StorableOutput.
String getMap ()
 Writes a map image of the object.
void read (StorableInput dr) throws IOException
 Reads the object from the StorableInput.
void figureChanged (FigureChangeEvent e)
 Sent when a figure changed.
void figureRemoved (FigureChangeEvent e)
 Sent when a figure was removed.

Detailed Description

Drawing is a container for figures.

Drawing sends out DrawingChanged events to DrawingChangeListeners whenever a part of its area was invalidated.


Design Patterns

 o

Observer
The Observer pattern is used to decouple the Drawing from its views and to enable multiple views.


See also:
Figure
DrawingView
FigureChangeListener

Definition at line 30 of file Drawing.java.


Member Function Documentation

Adds a figure and sets its container to refer to this drawing.

Returns:
the figure that was inserted.

Here is the caller graph for this function:

void CH.ifa.draw.framework.Drawing.addAll ( Vector  newFigures)

Adds a vector of figures.

Adds a listener for this drawing.

Brings a figure to the front.

void CH.ifa.draw.framework.Drawing.draw ( Graphics  g,
boolean  showGuides 
)

Draws all the figures back to front.

Gets the listeners of a drawing.

Sent when a figure changed.

Invalidates a rectangle and merges it with the existing damaged area.

Implements CH.ifa.draw.framework.FigureChangeListener.

Sent when a figure was removed.

Handles a removeFrfigureRequestRemove request that is passed up the figure container hierarchy.

See also:
FigureChangeListener

Implements CH.ifa.draw.framework.FigureChangeListener.

Forces an update of the drawing change listeners.

Implements CH.ifa.draw.framework.FigureChangeListener.

Returns an enumeration to iterate in Z-order back to front over the figures.

Returns an enumeration to iterate in Z-order front to back over the figures.

Finds a top level Figure.

Use this call for hit detection that should not descend into the figure's children.

Finds a top level Figure that intersects the given rectangle.

Figure CH.ifa.draw.framework.Drawing.findFigure ( Rectangle  r,
Figure  without 
)

Finds a top level Figure that intersects the given rectangle.

It supresses the passed in figure. Use this method to ignore a figure that is temporarily inserted into the drawing.

Finds a figure but descends into a figure's children.

Use this method to implement click-through hit detection, that is, you want to detect the inner most figure containing the given point.

Finds a figure but descends into a figure's children.

It supresses the passed in figure. Use this method to ignore a figure that is temporarily inserted into the drawing.

Parameters:
xthe x coordinate
ythe y coordinate
withoutthe figure to be ignored during the find.

Finds a top level Figure, but supresses the passed in figure.

Use this method to ignore a figure that is temporarily inserted into the drawing.

Parameters:
xthe x coordinate
ythe y coordinate
withoutthe figure to be ignored during the find.
String CH.ifa.draw.util.Storable.getMap ( ) [inherited]

Writes a map image of the object.

Implemented in CH.ifa.draw.figures.ArrowTip.

Acquires the drawing lock.

Here is the caller graph for this function:

Removes a figure from the figure list, but doesn't release it.

Use this method to temporarily manipulate a figure outside of the drawing.

void CH.ifa.draw.framework.Drawing.orphanAll ( Vector  newFigures)

Removes a vector of figures from the figure's list without releasing the figures.

See also:
orphan
void CH.ifa.draw.util.Storable.read ( StorableInput  dr) throws IOException [inherited]

Reads the object from the StorableInput.

Here is the caller graph for this function:

Releases the drawing and its contained figures.

Here is the caller graph for this function:

Removes the figure from the drawing and releases it.

Here is the caller graph for this function:

void CH.ifa.draw.framework.Drawing.removeAll ( Vector  figures)

Removes a vector of figures .

See also:
remove

Removes a listener from this drawing.

void CH.ifa.draw.framework.Drawing.replace ( Figure  figure,
Figure  replacement 
)

Replaces a figure in the drawing without removing it from the drawing.

Here is the caller graph for this function:

Sends a figure to the back of the drawing.

Releases the drawing lock.

Here is the caller graph for this function:

Writes the object to the StorableOutput.

Here is the caller graph for this function:


The documentation for this interface was generated from the following file: