com.iver.cit.gvsig.fmap.rendering
Class VectorialIntervalLegend

java.lang.Object
  extended bycom.iver.cit.gvsig.fmap.rendering.VectorialIntervalLegend
All Implemented Interfaces:
ClassifiedLegend, ClassifiedLegendInfo, IntervalLegend, Legend, VectorialLegend

public class VectorialIntervalLegend
extends java.lang.Object
implements IntervalLegend, VectorialLegend

Leyenda Vectorial por intervalos.

Author:
Vicente Caballero Navarro

Constructor Summary
VectorialIntervalLegend()
          Crea un nuevo VectorialIntervalLegend.
VectorialIntervalLegend(int type)
          Crea un nuevo VectorialIntervalLegend.
 
Method Summary
 void addSymbol(java.lang.Object key, FSymbol symbol)
           
 void changeInterval(int index, FInterval newInterval)
          Cambia el intervalo index-ésimo del array de intervalos
 void clear()
          Elimina toda la información de clasificación: intervalos o valores
 Legend cloneLegend()
          Clona la leyenda.
 FSymbol getDefaultSymbol()
          Obtiene el símbolo por defecto de la leyenda
 java.lang.String[] getDescriptions()
          Obtiene las descripciones de las clases que hay en la clasificación
 java.awt.Color getEndColor()
          Devuelve el color final.
 java.lang.String getFieldName()
          Devuelve el nombre del campo.
 FInterval getInterval(Value v)
          Devuelve el intervalo a partir del valor.
 java.lang.String getLabelField()
          Obtiene el índice del campo que sirve de etiquetado o -1 si no ha sido etiquetado
 java.lang.String getLabelHeightField()
          Devuelve el alto de campo.
 java.lang.String getLabelRotationField()
          Devuelve la rotación.
 int getShapeType()
          Devuelve el tipo de shape.
 java.awt.Color getStartColor()
          Devuelve el color inicial.
 FSymbol getSymbol(int recordIndex)
          Devuelve el símbolo asociado al objeto que se pasa como parámetro.
 FSymbol getSymbolByInterval(FInterval key)
          Devuelve el símbolo a partir del intervalo.
 FSymbol[] getSymbols()
          Obtiene los símbolos de cada clase de la clasificación para el usuario.
 java.lang.Object[] getValues()
          Obtiene los valores relacionados con cada clase de la clasificación
 XMLEntity getXMLEntity()
          DOCUMENT ME!
 void setDataSource(DataSource ds)
          Inserta el DataSource.
 void setDefaultSymbol(FSymbol s)
          Establece el símbolo por defecto del Legend.
 void setEndColor(java.awt.Color endColor)
          Inserta el color final.
 void setFieldName(java.lang.String str)
          Inserta el nombre del campo.
 void setIntervalSymbol(FInterval interval, FSymbol symbol)
          Establece el símbolo asociado al intervalo
 void setLabelField(java.lang.String fieldName)
          Establece el campo por el que se etiqueta. -1 quita el etiquetado
 void setLabelHeightField(java.lang.String str)
          Inserta el alto del campo.
 void setLabelRotationField(java.lang.String str)
          Inserta la rotación del campo.
 void setShapeType(int shapeType)
          Inserta el tipo de shape.
 void setStartColor(java.awt.Color startColor)
          Inserta el color inicial.
 void setXMLEntity(XMLEntity xml)
          Inserta los atributos del XMLEntity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorialIntervalLegend

public VectorialIntervalLegend()
Crea un nuevo VectorialIntervalLegend.


VectorialIntervalLegend

public VectorialIntervalLegend(int type)
Crea un nuevo VectorialIntervalLegend.

Parameters:
type - tipo de shape.
Method Detail

addSymbol

public void addSymbol(java.lang.Object key,
                      FSymbol symbol)
See Also:
UniqueValueLegend.addSymbol(java.lang.Object, FSymbol)

getSymbol

