public class SketchModel extends Object
Constructor and Description |
---|
SketchModel()
Create a SketchModel with no symbols.
|
Modifier and Type | Method and Description |
---|---|
void |
addSketchListener(SketchListener l)
Add the given SketchListener to the set of listeners.
|
void |
addSymbol(int index,
Symbol s)
Insert a symbol into the model at the given position (Z order).
|
void |
addSymbol(Symbol s)
Add the given symbol to the model.
|
int |
getSymbolCount()
Return the number of symbols in this model.
|
int |
indexOf(Symbol s)
Return the index of the given symbol, or -1 if
the symbol is not contained by the model.
|
void |
removeSketchListener(SketchListener l)
Remove the specified SketchListener from the set
of listeners.
|
void |
removeSymbol(Symbol s)
Remove the specified symbol from the model.
|
Iterator |
symbols()
Return an iterator over the symbols in the model.
|
void |
updateSymbol(Symbol s)
Provide the means for a client to notify the listeners that the
specified symbol has been updated.
|
public void addSketchListener(SketchListener l)
public void addSymbol(Symbol s)
public void addSymbol(int index, Symbol s)
Clients should assume that an implementation of this method does not check if the symbol is already contained -- clients are therefore responsible for being bug-free.
public int getSymbolCount()
public int indexOf(Symbol s)
public void removeSketchListener(SketchListener l)
public void removeSymbol(Symbol s)
public Iterator symbols()
public void updateSymbol(Symbol s)
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.