com.ibm.as400.opnav
Interface SortingListManager

All Known Implementing Classes:
NativeListManager

public interface SortingListManager

Interface which indicates that a ListManager implementation supports the sorting of list items by column in a view of system objects. SortingListManager should be implemented by the same class that implements ListManager. If a plug-in's ListManager implementation is found to be assignable to SortingListManager, the user interface will enable a means of sorting list items on a designated column in the list.

When a user requests that the list be resorted on the data in a given table column, the SortingListManager implementation is notified by calling sortOnColumn with an indication of which column has been selected by the user, and whether the sort order should be ascending or descending. On return from this method the user interface will refresh the list, causing the items to be displayed in the new order.

This interface does not support sorting on multiple table columns.

User interface assumptions:

Implementation assumptions: None.

Since:
v4r5m0
See Also:
ListManager

Field Summary
static int SORT_ASCENDING
          Indicates that the column sort should sort list items in ascending order.
static int SORT_DESCENDING
          Indicates that the column sort should sort list items in descending order.
 
Method Summary
 ColumnDescriptor[] getSortingColumnInfo()
          Indicates whether multiple sorting is enabled for a list, and which columns it is enabled on.
 boolean isSortingEnabled()
          Indicates whether sorting is enabled for a list.
 boolean sortOnColumn(int columnID, int sortOrder)
          Sorts the list on the specified table column in a view of system objects.
 boolean sortOnColumns(ColumnDescriptor[] columns)
          Sorts the lists on the specified table column in a view of system objects.
 

Field Detail

SORT_ASCENDING

public static final int SORT_ASCENDING
Indicates that the column sort should sort list items in ascending order.

SORT_DESCENDING

public static final int SORT_DESCENDING
Indicates that the column sort should sort list items in descending order.
Method Detail

isSortingEnabled

public boolean isSortingEnabled()
Indicates whether sorting is enabled for a list. This method is called when the user initially selects a container of system objects to determine whether the user interface should enable sorting. It lets ListManager implementations delegate to other ListManagers which may or may not support sorting.
Returns:
true if the list can be sorted; false otherwise.
Since:
v4r5m0

sortOnColumn

public boolean sortOnColumn(int columnID,
                            int sortOrder)
Sorts the list on the specified table column in a view of system objects. This method is called when the user has requested a sort of the list items on a given table column. The SortingListManager implementation should update its state information indicating the order in which items are to be sorted. On return from this method, the user interface will immediately refresh the list by calling ListManager.close followed by ListManager.open.
Parameters:
columnID - the numeric ID identifying the column to sort on, as specified in the column descriptor.
sortOrder - SORT_ASCENDING if the list is to be sorted in ascending order; SORT_DESCENDING if the list is to be sorted in descending order.
Returns:
true if sorting on the specified column is supported; false otherwise.
See Also:
ListManager, ListManager.getColumnInfo()

getSortingColumnInfo

public ColumnDescriptor[] getSortingColumnInfo()
Indicates whether multiple sorting is enabled for a list, and which columns it is enabled on. This method is called when the user initially selects a container of system objects to determine whether the user interface should enable multiple sorting. Return an array including all of the columns that support multiple sorting. If there are none, return an empty array. NOTE: This is currently supported only in the Java Consloe.
Returns:
an array of ColumnDescriptor objects

sortOnColumns

public boolean sortOnColumns(ColumnDescriptor[] columns)
Sorts the lists on the specified table column in a view of system objects. This method is called when the user has requested a sort of the list items on a given table column. The SortingListManager implementation should update its state information indicating the order in which columns are to be sorted. On return from this method, the user interface will immediately refresh the list by calling ListManager.close followed by ListManager.open. It is assumed that the columns will be sorted in ascending order. NOTE: This is currently supported only in the Java Consloe.
Parameters:
columns - The array of the ColumnDescriptors of the columns you want sorted.
Returns:
true if sorting on the specified columns is supported; false otherwise.
See Also:
ListManager, ListManager.getColumnInfo()