Interface SlateModel

All Known Implementing Classes:
DefaultSlateModel

public abstract interface SlateModel

Model interface for managing repository of shapes.

Author:
Ramnivas Laddad

Method Summary
 void addShape(java.awt.Shape s)
          Add shape to the model.
 void addSlateModelListener(SlateModelListener l)
          Add listener interested in changes in the changes model.
 java.awt.Shape getShapeAtIndex(int index)
          Get the shape at given index
 int getShapeCount()
          Get the count of shape in the model
 void removeAllShapes()
          Remove all the shapes from model
 void removeShape(java.awt.Shape s)
          Remove shape from model
 void removeSlateModelListener(SlateModelListener l)
          Remove a previously added listener.
 

Method Detail

addSlateModelListener

public void addSlateModelListener(SlateModelListener l)
Add listener interested in changes in the changes model.
Parameters:
l - listener to be added.

removeSlateModelListener

public void removeSlateModelListener(SlateModelListener l)
Remove a previously added listener.
Parameters:
l - listener to be removed.

addShape

public void addShape(java.awt.Shape s)
Add shape to the model.
Parameters:
s - shape to be added.

removeShape

public void removeShape(java.awt.Shape s)
Remove shape from model
Parameters:
s - shape to be removed

removeAllShapes

public void removeAllShapes()
Remove all the shapes from model

getShapeCount

public int getShapeCount()
Get the count of shape in the model
Returns:
number of shapes currently int the model

getShapeAtIndex

public java.awt.Shape getShapeAtIndex(int index)
Get the shape at given index
Parameters:
index - index of shape sought
Returns:
shape at given index