|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.commands.dataselectors.SortCommand
public class SortCommand
This class handles the sorting of data items.
The command processes actions, via the Action Provider Framework, as they are initiated by the visual in response to user input. Actions include show, process, commit, and cancel. Each action causes a corresponding method on this command to be invoked.
The show action creates an instance of SortSelectorInterface
to provide to the visual
so that the Sort Selector can be displayed to the user.
The commit action is invoked when the user leaves the selector visual by pressing the OK button. Depending on the selected options, sorts are applied to the data model.
The cancel action is invoked when the user leaves the selector visual by pressing the Cancel button. There is no specific processing by this command for the cancel action.
The process action is not used by this command.
Field Summary | |
---|---|
static java.lang.String |
SORT_SELECTOR_COMMAND_COMMITTED
String added to the fired contentsChangesEvent to let the listener know the SortCommand was committed. |
Fields inherited from class com.sas.commands.dataselectors.BaseSelectorCommand |
---|
actionClass, CANCEL_MODE, COMMIT_MODE, complete, contentsChanged, eventInfo, eventSource, modal, mode, model, PROCESS_MODE, selector, selectorModel, SHOW_MODE |
Fields inherited from interface com.sas.actionprovider.CommandStatusInterface |
---|
DISABLED, ENABLED, IS_CURRENT_STATE_DISABLED, MODEL_MEMBER_DISABLED, MODEL_STATE_DISABLED, MODEL_TYPE_DISABLED |
Fields inherited from interface com.sas.commands.DynamicAttributeCommandInterface |
---|
COMMAND_NAME_PREFIX |
Constructor Summary | |
---|---|
SortCommand()
Default Constructor. |
|
SortCommand(java.lang.String name)
Constructor that accepts a command name. |
|
SortCommand(java.lang.String name,
java.lang.String actionClass)
Constructor that accepts a command name and an action class type. |
Method Summary | |
---|---|
void |
cancel()
Cancels the command. |
protected void |
commit(java.lang.Object o)
|
int |
getCommandStatus(ActionSupportFilter actionFilter)
Returns a status value indicating whether the command is enabled for a specific area as described by various filter attributes. |
java.lang.String |
getSortByChoiceBox()
Returns the value of the first item to sort by. |
java.lang.String |
getSortByRadioBox()
Returns the direction of the first sort item. |
java.lang.String[] |
getThenByChoiceBox()
Returns the values of the then by items to sort by. |
java.lang.String[] |
getThenByRadioBox()
Returns the directions of the then by sort items. |
boolean |
isSupported(ActionSupportFilter actionFilter)
Returns a boolean indicating whether the command is supported for the given area as specified by the current area information encapsulated in the ActionSupportFilter. |
void |
setSortByChoiceBox(java.lang.String value)
Sets the value of the first item to sort by. |
void |
setSortByRadioBox(java.lang.String value)
Sets the direction value of the first item to sort by. |
void |
setThenByChoiceBox(java.lang.String[] values)
Sets the values of the then by items to sort by. |
void |
setThenByRadioBox(java.lang.String[] values)
Sets the direction values of the then by items to sort by. |
protected void |
show(java.lang.Object o)
|
Methods inherited from class com.sas.commands.dataselectors.BaseSelectorCommand |
---|
cancel, closeSelector, execute, getEventInfo, getEventSource, getMode, getModel, getSelector, getSelectorModel, isComplete, isContentsChanged, isModal, process, setComplete, setModal, setMode, setModel, setSelector, setSelectorModel |
Methods inherited from class com.sas.commands.BaseCommand |
---|
getLocale, getName, getNextCommandName, getText, isExecutable, isUndoable, setLocale, setName, setText, undo |
Methods inherited from class com.sas.entities.BaseEntity |
---|
clone, containsAttributeNamed, equals, equals, getAttribute, getAttribute, getAttributeCount, getAttributes, getEntityKey, getPropertyDescriptors, getStringAttribute, listAttributeNames, removeAllAttributes, removeAttribute, reset, sameEntity, setAttribute, setAttributes, setEntityKey, toString |
Methods inherited from interface com.sas.entities.BaseEntityValueInterface |
---|
getAttribute, setAttribute |
Methods inherited from interface com.sas.util.Command |
---|
clone |
Field Detail |
---|
public static final java.lang.String SORT_SELECTOR_COMMAND_COMMITTED
Constructor Detail |
---|
public SortCommand()
public SortCommand(java.lang.String name)
name
- The command name.public SortCommand(java.lang.String name, java.lang.String actionClass)
name
- The command name.actionClass
- The action class type.Method Detail |
---|
protected void show(java.lang.Object o)
show
in class BaseSelectorCommand
protected void commit(java.lang.Object o) throws java.io.IOException
commit
in class BaseSelectorCommand
java.io.IOException
public int getCommandStatus(ActionSupportFilter actionFilter)
CommandStatusInterface
If enabled, the value is:
CommandStatusInterface.ENABLED
If disabled, the value may be one of the following values which indicate why the command is disabled.
CommandStatusInterface.MODEL_TYPE_DISABLED
CommandStatusInterface.MODEL_STATE_DISABLED
CommandStatusInterface.MODEL_MEMBER_DISABLED
CommandStatusInterface.IS_CURRENT_STATE_DISABLED
CommandStatusInterface.DISABLED
getCommandStatus
in interface CommandStatusInterface
actionFilter
- - the object that describes the current area.
BaseAction.setReturnStatus(int)
public void cancel()
CancelInterface
Common things done in this method:
cancel
in interface CancelInterface
cancel
in class BaseSelectorCommand
public boolean isSupported(ActionSupportFilter actionFilter)
CommandSupportedInterface
Returns a boolean indicating whether the command is supported for the given area as specified by the current area information encapsulated in the ActionSupportFilter.
isSupported
in interface CommandSupportedInterface
actionFilter
- The ActionSupportFilter that encapsulates all the necessary
information to describe the current area.
BaseAction.setReturnStatus(int)
public void setSortByChoiceBox(java.lang.String value)
value
- The value that indicates the first item to sort by.public java.lang.String getSortByChoiceBox()
public void setSortByRadioBox(java.lang.String value)
value
- The direction to sort the first item.public java.lang.String getSortByRadioBox()
public void setThenByChoiceBox(java.lang.String[] values)
values
- The values that indicates the then by items to sort by.public java.lang.String[] getThenByChoiceBox()
public void setThenByRadioBox(java.lang.String[] values)
values
- The directions to sort the then by items.public java.lang.String[] getThenByRadioBox()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |