|
JHotDraw 7.0.9 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.beans.AbstractBean
org.jhotdraw.draw.AbstractDrawing
public abstract class AbstractDrawing
AbstractDrawing.
Field Summary | |
---|---|
protected javax.swing.event.EventListenerList |
listenerList
|
Fields inherited from class org.jhotdraw.beans.AbstractBean |
---|
propertySupport |
Constructor Summary | |
---|---|
AbstractDrawing()
Creates a new instance. |
Method Summary | |
---|---|
void |
add(Figure figure)
Calls basicAdd and then calls figure.addNotify and firesFigureAdded. |
void |
add(int index,
Figure figure)
Adds a figure to the drawing. |
void |
addAll(java.util.Collection<Figure> figures)
Adds a collection of figures to the drawing. |
void |
addAll(int index,
java.util.Collection<Figure> figures)
Adds a collection of figures to the drawing. |
void |
addDrawingListener(DrawingListener listener)
Adds a listener for this drawing. |
void |
addUndoableEditListener(javax.swing.event.UndoableEditListener l)
Adds a listener for undooable edit events. |
void |
basicAdd(Figure figure)
Thi |
void |
basicAddAll(int index,
java.util.Collection<Figure> figures)
Reinserts the specified figures which were temporarily removed from the drawing. |
void |
basicRemoveAll(java.util.Collection<Figure> toBeOrphaned)
Removes the specified figures temporarily from the drawing. |
void |
clear()
Removes all figures. |
protected void |
fireAreaInvalidated(java.awt.geom.Rectangle2D.Double dirtyRegion)
Notify all listenerList that have registered interest for notification on this event type. |
protected void |
fireFigureAdded(Figure f,
int zIndex)
Notify all listenerList that have registered interest for notification on this event type. |
protected void |
fireFigureRemoved(Figure f,
int zIndex)
Notify all listenerList that have registered interest for notification on this event type. |
void |
fireUndoableEditHappened(javax.swing.undo.UndoableEdit edit)
Notify all listenerList that have registered interest for notification on this event type. |
int |
getFigureCount()
Gets the number of figures. |
java.awt.font.FontRenderContext |
getFontRenderContext()
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.Object |
getLock()
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. |
void |
read(DOMInput in)
|
void |
remove(Figure figure)
Calls basicRemove and then calls figure.addNotify and firesFigureAdded. |
void |
removeAll(java.util.Collection<Figure> toBeRemoved)
Removes the specified figures from the drawing. |
void |
removeDrawingListener(DrawingListener listener)
Removes a listener from this drawing. |
void |
removeUndoableEditListener(javax.swing.event.UndoableEditListener l)
Removes a listener for undoable edit events. |
void |
setFontRenderContext(java.awt.font.FontRenderContext frc)
Sets the font render context used to do text leyout and text drawing. |
void |
setInputFormats(java.util.List<InputFormat> formats)
Sets input formats for the Drawing in order of preferred formats. |
void |
setOutputFormats(java.util.List<OutputFormat> formats)
Sets output formats for the Drawing in order of preferred formats. |
void |
write(DOMOutput out)
|
Methods inherited from class org.jhotdraw.beans.AbstractBean |
---|
addPropertyChangeListener, addPropertyChangeListener, clone, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jhotdraw.draw.Drawing |
---|
basicAdd, basicRemove, bringToFront, contains, draw, findFigure, findFigureBehind, findFigureBehind, findFigureExcept, findFigureExcept, findFigureInside, findFigures, findFiguresWithin, getCanvasSize, getFigures, getFiguresFrontToBack, indexOf, sendToBack, setCanvasSize, sort |
Field Detail |
---|
protected javax.swing.event.EventListenerList listenerList
Constructor Detail |
---|
public AbstractDrawing()
Method Detail |
---|
public void addDrawingListener(DrawingListener listener)
Drawing
addDrawingListener
in interface Drawing
public void removeDrawingListener(DrawingListener listener)
Drawing
removeDrawingListener
in interface Drawing
public void addUndoableEditListener(javax.swing.event.UndoableEditListener l)
Drawing
addUndoableEditListener
in interface Drawing
public void removeUndoableEditListener(javax.swing.event.UndoableEditListener l)
Drawing
removeUndoableEditListener
in interface Drawing
public final void addAll(java.util.Collection<Figure> figures)
Drawing
addNotify
message to each figure
after it has been added.
addAll
in interface Drawing
figures
- to be added to the drawingFigure.addNotify(org.jhotdraw.draw.Drawing)
public final void addAll(int index, java.util.Collection<Figure> figures)
Drawing
addNotify
message to each figure
after it has been added.
addAll
in interface Drawing
index
- The z-index of the figure.figures
- to be added to the drawingFigure.addNotify(org.jhotdraw.draw.Drawing)
public void clear()
clear
in interface Drawing
public int getFigureCount()
getFigureCount
in interface Drawing
public void removeAll(java.util.Collection<Figure> toBeRemoved)
Drawing
removeNotify
message to each figure
before it is removed.
removeAll
in interface Drawing
toBeRemoved
- A collection of figures which are part of the drawing
and should be removedFigure.removeNotify(org.jhotdraw.draw.Drawing)
public void basicAddAll(int index, java.util.Collection<Figure> figures)
Drawing
basicAddAll
in interface Drawing
index
- The insertion index.figures
- A collection of figures which are part of the drawing
and should be reinserted.Drawing.basicRemoveAll(Collection)
public void basicRemoveAll(java.util.Collection<Figure> toBeOrphaned)
Drawing
basicRemoveAll
in interface Drawing
toBeOrphaned
- A collection of figures which are part of the drawing
and should be removedDrawing.basicAddAll(int, Collection)
public final void add(Figure figure)
add
in interface Drawing
figure
- to be added to the drawingFigure.addNotify(org.jhotdraw.draw.Drawing)
public final void add(int index, Figure figure)
Drawing
addNotify
message to the figure
after it has been added.
add
in interface Drawing
index
- The z-index of the figure.figure
- to be added to the drawingFigure.addNotify(org.jhotdraw.draw.Drawing)
public void basicAdd(Figure figure)
basicAdd
in interface Drawing
figure
- that is part of the drawing and should be removedDrawing.basicRemove(Figure)
public final void remove(Figure figure)
remove
in interface Drawing
figure
- that is part of the drawing and should be removedFigure.removeNotify(org.jhotdraw.draw.Drawing)
protected void fireAreaInvalidated(java.awt.geom.Rectangle2D.Double dirtyRegion)
public void fireUndoableEditHappened(javax.swing.undo.UndoableEdit edit)
fireUndoableEditHappened
in interface Drawing
protected void fireFigureAdded(Figure f, int zIndex)
protected void fireFigureRemoved(Figure f, int zIndex)
public java.awt.font.FontRenderContext getFontRenderContext()
Drawing
getFontRenderContext
in interface Drawing
public void setFontRenderContext(java.awt.font.FontRenderContext frc)
Drawing
setFontRenderContext
in interface Drawing
public void read(DOMInput in) throws java.io.IOException
read
in interface DOMStorable
java.io.IOException
public void write(DOMOutput out) throws java.io.IOException
write
in interface DOMStorable
java.io.IOException
public java.lang.Object getLock()
getLock
in interface Drawing
public void setOutputFormats(java.util.List<OutputFormat> formats)
Drawing
The output formats are used for saving the Drawing into a file and for cutting and copying Figures from the Drawing into the clipboard.
setOutputFormats
in interface Drawing
public void setInputFormats(java.util.List<InputFormat> formats)
Drawing
The input formats are used for loading the Drawing from a file and for pasting Figures from the clipboard into the Drawing.
setInputFormats
in interface Drawing
public java.util.List<InputFormat> getInputFormats()
Drawing
getInputFormats
in interface Drawing
public java.util.List<OutputFormat> getOutputFormats()
Drawing
getOutputFormats
in interface Drawing
|
Copyright 1996-2007 (c) JHotDraw.org. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |