Class AbstractClassifiedVectorLegend

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.IVectorLegend, org.gvsig.fmap.mapcontext.rendering.legend.Legend, org.gvsig.tools.lang.Cloneable, org.gvsig.tools.persistence.Persistent
Direct Known Subclasses:
AbstractIntervalLegend, VectorialUniqueValueLegend

public abstract class AbstractClassifiedVectorLegend extends AbstractVectorialLegend implements org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend
Abstract class that implements the interface for legends composed by classified symbols.It will have two methods that will be executed depending on the action that had been done with the legend (addition of a new symbol or clear the legend).
Author:
gvSIG team
  • Field Details

    • CLASSIFIED_VECTOR_LEGEND_PERSISTENCE_DEFINITION_NAME

      public static final String CLASSIFIED_VECTOR_LEGEND_PERSISTENCE_DEFINITION_NAME
      See Also:
  • Constructor Details

    • AbstractClassifiedVectorLegend

      public AbstractClassifiedVectorLegend()
  • Method Details

    • fireClassifiedSymbolChangeEvent

      public void fireClassifiedSymbolChangeEvent(org.gvsig.fmap.mapcontext.rendering.legend.events.SymbolLegendEvent event)
      Looks for a change in a classified symbol of a legend. To perform it, the Array of LegendListeners is scaned and when the corresponding listener is true, the method is invoked and the change will be done.
      Parameters:
      event -
    • fireLegendClearEvent

      public void fireLegendClearEvent(org.gvsig.fmap.mapcontext.rendering.legend.events.LegendClearEvent event)
      Looks for a change in a legend of classified symbols. In this case if the specific legend is cleared.
      Parameters:
      event -
    • getClassifyingFieldNames

      public String[] getClassifyingFieldNames()
      Specified by:
      getClassifyingFieldNames in interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend
    • setClassifyingFieldNames

      public void setClassifyingFieldNames(String[] fieldNames)
      Specified by:
      setClassifyingFieldNames in interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend
    • getClassifyingFieldTypes

      public int[] getClassifyingFieldTypes()
      Specified by:
      getClassifyingFieldTypes in interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend
    • setClassifyingFieldTypes

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

      public boolean isSuitableForShapeType(int shapeType)
      Specified by:
      isSuitableForShapeType in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend
    • 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