Class ProportionalSymbolsLegend

java.lang.Object
org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractLegend
org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractVectorialLegend
org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractClassifiedVectorLegend
org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.VectorialUniqueValueLegend
org.gvsig.symbology.fmap.rendering.ProportionalSymbolsLegend
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 ProportionalSymbolsLegend extends org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.VectorialUniqueValueLegend
Implements a legend which represents the quantitative information (numeric values). This representation is possible thanks to a symbol whose size is different each time (depending on the numeric values and if we want to use normalization or not).
Author:
jaume dominguez faus - jaume.dominguez@iver.es, jldominguez
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     

    Fields inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.VectorialUniqueValueLegend

    VECTORIAL_UNIQUE_VALUE_LEGEND_PERSISTENCE_DEFINITION_NAME

    Fields inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractClassifiedVectorLegend

    CLASSIFIED_VECTOR_LEGEND_PERSISTENCE_DEFINITION_NAME

    Fields inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractVectorialLegend

    VECTORIAL_LEGEND_PERSISTENCE_DEFINITION_NAME

    Fields inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractLegend

    LEGEND_PERSISTENCE_DEFINITION_NAME

    Fields inherited from interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend

    LEGEND_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
    Gets the background symbol which only can appear when the shapetype of the layer is polygonal
    double
    Obtains the variable which represents the maximum value of the classifying field that is used to calculate the size of the symbol
    double
    Obtains the maximum size for the symbol
    double
    Obtains the variable which represents the minimum value of the classifying field that is used to calculate the size of the symbol
    double
    Obtains the minimum size for the symbol
    Obtains the classifying field name to be used to calculate the size of the symbol when the user is doing it with a normalization value.
    org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
    getSymbolByFeature(org.gvsig.fmap.dal.feature.Feature feat)
     
    org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
     
    org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol[]
     
    int
    Obtains the shapetype of the template symbol
    boolean
    Obtains the boolean which is true if the user wants to calculate the size of the symbol using a normalization field.
    Obtains the classifying field name to be used to calculate the size of the symbol
    org.gvsig.fmap.mapcontext.rendering.legend.ZSort
     
    static boolean
    isLinear(int ty)
     
    static boolean
    isPoint(int ty)
     
    static boolean
    isPolygonal(int ty)
     
    void
    loadFromState(org.gvsig.tools.persistence.PersistentState state)
     
    void
    saveToState(org.gvsig.tools.persistence.PersistentState state)
     
    void
    setBackgroundSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol backgroundSymbol)
    Sets the background symbol which is used only when the shapetype of the layer is polygonal
    void
     
    void
    setMaxFeature(double maxFeature)
    Sets the variable which represents the maximum value of the classifying field that is used to calculate the size of the symbol
    void
    setMaxSize(double maxSize)
    Sets the maximum size for the symbol
    void
    setMinFeature(double minFeature)
    Sets the variable which represents the minimum value of the classifying field that is used to calculate the size of the symbol
    void
    setMinSize(double minSize)
    Sets the minimum size for the symbol
    void
    setNormalizationField(String normalizationField)
    Sets the classifying field name to be used to calculate the size of the symbol when the user is doing it with a normalization value.
    void
    Sets the shapetype of the template symbol
    void
    setUseNormalization(boolean useNormalization)
    Sets the boolean which is true if the user wants to calculate the size of the symbol using a normalization field.
    void
    setValueField(String valueField)
    Sets the classifying field name to be used to calculate the size of the symbol
    void
    setZSort(org.gvsig.fmap.mapcontext.rendering.legend.ZSort zSort)
     

    Methods inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.VectorialUniqueValueLegend

    addSymbol, clear, clone, delAllSymbols, delSymbol, getClassName, getColorScheme, getDefaultSymbol, getDescriptions, getShapeType, getSymbolKey, getValues, isUseDefaultSymbol, replace, setClassifyingFieldTypes, setColorScheme, setDefaultSymbol, setShapeType, setValueSymbolByID, useDefaultSymbol

    Methods inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractClassifiedVectorLegend

    fireClassifiedSymbolChangeEvent, fireLegendClearEvent, getClassifyingFieldNames, getClassifyingFieldTypes, getRequiredFeatureAttributeNames, isSuitableForShapeType

    Methods inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractVectorialLegend

    draw, draw, draw, drawFeatures, internalDraw, isDrawSymbolInEeachPrimitive, print, print, setDrawSymbolInEeachPrimitive

    Methods inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractLegend

    addDrawingObserver, addLegendListener, addObserver, beginComplexNotification, cloneLegend, countObservers, deleteDrawingObserver, deleteDrawingObservers, deleteObserver, disableNotifications, enableNotifications, endComplexNotification, fireDefaultSymbolChangedEvent, getListeners, getManager, getSymbolManager, inComplex, isEnabledNotifications, notifyObservers, notifyObservers, removeLegendListener

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gvsig.fmap.mapcontext.rendering.legend.DrawingObservable

    addDrawingObserver, deleteDrawingObserver, deleteDrawingObservers

    Methods inherited from interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend

    getClassifyingFieldNames, getClassifyingFieldTypes

    Methods inherited from interface org.gvsig.fmap.mapcontext.rendering.legend.ILegend

    addLegendListener, cloneLegend, fireDefaultSymbolChangedEvent, getListeners, removeLegendListener

    Methods inherited from interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend

    draw, draw, isSuitableForShapeType, print, print
  • Field Details

    • PROPORTIONAL_SYMBOL_LEGEND_NAME

      public static final String PROPORTIONAL_SYMBOL_LEGEND_NAME
      See Also:
    • PROPORTIONAL_SYMBOL_LEGEND_PERSISTENCE_DEFINITION_NAME

      public static final String PROPORTIONAL_SYMBOL_LEGEND_PERSISTENCE_DEFINITION_NAME
      See Also:
  • Constructor Details

    • ProportionalSymbolsLegend

      public ProportionalSymbolsLegend()
  • Method Details

    • setClassifyingFieldNames

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

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getSymbolByValue(Object key)
      Specified by:
      getSymbolByValue in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend
      Overrides:
      getSymbolByValue in class org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.VectorialUniqueValueLegend
    • 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
      Overrides:
      getSymbolByFeature in class org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.VectorialUniqueValueLegend
    • isPolygonal

      public static boolean isPolygonal(int ty)
    • isLinear

      public static boolean isLinear(int ty)
    • isPoint

      public static boolean isPoint(int ty)
    • getBackgroundSymbol

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getBackgroundSymbol()
      Gets the background symbol which only can appear when the shapetype of the layer is polygonal
      Returns:
      ISymbol the symbol for the background
    • setBackgroundSymbol

      public void setBackgroundSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol backgroundSymbol)
      Sets the background symbol which is used only when the shapetype of the layer is polygonal
      Parameters:
      backgroundSymbol - the symbol for the background
    • getValueField

      public String getValueField()
      Obtains the classifying field name to be used to calculate the size of the symbol
      Returns:
      String the name of the field
    • setValueField

      public void setValueField(String valueField)
      Sets the classifying field name to be used to calculate the size of the symbol
      Parameters:
      String - the name of the field
    • getNormalizationField

      public String getNormalizationField()
      Obtains the classifying field name to be used to calculate the size of the symbol when the user is doing it with a normalization value.
      Returns:
      String the name of the field
    • setNormalizationField

      public void setNormalizationField(String normalizationField)
      Sets the classifying field name to be used to calculate the size of the symbol when the user is doing it with a normalization value.
      Parameters:
      String - the name of the field
    • getMinSize

      public double getMinSize()
      Obtains the minimum size for the symbol
      Returns:
      double the minimum size for the symbol
    • setMinSize

      public void setMinSize(double minSize)
      Sets the minimum size for the symbol
      Parameters:
      minSize - the minimum size for the symbol
    • getMaxSize

      public double getMaxSize()
      Obtains the maximum size for the symbol
      Returns:
      double the minimum size for the symbol
    • setMaxSize

      public void setMaxSize(double maxSize)
      Sets the maximum size for the symbol
      Parameters:
      maxSize - the minimum size for the symbol
    • getTemplateShapeType

      public int getTemplateShapeType()
      Obtains the shapetype of the template symbol
      Returns:
      int shape type for the template symbol
    • setTemplateShapeType

      public void setTemplateShapeType(int tst)
      Sets the shapetype of the template symbol
      Parameters:
      templateShapeType - shape type for the template symbol
    • getUseNormalization

      public boolean getUseNormalization()
      Obtains the boolean which is true if the user wants to calculate the size of the symbol using a normalization field.
      Returns:
      boolean true if the user wants normalization.Otherwise, false.
    • setUseNormalization

      public void setUseNormalization(boolean useNormalization)
      Sets the boolean which is true if the user wants to calculate the size of the symbol using a normalization field.
      Parameters:
      useNormalization - true if the user wants normalization.Otherwise, false.
    • getMaxFeature

      public double getMaxFeature()
      Obtains the variable which represents the maximum value of the classifying field that is used to calculate the size of the symbol
      Returns:
      double the maximum value of the classifying field
    • setMaxFeature

      public void setMaxFeature(double maxFeature)
      Sets the variable which represents the maximum value of the classifying field that is used to calculate the size of the symbol
      Parameters:
      maxFeature -
    • getMinFeature

      public double getMinFeature()
      Obtains the variable which represents the minimum value of the classifying field that is used to calculate the size of the symbol
      Returns:
      double the minimum value of the classifying field
    • setMinFeature

      public void setMinFeature(double minFeature)
      Sets the variable which represents the minimum value of the classifying field that is used to calculate the size of the symbol
      Parameters:
      minFeature -
    • getSymbols

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol[] getSymbols()
      Specified by:
      getSymbols in interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedLegend
      Overrides:
      getSymbols in class org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.VectorialUniqueValueLegend
    • getZSort

      public org.gvsig.fmap.mapcontext.rendering.legend.ZSort getZSort()
      Specified by:
      getZSort in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend
      Overrides:
      getZSort in class org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractVectorialLegend
    • setZSort

      public void setZSort(org.gvsig.fmap.mapcontext.rendering.legend.ZSort zSort)
      Specified by:
      setZSort in interface org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend
      Overrides:
      setZSort in class org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractVectorialLegend
    • 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 org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.VectorialUniqueValueLegend
      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 org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.VectorialUniqueValueLegend
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException