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

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

public class VectorialUniqueValueLegend
extends java.lang.Object
implements UniqueValueLegend, VectorialLegend

Leyenda vectorial por valores únicos.

Author:
Vicente Caballero Navarro

Constructor Summary
VectorialUniqueValueLegend()
          Crea un nuevo VectorialUniqueValueLegend.
VectorialUniqueValueLegend(int shapeType)
          Crea un nuevo VectorialUniqueValueLegend.
 
Method Summary
 void addSymbol(java.lang.Object key, FSymbol symbol)
          Añade un símbolo.
 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.lang.String getFieldName()
          Devuelve el nombre del campo.
 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.
 FSymbol getSymbol(int recordIndex)
          Devuelve el símbolo asociado al objeto que se pasa como parámetro.
 FSymbol getSymbolByValue(Value key)
          Devuelve un símbolo a partir de su clave.
 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()
          Devuelve el XMLEntity.
 void setDataSource(DataSource ds)
          Inserta el DataSource.
 void setDefaultSymbol(FSymbol s)
          Establece el símbolo por defecto del Legend.
 void setFieldName(java.lang.String str)
          Inserta el nombre del campo.
 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 de campo.
 void setLabelRotationField(java.lang.String str)
          Inserta rotación.
 void setShapeType(int shapeType)
          Inserta el tipo de shape.
 void setValueSymbol(int id, FSymbol symbol)
          Se usa en la tabla que muestra una leyenda.
 void setValueSymbolByID(int id, FSymbol symbol)
          Establece el símbolo para el valor que se pasa como parámetro
 void setXMLEntity(XMLEntity xml)
          Inserta el XMLEntity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorialUniqueValueLegend

public VectorialUniqueValueLegend()
Crea un nuevo VectorialUniqueValueLegend.


VectorialUniqueValueLegend

public VectorialUniqueValueLegend(int shapeType)
Crea un nuevo VectorialUniqueValueLegend.

Parameters:
shapeType - Tipo de shape.
Method Detail

setShapeType

public void setShapeType(int shapeType)
Inserta el tipo de shape.

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

setValueSymbolByID

public void setValueSymbolByID(int id,
                               FSymbol symbol)
Description copied from interface: UniqueValueLegend
Establece el símbolo para el valor que se pasa como parámetro

Specified by:
setValueSymbolByID in interface UniqueValueLegend
Parameters:
id - índice.
symbol - símbolo.
See Also:
UniqueValueLegend.setValueSymbolByID(int, FSymbol)

setValueSymbol

public void setValueSymbol(int id,
                           FSymbol symbol)
Se usa en la tabla que muestra una leyenda.

Parameters:
id -
symbol -

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()

addSymbol

public void addSymbol(java.lang.Object key,
                      FSymbol symbol)
Description copied from interface: UniqueValueLegend
Añade un símbolo.

Specified by:
addSymbol in interface UniqueValueLegend
Parameters:
key - clave.
symbol - símbolo.
See Also:
UniqueValueLegend.addSymbol(java.lang.Object, FSymbol)

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()

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()

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)

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()

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)

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:
com.iver.cit.gvsig.fmap.rendering.ClassifiedLegend#setField()

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)

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()
Description copied from interface: VectorialLegend
Devuelve el XMLEntity.

Specified by:
getXMLEntity in interface Legend
Returns:
XMLEntity.
See Also:
Legend.getXMLEntity()

setXMLEntity

public void setXMLEntity(XMLEntity xml)
Inserta el 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

getSymbolByValue

public FSymbol getSymbolByValue(Value key)
Description copied from interface: UniqueValueLegend
Devuelve un símbolo a partir de su clave.

Specified by:
getSymbolByValue in interface UniqueValueLegend
Parameters:
key - ID.
Returns:
símbolo que corresponde a ese ID.

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

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 de 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 rotación.

Parameters:
str - Rotación.