com.sas.swing.visuals.dualselector
Interface DualSelectorUpDownInterface

All Superinterfaces:
DualSelectorInterface
All Known Implementing Classes:
JListDualSelectorAdapter

public interface DualSelectorUpDownInterface
extends DualSelectorInterface

Defines methods necessary for an adapter that allows reordering of items via up/down buttons.

Since:
3.1

Method Summary
 boolean canMove(int[] indices, int offset)
          Determines whether a particular move is allowed.
 int[] getSelectedIndices()
          Returns the the indices of the items selected.
 boolean isSelectedIndex(int index)
          Returns whether the supplied index is selected.
 void moveItems(int[] selectedIndices, int offset)
          Moves the selected items.
 
Methods inherited from interface com.sas.swing.visuals.dualselector.DualSelectorInterface
addItems, clearSelections, getAllItems, getAllMoveableItems, getComponent, getContainerComponent, getCount, getLastSelectedIndex, getSelectedCount, getSelectedItems, isInAdapter, removeItems, setSelectedIndex
 

Method Detail

getSelectedIndices

int[] getSelectedIndices()
Returns the the indices of the items selected.

Returns:
array of indices

moveItems

void moveItems(int[] selectedIndices,
               int offset)
Moves the selected items.

Parameters:
selectedIndices - the indices of the selected items
offset - the direction to move items. 1 is up and -1 is down.

isSelectedIndex

boolean isSelectedIndex(int index)
Returns whether the supplied index is selected.

Parameters:
index - the item index to check
Returns:
whether the item is selected

canMove

boolean canMove(int[] indices,
                int offset)
Determines whether a particular move is allowed. Returns true if the move is allowed.

Parameters:
indices - the indices of the items to be moved
offset - the number of places to move the items
Returns:
true if the move allowed, false if not allowed



Copyright © 2009 SAS Institute Inc. All Rights Reserved.