Class AbstractIntervalLegend

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.IVectorialIntervalLegend, 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:
VectorialIntervalLegend

public abstract class AbstractIntervalLegend extends AbstractClassifiedVectorLegend implements org.gvsig.fmap.mapcontext.rendering.legend.IVectorialIntervalLegend
Author:
2005-2008 jaume dominguez faus - jaume.dominguez@iver.es, 2009- César Ordiñana - gvSIG team
  • Field Details

    • INTERVAL_LEGEND_PERSISTENCE_DEFINITION_NAME

      public static final String INTERVAL_LEGEND_PERSISTENCE_DEFINITION_NAME
      See Also:
    • keys

      protected List<Object> keys
    • defaultSymbol

      protected org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol defaultSymbol
    • intervalType

      protected int intervalType
    • useDefaultSymbol

      protected boolean useDefaultSymbol
    • EQUAL_INTERVALS

      public static final int EQUAL_INTERVALS
      See Also:
    • NATURAL_INTERVALS

      public static final int NATURAL_INTERVALS
      See Also:
    • QUANTILE_INTERVALS

      public static final int QUANTILE_INTERVALS
      See Also:
    • symbols

      protected Map<Object,org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol> symbols
  • Constructor Details

    • AbstractIntervalLegend

      public AbstractIntervalLegend()
  • Method Details

    • 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
    • getSymbol

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getSymbol(org.gvsig.fmap.dal.feature.FeatureReference featureID) throws org.gvsig.fmap.mapcontext.MapContextException, org.gvsig.fmap.dal.exception.DataException
      Throws:
      org.gvsig.fmap.mapcontext.MapContextException
      org.gvsig.fmap.dal.exception.DataException
    • getSymbolByFeature

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getSymbolByFeature(org.gvsig.fmap.dal.feature.Feature feat) throws org.gvsig.fmap.mapcontext.MapContextException
      Specified by:
      getSymbolByFeature in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend
      Throws:
      org.gvsig.fmap.mapcontext.MapContextException
    • calculateIntervals

      public org.gvsig.fmap.mapcontext.rendering.legend.IInterval[] calculateIntervals(org.gvsig.fmap.dal.feature.FeatureStore featureStore, String fieldName, int numIntervalos, int shapeType) throws org.gvsig.fmap.dal.exception.DataException
      Specified by:
      calculateIntervals in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorialIntervalLegend
      Throws:
      org.gvsig.fmap.dal.exception.DataException
    • getSymbolByInterval

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getSymbolByInterval(org.gvsig.fmap.mapcontext.rendering.legend.IInterval key)
      Specified by:
      getSymbolByInterval in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorialIntervalLegend
    • getDescriptions

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

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

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

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

      public void setDefaultSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol s)
      Specified by:
      setDefaultSymbol in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorialIntervalLegend
      Specified by:
      setDefaultSymbol in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend
    • 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
    • getInterval

      public org.gvsig.fmap.mapcontext.rendering.legend.IInterval getInterval(Object v)
      Specified by:
      getInterval in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorialIntervalLegend
    • setIntervalType

      public void setIntervalType(int intervalType)
      Specified by:
      setIntervalType in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorialIntervalLegend
    • getIntervalType

      public int getIntervalType()
      Specified by:
      getIntervalType in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorialIntervalLegend
    • 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
    • delSymbol

      public void delSymbol(Object obj)
      Specified by:
      delSymbol in interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend
    • 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
    • clone

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

      public Map<org.gvsig.fmap.mapcontext.rendering.legend.IInterval,org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol> createSymbols(org.gvsig.fmap.mapcontext.rendering.legend.IInterval[] intervals)
      Specified by:
      createSymbols in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorialIntervalLegend
    • setIntervals

      public void setIntervals(org.gvsig.fmap.mapcontext.rendering.legend.IInterval[] intervals)
      Specified by:
      setIntervals in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorialIntervalLegend