Class QuantityByCategoryLegend

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.rendering.QuantityByCategoryLegend
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

public class QuantityByCategoryLegend extends org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractClassifiedVectorLegend
Implements a legend where the user can compare two different characteristics of a region in the map. These two "fields" will be compared, on one side, using a color for the region and , on the other side, using a graduated symbol. Both methods will change (the color or the size of the symbol) depending on the value of the fields.
Author:
jaume dominguez faus - jaume.dominguez@iver.es
  • 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.AbstractClassifiedVectorLegend

    CLASSIFIED_VECTOR_LEGEND_PERSISTENCE_DEFINITION_NAME

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

    LOG, VECTORIAL_LEGEND_PERSISTENCE_DEFINITION_NAME, zSort

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

    LEGEND_PERSISTENCE_DEFINITION_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addSymbol(Object key, org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol)
     
    void
     
     
    void
     
     
    int[]
     
     
    org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.VectorialIntervalLegend
    Obtains the VectorialIntervalLegend
    org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
     
     
    org.gvsig.symbology.fmap.rendering.GraduatedSymbolsLegend
    Obtains the GraduatedSymbolLegend
    int
     
    org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
    getSymbolByFeature(org.gvsig.fmap.dal.feature.Feature feat)
     
    org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol[]
     
     
    static boolean
    isPolygonal(int ty)
     
    boolean
     
    void
    loadFromState(org.gvsig.tools.persistence.PersistentState state)
     
    void
    replace(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol oldSymbol, org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol newSymbol)
     
    void
    saveToState(org.gvsig.tools.persistence.PersistentState state)
     
    void
    Sets the field names required to build this legend.
    void
    setClassifyingFieldTypes(int[] fieldTypes)
     
    void
    setColorRampLegend(org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.VectorialIntervalLegend legend)
     
    void
    setDefaultSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol s)
     
    void
    setGraduateSymbolLegend(org.gvsig.symbology.fmap.rendering.GraduatedSymbolsLegend legend)
     
    void
    setShapeType(int shpt)
     
    void
    useDefaultSymbol(boolean b)
     

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

    fireClassifiedSymbolChangeEvent, fireLegendClearEvent, getRequiredFeatureAttributeNames, isSuitableForShapeType

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

    draw, draw, draw, drawFeatures, getZSort, internalDraw, isDrawSymbolInEeachPrimitive, print, print, setDrawSymbolInEeachPrimitive, setZSort

    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.ILegend

    addLegendListener, cloneLegend, fireDefaultSymbolChangedEvent, getListeners, removeLegendListener

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

    draw, draw, print, print
  • Field Details

    • QUANTITY_BY_CATEGORY_LEGEND_PERSISTENCE_DEFINITION_NAME

      public static final String QUANTITY_BY_CATEGORY_LEGEND_PERSISTENCE_DEFINITION_NAME
      See Also:
    • QUANTITY_BY_CATEGORY_LEGEND_NAME

      public static final String QUANTITY_BY_CATEGORY_LEGEND_NAME
      See Also:
  • Constructor Details

    • QuantityByCategoryLegend

      public QuantityByCategoryLegend()
  • Method Details

    • clear

      public void clear()
    • getClassifyingFieldNames

      public String[] getClassifyingFieldNames()
      Specified by:
      getClassifyingFieldNames in interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend
      Overrides:
      getClassifyingFieldNames in class org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractClassifiedVectorLegend
    • getClassifyingFieldTypes

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

      public void setClassifyingFieldTypes(int[] fieldTypes)
      Specified by:
      setClassifyingFieldTypes in interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend
      Overrides:
      setClassifyingFieldTypes in class org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractClassifiedVectorLegend
    • setClassifyingFieldNames

      public void setClassifyingFieldNames(String[] fieldNames)
      Sets the field names required to build this legend. In this case fieldNames is an array of length 2 where the first element is the field name for the embedded GraduatedSymbolLegend, and the second is the field name for the embedded colorRamp (VectorialIntervalLegend) legend.
      Specified by:
      setClassifyingFieldNames in interface org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend
      Overrides:
      setClassifyingFieldNames in class org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractClassifiedVectorLegend
    • addSymbol

      public void addSymbol(Object key, org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol)
    • delSymbol

      public void delSymbol(Object key)
    • getDescriptions

      public String[] getDescriptions()
    • getSymbols

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol[] getSymbols()
    • getValues

      public Object[] getValues()
    • clone

      public Object clone() throws CloneNotSupportedException
      Specified by:
      clone in interface org.gvsig.tools.lang.Cloneable
      Overrides:
      clone in class org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractClassifiedVectorLegend
      Throws:
      CloneNotSupportedException
    • getGraduatedSymbolsLegend

      public org.gvsig.symbology.fmap.rendering.GraduatedSymbolsLegend getGraduatedSymbolsLegend()
      Obtains the GraduatedSymbolLegend
      Returns:
      GraduatedSymbolLegend
    • getColorRampLegend

      public org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.VectorialIntervalLegend getColorRampLegend()
      Obtains the VectorialIntervalLegend
      Returns:
      VectorialIntervalLegend
    • getSymbolByFeature

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getSymbolByFeature(org.gvsig.fmap.dal.feature.Feature feat) throws org.gvsig.fmap.mapcontext.MapContextException
      Throws:
      org.gvsig.fmap.mapcontext.MapContextException
    • setShapeType

      public void setShapeType(int shpt)
    • isUseDefaultSymbol

      public boolean isUseDefaultSymbol()
    • useDefaultSymbol

      public void useDefaultSymbol(boolean b)
    • setGraduateSymbolLegend

      public void setGraduateSymbolLegend(org.gvsig.symbology.fmap.rendering.GraduatedSymbolsLegend legend)
    • setColorRampLegend

      public void setColorRampLegend(org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.VectorialIntervalLegend legend)
    • getClassName

      public String getClassName()
    • replace

      public void replace(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol oldSymbol, org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol newSymbol)
    • isPolygonal

      public static boolean isPolygonal(int ty)
    • getDefaultSymbol

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getDefaultSymbol()
    • getShapeType

      public int getShapeType()
    • setDefaultSymbol

      public void setDefaultSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol s)
    • 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.AbstractClassifiedVectorLegend
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException
    • 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.AbstractClassifiedVectorLegend
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException