public class SymbolSelectorListModel extends javax.swing.AbstractListModel implements ListModel, Disposable
| Constructor and Description |
|---|
SymbolSelectorListModel(java.io.File dir,
SelectorFilter filter,
java.lang.String fileExtension)
Creates a new instance of the model for the list in the Symbol Selector
window where the symbols are stored in the dir (root directory)
param.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
accepts(ISymbol symbol) |
void |
add(java.lang.Object o)
Appends the specified element to the end of this Vector
|
void |
dispose()
Disposes the current object, to allow it to close and dispose any used
resources.
|
java.lang.Object |
getElementAt(int index) |
java.util.Vector<ISymbol> |
getObjects()
Obtains the objects that are in the model
|
int |
getSize() |
void |
insertAt(int i,
java.lang.Object o)
Inserts the specified element at the specified position in this Vector.
|
java.lang.Object |
remove(int i)
Removes the element at the specified position in this Vector. shifts any
subsequent elements to the left (subtracts one from their indices).
|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListenerpublic SymbolSelectorListModel(java.io.File dir,
SelectorFilter filter,
java.lang.String fileExtension)
Creates a new instance of the model for the list in the Symbol Selector
window where the symbols are stored in the dir (root directory)
param.
The filter is a user defined filter used to know which elements in
the folder are accepted or rejected for this list and it is used to avoid
mixing marker symbols for polygons for example.
fileExtension param defines the extension of the file to be parsed. This is like that to enable inheritance of this class to other file selector such as StyleSelector.
dir - , the root dir where symbols are located.filter - , the filter used to show or hide some elements.fileExtension - , file extension used for the files to be parsed.public void dispose()
DisposableNOTE:After calling this method, the object may not be usable anymore.
dispose in interface Disposablepublic java.lang.Object remove(int i)
throws java.lang.ArrayIndexOutOfBoundsException
ListModeli - Índice del elemento que se quiere eliminarjava.lang.ArrayIndexOutOfBoundsException - Si el índice está fuera del arraypublic void insertAt(int i,
java.lang.Object o)
ListModeli - index at which the specified element is to be inserted.o - element to be inserted.protected boolean accepts(ISymbol symbol)
public void add(java.lang.Object o)
ListModelo - element to be appended to this Vectorpublic java.util.Vector<ISymbol> getObjects()
ListModelpublic int getSize()
getSize in interface javax.swing.ListModelpublic java.lang.Object getElementAt(int index)
getElementAt in interface javax.swing.ListModel