org.jdrawing
Interface DrawingModel

All Known Subinterfaces:
IndexedDrawingModel
All Known Implementing Classes:
AbstractDrawingModel

public interface DrawingModel

The interface that defines a suitable data model for a JDrawing.


Method Summary
 void addDrawingModelListener(DrawingModelListener listener)
          Adds a listener which will be notified about changes in this model.
 java.util.Enumeration elements()
          Returns an enumeration of the elements of this model.
 void removeDrawingModelListener(DrawingModelListener listener)
          Removes a listener from the list that is notified about changes in this model.
 void sortElements(java.lang.Object[] elements)
          Reorder elements to be in order suitable for painting.
 

Method Detail

elements

public java.util.Enumeration elements()
Returns an enumeration of the elements of this model. The returned Enumeration object will generate all elements in this model. The elements will be generated by this enumeration in order suitable for painting.

Returns:
an enumeration of the elements of this model

addDrawingModelListener

public void addDrawingModelListener(DrawingModelListener listener)
Adds a listener which will be notified about changes in this model.

Parameters:
listener - the DrawingModelListener

removeDrawingModelListener

public void removeDrawingModelListener(DrawingModelListener listener)
Removes a listener from the list that is notified about changes in this model.

Parameters:
listener - the DrawingModelListener

sortElements

public void sortElements(java.lang.Object[] elements)
Reorder elements to be in order suitable for painting.

Parameters:
elements - the elements to reorder