com.sas.swing.visuals.dualselector
Interface DualSelectorInterface

All Known Subinterfaces:
DualSelectorTreeInterface, DualSelectorUpDownInterface
All Known Implementing Classes:
JListDualSelectorAdapter, JTreeDualSelectorAdapter

public interface DualSelectorInterface

The DualSelectorInterface defines the methods that an adapter class must implement.

Since:
3.1

Method Summary
abstract  void addItems(java.util.List newItems)
          Adds the items to the component.
abstract  void clearSelections()
          Clears the selections made on the component.
abstract  java.util.List getAllItems()
          Returns all items.
abstract  java.util.List getAllMoveableItems()
          Returns all of the items that are moveable based on the status of the movement control options.
abstract  javax.swing.JComponent getComponent()
          Returns the actual component.
abstract  javax.swing.JComponent getContainerComponent()
          Returns the container holding a component.
abstract  int getCount()
          Returns the number of items in the component.
abstract  int getLastSelectedIndex()
          Returns the index of the last item selected.
abstract  int getSelectedCount()
          Returns the number of items selected.
abstract  java.util.List getSelectedItems()
          Returns the user selected items.
abstract  boolean isInAdapter(java.lang.Object item)
          Returns true if the item is a member of the adapter model.
abstract  void removeItems(java.util.List removeItems)
          Removes the items from the component.
abstract  void setSelectedIndex(int index)
          Selects the item at the specified index.
 

Method Detail

getCount

int getCount()
Returns the number of items in the component.

Returns:
the number of items in the component

getSelectedItems

java.util.List getSelectedItems()
Returns the user selected items.

Returns:
the selected items

getAllItems

java.util.List getAllItems()
Returns all items.

Returns:
the items

getAllMoveableItems

java.util.List getAllMoveableItems()
Returns all of the items that are moveable based on the status of the movement control options.

Returns:
a list of all moveable items

getSelectedCount

int getSelectedCount()
Returns the number of items selected.

Returns:
the number of selected items

getComponent

javax.swing.JComponent getComponent()
Returns the actual component.

Returns:
the component

getContainerComponent

javax.swing.JComponent getContainerComponent()
Returns the container holding a component.

Returns:
the container

addItems

void addItems(java.util.List newItems)
Adds the items to the component.

Parameters:
newItems - the items to be added.

removeItems

void removeItems(java.util.List removeItems)
Removes the items from the component.

Parameters:
removeItems - items to be removed from the component

clearSelections

void clearSelections()
Clears the selections made on the component.


getLastSelectedIndex

int getLastSelectedIndex()
Returns the index of the last item selected.

Returns:
the index of the last selected item

setSelectedIndex

void setSelectedIndex(int index)
Selects the item at the specified index.

Parameters:
index - the index of the item to be selected

isInAdapter

boolean isInAdapter(java.lang.Object item)
Returns true if the item is a member of the adapter model.

Parameters:
item - the object to be checked
Returns:
true if the item is a member of the adapter model.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.