org.jdesktop.dataset
Class DataSelector

java.lang.Object
  extended by org.jdesktop.dataset.DataSelector

public class DataSelector
extends java.lang.Object

Author:
rbair

Field Summary
protected static java.lang.String DEFAULT_NAME_PREFIX
          Used as a prefix for auto-generated DataColumn names.
 
Constructor Summary
DataSelector(DataTable table)
          Creates a new instance of DataSelector
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Adds a PropertyChangeListener to this class for any changes to bean properties.
 void addPropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)
          Adds a PropertyChangeListener to this class for specific property changes.
 DataTable getDataTable()
          Deprecated. Use getTable() instead
 int getFirstRowIndex()
           
 java.lang.String getName()
           
 java.util.List<java.lang.Integer> getRowIndices()
           
 DataTable getTable()
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Stops notifying a specific listener of any changes to bean properties.
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          Stops notifying a specific listener of changes to a specific property.
 void setName(java.lang.String name)
           
 void setRowIndex(DataRow row)
           
 void setRowIndex(int index)
          Convenience method for setting a single row as the selected row.
 void setRowIndices(int[] rowIndices)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NAME_PREFIX

protected static final java.lang.String DEFAULT_NAME_PREFIX
Used as a prefix for auto-generated DataColumn names.

See Also:
Constant Field Values
Constructor Detail

DataSelector

public DataSelector(DataTable table)
Creates a new instance of DataSelector

Method Detail

getDataTable

public DataTable getDataTable()
Deprecated. Use getTable() instead


getTable

public DataTable getTable()

setName

public void setName(java.lang.String name)
Parameters:
name -

getName

public java.lang.String getName()

getRowIndices

public java.util.List<java.lang.Integer> getRowIndices()

getFirstRowIndex

public int getFirstRowIndex()
Returns:
either the first selected index, or -1 if nothing is selected

setRowIndices

public void setRowIndices(int[] rowIndices)

setRowIndex

public void setRowIndex(int index)
Convenience method for setting a single row as the selected row.

Parameters:
index - must be less than the row count of the DataTable. Also, if it is greater than 0, then the row index will be set, however if it is less than zero, then the selection will be cleared.

setRowIndex

public void setRowIndex(DataRow row)

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to this class for any changes to bean properties.

Parameters:
listener - The PropertyChangeListener to notify of changes to this instance.

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String property,
                                      java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to this class for specific property changes.

Parameters:
property - The name of the property to listen to changes for.
listener - The PropertyChangeListener to notify of changes to this instance.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Stops notifying a specific listener of any changes to bean properties.

Parameters:
listener - The listener to stop receiving notifications.

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)
Stops notifying a specific listener of changes to a specific property.

Parameters:
propertyName - The name of the property to ignore from now on.
listener - The listener to stop receiving notifications.


Copyright © 2005 Sun Microsystems All Rights Reserved.