public FSymbol getSymbol(int recordIndex)
                  throws DriverException
Description copied from interface: VectorialLegend
Devuelve el símbolo asociado al objeto que se pasa como parámetro. Si se pasa null se devuelve el símbolo por defecto. En un Legend de símbolo único siempre se devuelve dicho símbolo

Specified by:
getSymbol in interface VectorialLegend
Parameters:
recordIndex - índice
Returns:
Símbolo.
Throws:
DriverException
See Also:
VectorialLegend.getSymbol(int)

getSymbolByInterval

public FSymbol getSymbolByInterval(FInterval key)
Devuelve el símbolo a partir del intervalo.

Parameters:
key - intervalo.
Returns:
símbolo.

getDescriptions

public java.lang.String[] getDescriptions()
Description copied from interface: ClassifiedLegendInfo
Obtiene las descripciones de las clases que hay en la clasificación

Specified by:
getDescriptions in interface ClassifiedLegendInfo
Returns:
DOCUMENT ME!
See Also:
ClassifiedLegendInfo.getDescriptions()

getValues

public java.lang.Object[] getValues()
Description copied from interface: ClassifiedLegendInfo
Obtiene los valores relacionados con cada clase de la clasificación

Specified by:
getValues in interface ClassifiedLegendInfo
Returns:
DOCUMENT ME!
See Also:
ClassifiedLegendInfo.getValues()

setIntervalSymbol

public void setIntervalSymbol(FInterval interval,
                              FSymbol symbol)
Description copied from interface: IntervalLegend
Establece el símbolo asociado al intervalo

Specified by:
setIntervalSymbol in interface IntervalLegend
Parameters:
interval - Intervalo.
symbol - Símbolo.
See Also:
com.iver.cit.gvsig.fmap.rendering.IntervalLegend#setIntervalSymbol(com.iver.cit.gvsig.fmap.rendering.FInterval, org.geotools.renderer.style.Style2D)

changeInterval

public void changeInterval(int index,
                           FInterval newInterval)
Description copied from interface: IntervalLegend
Cambia el intervalo index-ésimo del array de intervalos

Specified by:
changeInterval in interface IntervalLegend
Parameters:
index - índice.
newInterval - nuevo intervalo.
See Also:
IntervalLegend.changeInterval(int, com.iver.cit.gvsig.fmap.rendering.FInterval)

clear

public void clear()
Description copied from interface: ClassifiedLegend
Elimina toda la información de clasificación: intervalos o valores

Specified by:
clear in interface ClassifiedLegend
See Also:
ClassifiedLegend.clear()

getSymbols

public FSymbol[] getSymbols()
Description copied from interface: ClassifiedLegendInfo
Obtiene los símbolos de cada clase de la clasificación para el usuario.

Specified by:
getSymbols in interface ClassifiedLegendInfo
Returns:
DOCUMENT ME!
See Also:
ClassifiedLegendInfo.getSymbols()

getFieldName

public java.lang.String getFieldName()
Description copied from interface: ClassifiedLegend
Devuelve el nombre del campo.

Specified by:
getFieldName in interface ClassifiedLegend
Returns:
Nombre del campo.
See Also:
ClassifiedLegend.getFieldName()

setDefaultSymbol

public void setDefaultSymbol(FSymbol s)
Description copied from interface: VectorialLegend
Establece el símbolo por defecto del Legend. En un Legend de símbolo único, el símbolo se establece invocando este método

Specified by:
setDefaultSymbol in interface VectorialLegend
Parameters:
s - Símbolo por defecto.
See Also:
com.iver.cit.gvsig.fmap.rendering.VectorialLegend#setDefaultSymbol(com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D)

setFieldName

public void setFieldName(java.lang.String str)
Description copied from interface: ClassifiedLegend
Inserta el nombre del campo.

Specified by:
setFieldName in interface ClassifiedLegend
Parameters:
str - Nombre del campo.
See Also:
ClassifiedLegend.setFieldName(String)

setLabelField

