public class GeometryRulesModel extends Objectimplements ListModel <GeometryRule >
| Constructor and Description |
|---|
GeometryRulesModel()
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(GeometryRule
|
void |
addChangeListener(GeometryRuleModelListener
Add a listener to be informed about changes to the model.
|
void |
addListDataListener(ListDataListener
|
static List |
deserialize(SAXParser
Read a GeometryRulesModel from the given Inputstream and SAXParser
|
GeometryRule |
getElementAt(int index)
|
GeometryRule |
getRuleByName(String
Get the rule denoted by the given name.
|
List |
getRules()
|
int |
getSize()
|
void |
refresh()
Call this to trigger an event that proclaims a complex change possibly affecting all rules.
|
void |
refresh(GeometryRule
Call this to trigger an event that proclaims a change in the denoted rule.
|
void |
removeByIndices(ArrayList
Remove the rules denoted by the given list of indices.
|
void |
removeChangeListener(GeometryRuleModelListener
Remove a listener from the list of listeners.
|
void |
removeListDataListener(ListDataListener
|
void |
removeRule(GeometryRule
Remove the denoted rule.
|
void |
serialize(TransformerHandler
Serialize the model to a XML output.
|
void |
setRules(List
Set the rules of the model to the denoted list.
|
void |
swap(int a, int b)
Swap the to list items denoted by a and b
|
public void add(GeometryRulerule)
rule - ad this rule to the list
public void setRules(List<GeometryRule > rules)
rules - the rules to use.
public void removeByIndices(ArrayList<Integer > indexList)
indexList - a list of list indices. Indices MUST be sorted descending.
public void removeRule(GeometryRulerule)
rule - the rule to remove.
public void swap(int a,
int b)
a - the first item to swap
b - the seconds item to swap
public List<GeometryRule > getRules()
public int getSize()
public GeometryRulegetElementAt(int index)
public void addListDataListener(ListDataListenerl)
public void removeListDataListener(ListDataListenerl)
public GeometryRulegetRuleByName(String name)
name - the name to search for.
public void addChangeListener(GeometryRuleModelListenerl)
l - the listener to add.
public void removeChangeListener(GeometryRuleModelListenerl)
l - the listener to remove.
public void refresh()
public void refresh(GeometryRulerule)
rule - the rule that changed.
public void serialize(TransformerHandlerhandler) throws SAXException
handler - the handler to output to.
SAXException - if a xml error occurs.
public static List<GeometryRule > deserialize(SAXParser sax, FileInputStream inputStream) throws SAXException , IOException
sax - the parser to use.
inputStream - the input stream to read from.
SAXException - if an error occurred while reading.
IOException - if an error occurred while reading.