Class SymbolSelectorListModel

java.lang.Object
javax.swing.AbstractListModel
org.gvsig.app.gui.styling.SymbolSelectorListModel
All Implemented Interfaces:
Serializable, ListModel, org.gvsig.tools.dispose.Disposable, org.gvsig.utils.listManager.ListModel

public class SymbolSelectorListModel extends AbstractListModel implements org.gvsig.utils.listManager.ListModel, org.gvsig.tools.dispose.Disposable
Class SymbolSelectorListModel implements a list to select symbols.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 SymbolSelectorModel is created.
See Also:
  • Constructor Details

    • SymbolSelectorListModel

      public SymbolSelectorListModel(File dir, SelectorFilter filter, 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.

      Parameters:
      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.
  • Method Details

    • dispose

      public void dispose()
      Specified by:
      dispose in interface org.gvsig.tools.dispose.Disposable
    • remove

      public Object remove(int i) throws ArrayIndexOutOfBoundsException
      Specified by:
      remove in interface org.gvsig.utils.listManager.ListModel
      Throws:
      ArrayIndexOutOfBoundsException
    • insertAt

      public void insertAt(int i, Object o)
      Specified by:
      insertAt in interface org.gvsig.utils.listManager.ListModel
    • accepts

      protected boolean accepts(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol)
    • add

      public void add(Object o)
      Specified by:
      add in interface org.gvsig.utils.listManager.ListModel
    • getObjects

      public Vector<org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol> getObjects()
      Specified by:
      getObjects in interface org.gvsig.utils.listManager.ListModel
    • getSize

      public int getSize()
      Specified by:
      getSize in interface ListModel
    • getElementAt

      public Object getElementAt(int index)
      Specified by:
      getElementAt in interface ListModel