public void setLabelField(java.lang.String fieldName)
Description copied from interface: VectorialLegend
Establece el campo por el que se etiqueta. -1 quita el etiquetado

Specified by:
setLabelField in interface VectorialLegend
Parameters:
fieldName - Nombre del campo.
See Also:
com.iver.cit.gvsig.fmap.rendering.Legend#setLabelField(int)

getLabelField

public java.lang.String getLabelField()
Description copied from interface: VectorialLegend
Obtiene el índice del campo que sirve de etiquetado o -1 si no ha sido etiquetado

Specified by:
getLabelField in interface VectorialLegend
Returns:
nombre del campo.
See Also:
com.iver.cit.gvsig.fmap.rendering.Legend#getLabelField()

getDefaultSymbol

public FSymbol getDefaultSymbol()
Description copied from interface: Legend
Obtiene el símbolo por defecto de la leyenda

Specified by:
getDefaultSymbol in interface Legend
Returns:
Símbolo por defecto.
See Also:
Legend.getDefaultSymbol()

getXMLEntity

public XMLEntity getXMLEntity()
DOCUMENT ME!

Specified by:
getXMLEntity in interface Legend
Returns:
DOCUMENT ME!
See Also:
Legend.getXMLEntity()

setXMLEntity

public void setXMLEntity(XMLEntity xml)
Inserta los atributos del XMLEntity.

Specified by:
setXMLEntity in interface VectorialLegend
Parameters:
xml - XMLEntity.

cloneLegend

public Legend cloneLegend()
                   throws XMLException
Description copied from interface: Legend
Clona la leyenda.

Specified by:
cloneLegend in interface Legend
Returns:
Leyenda cloanada.
Throws:
XMLException
See Also:
Legend.cloneLegend()

setDataSource

public void setDataSource(DataSource ds)
                   throws FieldNotFoundException,
                          DriverException
Description copied from interface: VectorialLegend
Inserta el DataSource.

Specified by:
setDataSource in interface VectorialLegend
Parameters:
ds - DataSource.
Throws:
DriverException - Cuando falle el driver.
FieldNotFoundException

getInterval

public FInterval getInterval(Value v)
Devuelve el intervalo a partir del valor.

Parameters:
v - valor.
Returns:
intervalo.

getEndColor

public java.awt.Color getEndColor()
Devuelve el color final.

Returns:
color final.

setEndColor

public void setEndColor(java.awt.Color endColor)
Inserta el color final.

Parameters:
endColor - Color final.

getStartColor

public java.awt.Color getStartColor()
Devuelve el color inicial.

Returns:
Color inicial.

setStartColor

public void setStartColor(java.awt.Color startColor)
Inserta el color inicial.

Parameters:
startColor - Color inicial.

getShapeType

public int getShapeType()
Description copied from interface: VectorialLegend
Devuelve el tipo de shape.

Specified by:
getShapeType in interface VectorialLegend
Returns:
Devuelve el tipo de shapes para los que está preparada la leyenda

setShapeType

public void setShapeType(int shapeType)
Description copied from interface: VectorialLegend
Inserta el tipo de shape.

Specified by:
setShapeType in interface VectorialLegend
Parameters:
shapeType - Tipo de shape.

getLabelHeightField

public java.lang.String getLabelHeightField()
Description copied from interface: VectorialLegend
Devuelve el alto de campo.

Specified by:
getLabelHeightField in interface VectorialLegend
Returns:
alto.

setLabelHeightField

public void setLabelHeightField(java.lang.String str)
Inserta el alto del campo.

Parameters:
str - alto.

getLabelRotationField

public java.lang.String getLabelRotationField()
Description copied from interface: VectorialLegend
Devuelve la rotación.

Specified by:
getLabelRotationField in interface VectorialLegend
Returns:
Rotación.

setLabelRotationField

public void setLabelRotationField(java.lang.String str)
Inserta la rotación del campo.

Parameters:
str - Rotación.