es.prodevelop.gvsig.mobile.fmap.legend
Class SingleSymbolLegend

java.lang.Object
  extended byes.prodevelop.gvsig.mobile.fmap.legend.SingleSymbolLegend
All Implemented Interfaces:
Legend, VectorialLegend

public class SingleSymbolLegend
extends java.lang.Object
implements VectorialLegend, Legend


Constructor Summary
SingleSymbolLegend(FSymbol style)
          Crea un nuevo SingleSymbolLegend.
 
Method Summary
 Legend cloneLegend()
           
 FSymbol getDefaultSymbol()
          Obtiene el símbolo por defecto de la leyenda
 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 getSymbolByFeature(IFeature feat)
           
 java.lang.String[] getUsedFields()
          Se usa para saber antes de dibujar, los campos que vamos a necesitar leer, y leer solo estos.
 void setDataSource(com.hardcode.gdbms.engine.data.DataSource ds)
          Inserta el DataSource.
 void setDefaultSymbol(FSymbol s)
          Establece el símbolo por defecto del Legend.
 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 texto que refleja el alto del campo.
 void setLabelRotationField(java.lang.String str)
          Inserta el texto que refleja la rotación del campo.
 void setShapeType(int shapeType)
          Inserta el tipo de shape.
 void useDefaultSymbol(boolean b)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleSymbolLegend

public SingleSymbolLegend(FSymbol style)
Crea un nuevo SingleSymbolLegend.

Parameters:
style - Símbolo.
Method Detail

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

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.VectorialLegend#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.VectorialLegend#setLabelField(int)

getSymbol

public FSymbol getSymbol(int recordIndex)
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.
See Also:
com.iver.cit.gvsig.fmap.rendering.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:
com.iver.cit.gvsig.fmap.rendering.Legend#getDefaultSymbol()

cloneLegend

public Legend cloneLegend()
See Also:
com.iver.cit.gvsig.fmap.rendering.Legend#cloneLegend()

setDataSource

public void setDataSource(com.hardcode.gdbms.engine.data.DataSource ds)
Description copied from interface: VectorialLegend
Inserta el DataSource.

Specified by:
setDataSource in interface VectorialLegend
Parameters:
ds - DataSource.

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 texto que refleja el alto del campo.

Specified by:
setLabelHeightField in interface VectorialLegend
Parameters:
str - String.

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 el texto que refleja la rotación del campo.

Specified by:
setLabelRotationField in interface VectorialLegend
Parameters:
str - String.

getSymbolByFeature

public FSymbol getSymbolByFeature(IFeature feat)
Specified by:
getSymbolByFeature in interface VectorialLegend

useDefaultSymbol

public void useDefaultSymbol(boolean b)
Specified by:
useDefaultSymbol in interface VectorialLegend

getUsedFields

public java.lang.String[] getUsedFields()
Description copied from interface: VectorialLegend
Se usa para saber antes de dibujar, los campos que vamos a necesitar leer, y leer solo estos. Acelera el dibujado bastante, sobre todo en bases de datos espaciales.

Specified by:
getUsedFields in interface VectorialLegend
Returns:
el array con los nombres de los campos usados. (Por ejemplo para el etiquetado, el campo de clasificación, etc)