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