|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.etools.systems.core.ui.SystemSortableSelection
The TreeViewer widget does not seem to guarantee that multiple-selections are returned sorted in order of appearance in the tree. Some action require they be, such as MoveUp and MoveDown. This class captures the information for each selected item and permits sorting via position, using the Arrays helper class in java.util.
Field Summary | |
---|---|
static String |
copyright
|
Constructor Summary | |
---|---|
SystemSortableSelection(Object selectedObject)
Constructor for SystemSortableSelection |
Method Summary | |
---|---|
int |
compareTo(Object other)
|
boolean |
equals(Object other)
|
int |
getPosition()
Get the poisition of the selected object within its parent list |
Object |
getSelectedObject()
Get the selected object |
static Object[] |
getSortedObjects(SystemSortableSelection[] sortedArray,
Object[] outputArray)
IF YOU HAVE CALLED SETPOSITION ON EACH ITEM IN THE GIVEN ARRAY, AND CALLED SORTARRAY, THIS CONVERTS INTO A SORTED ARRAY THAT JUST HAS THE ORIGINAL OBJECTS IN IT FROM THE SELECTION LIST. |
static SystemSortableSelection[] |
makeSortableArray(IStructuredSelection selection)
Convert structured selection into an array of these objects. |
void |
setPosition(int position)
Set the position of the selected object within its parent list |
static void |
sortArray(SystemSortableSelection[] sortableArray)
IF YOU HAVE CALLED SETPOSITION ON EACH ITEM IN THE GIVEN ARRAY, THIS WILL SORT THAT ARRAY BY THE POSITION |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String copyright
Constructor Detail |
public SystemSortableSelection(Object selectedObject)
Method Detail |
public Object getSelectedObject()
public void setPosition(int position)
public int getPosition()
public int compareTo(Object other)
compareTo
in interface Comparable
Comparable.compareTo(Object)
public boolean equals(Object other)
public static SystemSortableSelection[] makeSortableArray(IStructuredSelection selection)
public static void sortArray(SystemSortableSelection[] sortableArray)
public static Object[] getSortedObjects(SystemSortableSelection[] sortedArray, Object[] outputArray)
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |