com.extjs.gxt.ui.client.event
Class SelectionChangedEvent<M extends ModelData>

java.lang.Object
  extended by com.extjs.gxt.ui.client.event.BaseEvent
      extended by com.extjs.gxt.ui.client.event.SelectionChangedEvent<M>
Type Parameters:
M - the model type being selected

public class SelectionChangedEvent<M extends ModelData>
extends BaseEvent

BaseEvent used to signal a SelectionProviders selection has changed.

    TableBinder binder = new TableBinder<Stock>(tbl, store);
    binder.addSelectionChangedListener(new SelectionChangedListener<Stock>() {
      public void selectionChanged(SelectionChangedEvent<Stock> se) {
        List<Stock> sel = se.getSelection();
      }
    });
 


Constructor Summary
SelectionChangedEvent(SelectionProvider<M> provider, java.util.List<M> selection)
          Creates a new selection event.
SelectionChangedEvent(SelectionProvider<M> provider, M selection)
          Creates a new selection event.
 
Method Summary
 M getSelectedItem()
          Returns the first selected item.
 java.util.List<M> getSelection()
          Returns the selection.
 SelectionProvider<M> getSelectionProvider()
          Returns the selection provider.
 
Methods inherited from class com.extjs.gxt.ui.client.event.BaseEvent
getSource, getType, isCancelled, setCancelled, setSource, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionChangedEvent

public SelectionChangedEvent(SelectionProvider<M> provider,
                             java.util.List<M> selection)
Creates a new selection event.

Parameters:
provider - the selection provider
selection - the selection

SelectionChangedEvent

public SelectionChangedEvent(SelectionProvider<M> provider,
                             M selection)
Creates a new selection event.

Parameters:
provider - the selection provider
selection - the selection
Method Detail

getSelectedItem

public M getSelectedItem()
Returns the first selected item.

Returns:
the selected item

getSelection

public java.util.List<M> getSelection()
Returns the selection.

Returns:
the selection

getSelectionProvider

public SelectionProvider<M> getSelectionProvider()
Returns the selection provider.

Returns:
the provider