Package org.gvsig.app.gui.styling
Class StyleSelectorListModel
java.lang.Object
org.gvsig.app.gui.styling.StyleSelectorListModel
- All Implemented Interfaces:
ListModel,org.gvsig.utils.listManager.ListModel
Implements a list to select styles.This list
has the property that allows the user to stablish a filter to accept or reject
elements for it from a directory which is also specified when the StyleSelectorModel
is created.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Vector<org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle> protected FileFilterprotected Stringprotected Fileprotected SelectorFilterstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionStyleSelectorListModel(File dir, SelectorFilter filter, String fileExtension) Creates a new instance of the model for the list in the Style Selector window where the styles are stored in the dir (root directory) param. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidgetElementAt(int index) Vector<org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle> TODO: use the new Persistence API.intgetSize()voidremove(int i) void
-
Field Details
-
STYLE_FILE_EXTENSION
- See Also:
-
elements
-
folder
-
fFilter
-
sFilter
-
fileExt
-
-
Constructor Details
-
StyleSelectorListModel
Creates a new instance of the model for the list in the Style Selector window where the styles are stored in the dir (root directory) param.
The currentElement defines which element is pre-selected.
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 styles 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.
- Parameters:
dir- , the root dir where styles are located.filter- , the filter used to show or hide some elements.fileExtension- , file extension used for the files to be parsed.currentElemet- , the element to be pre-selected.
-
-
Method Details
-
getObjects
TODO: use the new Persistence API.- Specified by:
getObjectsin interfaceorg.gvsig.utils.listManager.ListModel
-
add
- Specified by:
addin interfaceorg.gvsig.utils.listManager.ListModel
-
getSize
public int getSize() -
getElementAt
- Specified by:
getElementAtin interfaceListModel
-
addListDataListener
- Specified by:
addListDataListenerin interfaceListModel
-
removeListDataListener
- Specified by:
removeListDataListenerin interfaceListModel
-
remove
- Specified by:
removein interfaceorg.gvsig.utils.listManager.ListModel- Throws:
ArrayIndexOutOfBoundsException
-
insertAt
- Specified by:
insertAtin interfaceorg.gvsig.utils.listManager.ListModel
-