com.rolemodelsoft.drawlet.examples
Class SingleDrawingModel

java.lang.Object
  |
  +--com.rolemodelsoft.drawlet.util.BasicObservable
        |
        +--com.rolemodelsoft.drawlet.examples.SingleDrawingModel

public class SingleDrawingModel
extends BasicObservable

See Also:
Serialized Form

Fields inherited from class com.rolemodelsoft.drawlet.util.BasicObservable
observerList
 
Constructor Summary
SingleDrawingModel()
          Default constructor.
 
Method Summary
 void clearDrawing()
          Clears the drawing.
 Drawing getDrawing()
          Gets the drawing.
 void printDrawing(java.awt.Frame f)
          Print the drawing.
 void restoreDrawing(java.lang.String fileName)
          Restore the drawing from the given file name
 void saveDrawing(java.lang.String fileName)
          Save the drawing to the given file name.
 void setDrawing(Drawing newDrawing)
          Set the drawing associated with the receiver to the given drawing, and tell observers about it.
 
Methods inherited from class com.rolemodelsoft.drawlet.util.BasicObservable
addObserver, deleteObserver, deleteObservers, getObservers, notifyObserver, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleDrawingModel

public SingleDrawingModel()
Default constructor.
Method Detail

clearDrawing

public void clearDrawing()
Clears the drawing.

getDrawing

public Drawing getDrawing()
Gets the drawing.
Returns:
the Drawing currently associated with the receiver

printDrawing

public void printDrawing(java.awt.Frame f)
Print the drawing.

restoreDrawing

public void restoreDrawing(java.lang.String fileName)
Restore the drawing from the given file name
Parameters:
fileName - the file name

saveDrawing

public void saveDrawing(java.lang.String fileName)
Save the drawing to the given file name.
Parameters:
fileName - the file name

setDrawing

public void setDrawing(Drawing newDrawing)
Set the drawing associated with the receiver to the given drawing, and tell observers about it.
Parameters:
newDrawing - the drawing