|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jdrawing.AbstractDrawingModel org.jdrawing.graphics.GraphicsModel
The implementation of DrawingModel
interface that stores
a sequence of graphics operations.
Constructor Summary | |
GraphicsModel()
|
Method Summary | |
void |
addOperation(GraphicsOperation operation)
Appends GraphicsOperation object to the end of painting
sequence of the model. |
void |
addOperationAt(GraphicsOperation operation,
int index)
Inserts GraphicsOperation object to the painting
sequence of the model model at specified position. |
void |
clear()
Removes all elements from the model |
java.util.Enumeration |
elements()
Returns an enumeration of the elements of this model. |
GraphicsOperation |
getOperationAt(int index)
Returns GraphicsOperation located at specified
position in the painting sequence of the model. |
void |
removeOperation(GraphicsOperation operation)
Removes given GraphicsOperation from the painting
sequence of the model. |
void |
removeOperationAt(int index)
Removes the element at specified position from the painting sequence of the model. |
int |
size()
Returns total count of elements in the model. |
void |
sortElements(java.lang.Object[] elements)
Reorder elements to be in down, then right order. |
void |
updateOperation(GraphicsOperation operation)
Notify listeners about element changes. |
Methods inherited from class org.jdrawing.AbstractDrawingModel |
addDrawingModelListener, fireElementsAdded, fireElementsChanged, fireElementsRemoved, fireModelChanged, getDrawingModelListeners, removeDrawingModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GraphicsModel()
Method Detail |
public void addOperation(GraphicsOperation operation)
GraphicsOperation
object to the end of painting
sequence of the model.
operation
- GraphicsOperation
to be appendedpublic void addOperationAt(GraphicsOperation operation, int index)
GraphicsOperation
object to the painting
sequence of the model model at specified position.
operation
- GraphicsOperation
to be insertedindex
- position in the painting sequencepublic void removeOperation(GraphicsOperation operation)
GraphicsOperation
from the painting
sequence of the model.
operation
- GraphicsOperation
to be removedpublic void removeOperationAt(int index)
index
- position of the elementpublic void clear()
public int size()
public GraphicsOperation getOperationAt(int index)
GraphicsOperation
located at specified
position in the painting sequence of the model.
index
- position in the painting sequence
GraphicsOperation
public void updateOperation(GraphicsOperation operation)
operation
- changed elementpublic java.util.Enumeration elements()
public void sortElements(java.lang.Object[] elements)
elements
to be in down, then right order.
elements
- the elements to reorder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |