com.sas.dataselectors.sort
Class OLAPSortSelectorAdapter

com.sas.dataselectors.sort.OLAPSortSelectorAdapter
All Implemented Interfaces:
OLAPSortSelectorInterface, com.sas.util.SortDirectionInterface

public class OLAPSortSelectorAdapter
implements OLAPSortSelectorInterface

The SortSelectorInterface defines the basic methods required for the model of a RelationalSortSelector.


Field Summary
 
Fields inherited from interface com.sas.util.SortDirectionInterface
ASCENDING, DESCENDING, NOT_SORTED
 
Constructor Summary
OLAPSortSelectorAdapter()
           
 
Method Summary
 javax.swing.tree.TreeModel getAvailableCellValueItems()
           
 javax.swing.tree.TreeModel getAvailableLevelLabelItems()
          Returns the items in which sorting is allowed.
 int[] getSortedCellValueDirections()
           
 javax.swing.tree.TreeModel getSortedCellValueItems()
           
 int[] getSortedLevelLabelDirections()
          Returns an array of ints that indicate which direction each item in the sortItems Map is to be sorted.
 javax.swing.tree.TreeModel getSortedLevelLabelItems()
          Returns the items that the table is to sort.
 boolean isCellValueHierarchicalSort()
           
 boolean isCellValueSorting()
           
 boolean isLevelLabelHierarchicalSort()
           
 boolean isLevelLabelSorting()
           
 void setAvailableCellValueItems(javax.swing.tree.TreeModel availableItems)
           
 void setAvailableLevelLabelItems(javax.swing.tree.TreeModel availableItems)
          Sets the items in which sorting is allowed and that are currently not sorted.
 void setCellValueHierarchicalSort(boolean hierarachicalSort)
           
 void setLevelLabelHierarchicalSort(boolean hierarachicalSort)
           
 void setSortedCellValueDirections(int[] sortedDirections)
           
 void setSortedCellValueItems(javax.swing.tree.TreeModel sortedItems)
           
 void setSortedLevelLabelDirections(int[] sortedDirections)
          Sets an array of ints that indicate which direction each item in the sortItems Map is to be sorted.
 void setSortedLevelLabelItems(javax.swing.tree.TreeModel sortedItems)
          Sets the items that the table is to sort.
 

Constructor Detail

OLAPSortSelectorAdapter

public OLAPSortSelectorAdapter()
Method Detail

isLevelLabelSorting

public boolean isLevelLabelSorting()
Specified by:
isLevelLabelSorting in interface OLAPSortSelectorInterface

setAvailableLevelLabelItems

public void setAvailableLevelLabelItems(javax.swing.tree.TreeModel availableItems)
Sets the items in which sorting is allowed and that are currently not sorted. A name/value pair is used to identify the items within the Map. The name is a unique value used to identify each item. The value is a label used for displaying the item.

Specified by:
setAvailableLevelLabelItems in interface OLAPSortSelectorInterface
Parameters:
items - a Map of items which sorting is allowed on but currently are not sorted
See Also:
getAvailableLevelLabelItems()

getAvailableLevelLabelItems

public javax.swing.tree.TreeModel getAvailableLevelLabelItems()
Returns the items in which sorting is allowed. The availableItems contains all the item names in which sorting is allowed on the model, all other items are to be non-sortable. A name/value pair is used to identify the items within the Map. The name is a unique value used to identify each item. The value is a label used for displaying the item.

Specified by:
getAvailableLevelLabelItems in interface OLAPSortSelectorInterface
Returns:
A Map of items in which sorting is allowed.

getSortedLevelLabelItems

public javax.swing.tree.TreeModel getSortedLevelLabelItems()
Returns the items that the table is to sort. The size of the Map can be from 0 to maxSortableItems. A name/value pair is used to identify the items within the Map. The name is a unique value used to identify each item. The value is a label used for displaying the item.

Specified by:
getSortedLevelLabelItems in interface OLAPSortSelectorInterface
Returns:
A Map of items on which the data is sorted.

setSortedLevelLabelItems

public void setSortedLevelLabelItems(javax.swing.tree.TreeModel sortedItems)
Sets the items that the table is to sort. The size of the Map will be from 0 to maxSortableItems. A name/value pair is used to identify the items within the Map. The name is a unique value used to identify each item. The value is a label used for displaying the item.

Specified by:
setSortedLevelLabelItems in interface OLAPSortSelectorInterface
Parameters:
itemNames - a Map of item on which the data is sorted

getSortedLevelLabelDirections

public int[] getSortedLevelLabelDirections()
Returns an array of ints that indicate which direction each item in the sortItems Map is to be sorted. The array will be the same size of the sortItems Map. Valid values are ASCENDING or DESCENDING.

Specified by:
getSortedLevelLabelDirections in interface OLAPSortSelectorInterface
Returns:
An array of ints that indicate which direction the sort items are to be sorted. Valid values are ASCENDING or DESCENDING.

setSortedLevelLabelDirections

public void setSortedLevelLabelDirections(int[] sortedDirections)
Sets an array of ints that indicate which direction each item in the sortItems Map is to be sorted. The array will be the same size of the sortItems Map. Valid values are ASCENDING or DESCENDING.

Specified by:
setSortedLevelLabelDirections in interface OLAPSortSelectorInterface
Parameters:
directions - an array of ints that indicate which direction the sort items are to be sorted

isLevelLabelHierarchicalSort

public boolean isLevelLabelHierarchicalSort()
Specified by:
isLevelLabelHierarchicalSort in interface OLAPSortSelectorInterface

setLevelLabelHierarchicalSort

public void setLevelLabelHierarchicalSort(boolean hierarachicalSort)
Specified by:
setLevelLabelHierarchicalSort in interface OLAPSortSelectorInterface

isCellValueSorting

public boolean isCellValueSorting()
Specified by:
isCellValueSorting in interface OLAPSortSelectorInterface

setAvailableCellValueItems

public void setAvailableCellValueItems(javax.swing.tree.TreeModel availableItems)

getAvailableCellValueItems

public javax.swing.tree.TreeModel getAvailableCellValueItems()
Specified by:
getAvailableCellValueItems in interface OLAPSortSelectorInterface

getSortedCellValueItems

public javax.swing.tree.TreeModel getSortedCellValueItems()
Specified by:
getSortedCellValueItems in interface OLAPSortSelectorInterface

setSortedCellValueItems

public void setSortedCellValueItems(javax.swing.tree.TreeModel sortedItems)
Specified by:
setSortedCellValueItems in interface OLAPSortSelectorInterface

getSortedCellValueDirections

public int[] getSortedCellValueDirections()
Specified by:
getSortedCellValueDirections in interface OLAPSortSelectorInterface

setSortedCellValueDirections

public void setSortedCellValueDirections(int[] sortedDirections)
Specified by:
setSortedCellValueDirections in interface OLAPSortSelectorInterface

isCellValueHierarchicalSort

public boolean isCellValueHierarchicalSort()
Specified by:
isCellValueHierarchicalSort in interface OLAPSortSelectorInterface

setCellValueHierarchicalSort

public void setCellValueHierarchicalSort(boolean hierarachicalSort)
Specified by:
setCellValueHierarchicalSort in interface OLAPSortSelectorInterface



Copyright © 2009 SAS Institute Inc. All Rights Reserved.