Class VectorialIntervalLegend

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

public class VectorialIntervalLegend extends AbstractIntervalLegend

VectorialIntervalLegend (which should be better called GraduatedColorLegend) is a legend that allows to classify ranges of values using a color gradient based on a value.

The color gradient will be calculated according the starting color, the ending color and the amount of intervals.

Author:
Vicente Caballero Navarro, 2009- César Ordiñana - gvSIG team
  • Field Details

    • VECTORIAL_INTERVAL_LEGEND_PERSISTENCE_DEFINITION_NAME

      public static final String VECTORIAL_INTERVAL_LEGEND_PERSISTENCE_DEFINITION_NAME
      See Also:
  • Constructor Details

    • VectorialIntervalLegend

      public VectorialIntervalLegend()
      Constructor method
    • VectorialIntervalLegend

      public VectorialIntervalLegend(int type)
      Constructor method
      Parameters:
      type - type of the shape.
  • Method Details

    • getEndColor

      public Color getEndColor()
      Returns the final color
      Returns:
      Color final color.
    • setEndColor

      public void setEndColor(Color endColor)
      Inserts the final color.
      Parameters:
      endColor - final color.
    • getStartColor

      public Color getStartColor()
      Returns the initial color.
      Returns:
      Color initial color.
    • setStartColor

      public void setStartColor(Color startColor)
      Inserts the initial color
      Parameters:
      startColor - initial color.
    • getShapeType

      public int getShapeType()
    • setShapeType

      public void setShapeType(int shapeType)
    • getClassName

      public String getClassName()
    • clone

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

      public org.gvsig.fmap.mapcontext.rendering.legend.IInterval createInterval(double min, double max)
    • 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 AbstractIntervalLegend
      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 AbstractIntervalLegend
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException