All Implemented Interfaces:
Cloneable, org.gvsig.fmap.mapcontext.rendering.legend.DrawingObservable, org.gvsig.fmap.mapcontext.rendering.legend.ILegend, org.gvsig.fmap.mapcontext.rendering.legend.ISingleSymbolLegend, 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 SingleSymbolLegend extends AbstractVectorialLegend implements org.gvsig.fmap.mapcontext.rendering.legend.ISingleSymbolLegend
Implements a legend composed by single symbols.
  • Field Details

    • SINGLE_SYMBOL_PERSISTENCE_DEFINITION_NAME

      public static final String SINGLE_SYMBOL_PERSISTENCE_DEFINITION_NAME
      See Also:
  • Constructor Details

    • SingleSymbolLegend

      public SingleSymbolLegend()
      Constructor method, needed by persistence.
    • SingleSymbolLegend

      public SingleSymbolLegend(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol style)
      Convenience fast constructor.
      Parameters:
      style - Symbol.
  • Method Details

    • setDefaultSymbol

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

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getSymbol(int recordIndex)
    • 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
    • getShapeType

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

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

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getSymbolByFeature(org.gvsig.fmap.dal.feature.Feature feat)
      Specified by:
      getSymbolByFeature 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()
      Specified by:
      isUseDefaultSymbol in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend
    • getClassName

      public String getClassName()
    • isSuitableForShapeType

      public boolean isSuitableForShapeType(int shapeType)
      Specified by:
      isSuitableForShapeType in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend
    • setFeatureStore

      public void setFeatureStore(org.gvsig.fmap.dal.feature.FeatureStore fs) throws org.gvsig.fmap.dal.exception.DataException
      Throws:
      org.gvsig.fmap.dal.exception.DataException
    • getRequiredFeatureAttributeNames

      protected String[] getRequiredFeatureAttributeNames(org.gvsig.fmap.dal.feature.FeatureStore featureStore) throws org.gvsig.fmap.dal.exception.DataException
      Description copied from class: AbstractVectorialLegend
      Returns the names of the Feature attributes required for the ILegend to operate.
      Specified by:
      getRequiredFeatureAttributeNames in class AbstractVectorialLegend
      Parameters:
      featureStore - the store where the Features belong to
      Returns:
      the names of required Feature attribute names
      Throws:
      org.gvsig.fmap.dal.exception.DataException - if there is an error getting the attribute names
    • clone

      public Object clone() throws CloneNotSupportedException
      Specified by:
      clone in interface org.gvsig.tools.lang.Cloneable
      Overrides:
      clone in class AbstractVectorialLegend
      Throws:
      CloneNotSupportedException
    • 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 AbstractVectorialLegend
      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 AbstractVectorialLegend
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException