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

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

public class RasterUniqueValueLegend
extends java.lang.Object
implements UniqueValueLegend, RasterLegend

Leyenda de una clase raster por valor unico.

Author:
Vicente Caballero Navarro

Constructor Summary
RasterUniqueValueLegend()
           
 
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.
static RasterUniqueValueLegend createFromXML(XMLEntity xml)
          Crea un RasterUniqueValueLegend a partir del XMLEntity.
 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.
 FStyle2D getSymbol(double d)
          Devuelve el símbolo a partir de un número.
 FSymbol getSymbolByID(int ID)
           
 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 setDefaultSymbol(FStyle2D s)
          Establece el símbolo por defecto del Legend.
 void setFieldName(java.lang.String i)
          Inserta el nombre del campo.
 void setValueSymbolByID(int id, FSymbol symbol)
          Establece el símbolo para el valor que se pasa como parámetro
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RasterUniqueValueLegend

public RasterUniqueValueLegend()
Method Detail

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)

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

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

setFieldName

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

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

getSymbol

public FStyle2D getSymbol(double d)
Description copied from interface: RasterLegend
Devuelve el símbolo a partir de un número.

Specified by:
getSymbol in interface RasterLegend
Parameters:
d - número.
Returns:
símbolo.
See Also:
RasterLegend.getSymbol(double)

setDefaultSymbol

public void setDefaultSymbol(FStyle2D s)
Description copied from interface: RasterLegend
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 RasterLegend
Parameters:
s - Símbolo.
See Also:
RasterLegend.setDefaultSymbol(com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D)

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

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

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: Legend
Devuelve el XMLEntity.

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

createFromXML

public static RasterUniqueValueLegend createFromXML(XMLEntity xml)
Crea un RasterUniqueValueLegend a partir del XMLEntity.

Parameters:
xml - XMLEntity.
Returns:
Nuevo RasterUniqueValueLegend

cloneLegend

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

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

getSymbolByID

public FSymbol getSymbolByID(int ID)

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.