public class StyleHistoryListModel extends Object implements ListModel, ConvertableToXML
| Modifier and Type | Field and Description |
|---|---|
static String |
STYLE_ROOT |
TYPE_ATTRIBUTE| Constructor and Description |
|---|
StyleHistoryListModel()
Constructor with empty stylelist.
|
StyleHistoryListModel(File f)
Constructor that creates a list of styles from the delivered XML-file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListDataListener(ListDataListener l) |
void |
addStyle(Style newStyle)
Adds a Style to the listmodel.
|
void |
clear()
Deletes all saved styles.
|
boolean |
elementEquals(Style compare)
Checks if there's already an equal style inside the stylelist.
|
Object |
getElementAt(int index)
Returns the style from a specific position inside the stylelist.
|
int |
getSize()
Returns the current count of saved styles.
|
void |
initFromElement(org.jdom.Element element)
Initialies an object that implements the ConvertableToXML interface from a DOM Element.
|
void |
removeListDataListener(ListDataListener l) |
org.jdom.Element |
toElement()
Returns this model as JDOM-element with all styles as children.
|
public static final String STYLE_ROOT
public StyleHistoryListModel()
public void addStyle(Style newStyle)
newStyle - e the style to addpublic Object getElementAt(int index)
getElementAt in interface ListModelindex - position of the desired stylepublic int getSize()
public void clear()
public boolean elementEquals(Style compare)
compare - Style that should be compared with the listpublic org.jdom.Element toElement()
toElement in interface ConvertableToXMLpublic void addListDataListener(ListDataListener l)
addListDataListener in interface ListModelpublic void removeListDataListener(ListDataListener l)
removeListDataListener in interface ListModelpublic void initFromElement(org.jdom.Element element)
throws Exception
ConvertableToXMLinitFromElement in interface ConvertableToXMLelement - the elemen to be reconstructedException - if the object could not be initializedCopyright © 2012–2025 cismet GmbH. All rights reserved.