Class VectorialUniqueValueLegend

All Implemented Interfaces:
Cloneable, org.gvsig.fmap.mapcontext.rendering.legend.DrawingObservable, org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedLegend, org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend, org.gvsig.fmap.mapcontext.rendering.legend.ILegend, org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend, org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend, org.gvsig.fmap.mapcontext.rendering.legend.Legend, org.gvsig.tools.lang.Cloneable, org.gvsig.tools.persistence.Persistent

public class VectorialUniqueValueLegend extends AbstractClassifiedVectorLegend implements org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend
Vectorial legend for unique values
Author:
Vicente Caballero Navarro, 2009- César Ordiñana - gvSIG team
  • Field Details

    • VECTORIAL_UNIQUE_VALUE_LEGEND_PERSISTENCE_DEFINITION_NAME

      public static final String VECTORIAL_UNIQUE_VALUE_LEGEND_PERSISTENCE_DEFINITION_NAME
      See Also:
  • Constructor Details

    • VectorialUniqueValueLegend

      public VectorialUniqueValueLegend()
    • VectorialUniqueValueLegend

      public VectorialUniqueValueLegend(int shapeType)
      Constructor method
      Parameters:
      shapeType - Type of the shape.
  • Method Details

    • setShapeType

      public void setShapeType(int shapeType)
      Specified by:
      setShapeType in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend
    • setValueSymbolByID

      public void setValueSymbolByID(int id, org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol)
      Specified by:
      setValueSymbolByID in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend
    • getValues

      public Object[] getValues()
      Specified by:
      getValues in interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedLegend
    • addSymbol

      public void addSymbol(Object key, org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol)
      Specified by:
      addSymbol in interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend
    • delAllSymbols

      public void delAllSymbols()
    • clear

      public void clear()
      Specified by:
      clear in interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend
    • getDescriptions

      public String[] getDescriptions()
      Specified by:
      getDescriptions in interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedLegend
    • getSymbols

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol[] getSymbols()
      Specified by:
      getSymbols in interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedLegend
    • setClassifyingFieldNames

      public void setClassifyingFieldNames(String[] fNames)
      Specified by:
      setClassifyingFieldNames in interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend
      Overrides:
      setClassifyingFieldNames in class AbstractClassifiedVectorLegend
    • getSymbolByFeature

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getSymbolByFeature(org.gvsig.fmap.dal.feature.Feature feat) throws org.gvsig.fmap.mapcontext.MapContextException
      Devuelve un símbolo a partir de una IFeature. OJO!! Cuando usamos un feature iterator de base de datos el único campo que vendrá rellenado es el de fieldID. Los demás vendrán a nulos para ahorra tiempo de creación.
      Specified by:
      getSymbolByFeature in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend
      Parameters:
      feat - IFeature
      Returns:
      Símbolo.
      Throws:
      org.gvsig.fmap.mapcontext.MapContextException
    • getDefaultSymbol

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getDefaultSymbol()
      Specified by:
      getDefaultSymbol in interface org.gvsig.fmap.mapcontext.rendering.legend.ILegend
      Specified by:
      getDefaultSymbol in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend
    • setDefaultSymbol

      public void setDefaultSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol s)
      Specified by:
      setDefaultSymbol in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend
    • getSymbolByValue

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getSymbolByValue(Object key)
      Specified by:
      getSymbolByValue in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend
    • getSymbolKey

      public Object getSymbolKey(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol)
      Specified by:
      getSymbolKey in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend
    • getShapeType

      public int getShapeType()
      Specified by:
      getShapeType in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend
    • useDefaultSymbol

      public void useDefaultSymbol(boolean b)
      Specified by:
      useDefaultSymbol in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend
    • isUseDefaultSymbol

      public boolean isUseDefaultSymbol()
      Devuelve si se utiliza o no el resto de valores para representarse.
      Specified by:
      isUseDefaultSymbol in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend
      Returns:
      True si se utiliza el resto de valores.
    • delSymbol

      public void delSymbol(Object key)
      Specified by:
      delSymbol in interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend
    • getClassName

      public String getClassName()
    • replace

      public void replace(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol oldSymbol, org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol newSymbol)
      Specified by:
      replace in interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend
    • getColorScheme

      public Color[] getColorScheme()
      Specified by:
      getColorScheme in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend
    • setColorScheme

      public void setColorScheme(Color[] cc)
      Specified by:
      setColorScheme in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend
    • clone

      public Object clone() throws CloneNotSupportedException
      Specified by:
      clone in interface org.gvsig.tools.lang.Cloneable
      Overrides:
      clone in class AbstractClassifiedVectorLegend
      Throws:
      CloneNotSupportedException
    • setClassifyingFieldTypes

      public void setClassifyingFieldTypes(int[] fieldTypes)
      Specified by:
      setClassifyingFieldTypes in interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend
      Overrides:
      setClassifyingFieldTypes in class AbstractClassifiedVectorLegend
    • loadFromState

      public void loadFromState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException
      Specified by:
      loadFromState in interface org.gvsig.tools.persistence.Persistent
      Overrides:
      loadFromState in class AbstractClassifiedVectorLegend
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException
    • saveToState

      public void saveToState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException
      Specified by:
      saveToState in interface org.gvsig.tools.persistence.Persistent
      Overrides:
      saveToState in class AbstractClassifiedVectorLegend
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException