es.prodevelop.gvsig.mobile.fmap.layer
Class SelectionSupport

java.lang.Object
  extended byes.prodevelop.gvsig.mobile.fmap.layer.SelectionSupport

public class SelectionSupport
extends java.lang.Object

Clase que gestiona las operaciónes sobre la selección.

Author:
Vicente Caballero Navarro

Constructor Summary
SelectionSupport()
           
 
Method Summary
 void addSelectionListener(SelectionListener listener)
          Añade un SelectionListener al ArrayList de Listeners.
 boolean clearSelection(boolean fire_event)
          Elimina la selección.
 void fireSelectionEvents()
          Cuando ocurre un evento de cambio en la selección, éste puede ser uno de una gran cantidad de eventos.
 FBitSet getSelection()
          Devuelve un FBitSet con los índices de los elementos seleccionados.
 boolean isSelected(int recordIndex)
          Devuelve true si el elemento está seleccionado.
 void removeSelectionListener(SelectionListener listener)
          Borra el SelectionListener que se le pasa como parámetro del ArrayList de Listener.
 void setSelection(FBitSet selection)
          Inserta una nueva selección.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionSupport

public SelectionSupport()
Method Detail

setSelection

public void setSelection(FBitSet selection)
Inserta una nueva selección.

Parameters:
selection - FBitSet con la selección.

getSelection

public FBitSet getSelection()
Devuelve un FBitSet con los índices de los elementos seleccionados.

Returns:
FBitSet.

isSelected

public boolean isSelected(int recordIndex)
Devuelve true si el elemento está seleccionado.

Parameters:
recordIndex - índice del registro.
Returns:
True si está seleccionado.

clearSelection

public boolean clearSelection(boolean fire_event)
Elimina la selección.


addSelectionListener

public void addSelectionListener(SelectionListener listener)
Añade un SelectionListener al ArrayList de Listeners.

Parameters:
listener - SelectionListener a añadir.

removeSelectionListener

public void removeSelectionListener(SelectionListener listener)
Borra el SelectionListener que se le pasa como parámetro del ArrayList de Listener.

Parameters:
listener - SlectionListener a borrar.

fireSelectionEvents

public void fireSelectionEvents()
Cuando ocurre un evento de cambio en la selección, éste puede ser uno de una gran cantidad de eventos. Con el fin de no propagar todos estos eventos, se realiza la propagación de manera manual al final de la "ráfaga" de eventos