|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.commands.dataselectors.TotalsCommand
public class TotalsCommand
This class handles the applying of totals and subtotals in conjunction with the Totals Selector.
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 TotalsSelectorInterface to provide to the visual
so that the Totals 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, totals and subtotals 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 | |
|---|---|
java.lang.String |
columnSubtotals
Flag that indicates if the subtotals have to be applied to the columns. |
java.lang.String |
columnTotals
Flag that indicates if the totals have to be applied to the columns. |
java.lang.String |
expandedTotals
Flag that indicates if the totals are 'expanded'. |
java.lang.String |
rowSubtotals
Flag that indicates if the subtotals have to be applied to the rows. |
java.lang.String |
rowTotals
Flag that indicates if the totals have to be applied to the rows. |
static java.lang.String |
TOTALS_SELECTOR_COMMAND_COMMITTED
String added to the fired contentsChangesEvent to let the listener know the TotalsCommand was committed. |
java.lang.String |
totalsPosition
Indicates the totals position. |
java.lang.String |
totalsType
Indicates the totals type. |
| 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.commands.DynamicAttributeCommandInterface |
|---|
COMMAND_NAME_PREFIX |
| Constructor Summary | |
|---|---|
TotalsCommand()
Default Constructor. |
|
TotalsCommand(boolean isJSP)
Constructor that accepts a command name. |
|
TotalsCommand(java.lang.String name)
Constructor that accepts a command name. |
|
TotalsCommand(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)
|
java.lang.String |
getColumnSubtotals()
Returns the flag that indicates if the sub totals have to be applied to the columns. |
java.lang.String |
getColumnTotals()
Returns the flag that indicates if the totals have to be applied to the columns. |
java.lang.String |
getExpandedTotals()
Returns the flag that indicates if the totals are 'expanded'. |
java.lang.String |
getRowSubtotals()
Returns the flag that indicates if the sub totals have to be applied to the rows. |
java.lang.String |
getRowTotals()
Returns the flag that indicates if the totals have to be applied to the rows. |
java.lang.String |
getTotalsPosition()
Returns the totals position. |
java.lang.String |
getTotalsType()
Returns the totals type. |
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 |
setColumnSubtotals(java.lang.String value)
Sets the flag that indicates if the sub totals have to be applied to the columns. |
void |
setColumnTotals(java.lang.String value)
Sets the flag that indicates if the totals have to be applied to the columns. |
void |
setExpandedTotals(java.lang.String value)
Sets the flag that indicates if the totals are 'expanded'. |
void |
setRowSubtotals(java.lang.String value)
Sets the flag that indicates if the sub totals have to be applied to the rows. |
void |
setRowTotals(java.lang.String value)
Sets the flag that indicates if the totals have to be applied to the rows. |
void |
setTotalsPosition(java.lang.String value)
Sets the totals position. |
void |
setTotalsType(java.lang.String value)
Sets the totals type. |
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 java.lang.String rowTotals
TotalsSelectorInterface.ROW_TOTALS,
TotalsSelectorInterface.NO_ROW_TOTALSpublic java.lang.String rowSubtotals
TotalsSelectorInterface.ROW_SUBTOTALS,
TotalsSelectorInterface.NO_ROW_SUBTOTALSpublic java.lang.String columnTotals
TotalsSelectorInterface.COLUMN_TOTALS,
TotalsSelectorInterface.NO_COLUMN_TOTALSpublic java.lang.String columnSubtotals
TotalsSelectorInterface.COLUMN_SUBTOTALS,
TotalsSelectorInterface.NO_COLUMN_SUBTOTALSpublic java.lang.String expandedTotals
TotalsSelectorInterface.EXPANDED_TOTALS,
TotalsSelectorInterface.NO_EXPANDED_TOTALSpublic java.lang.String totalsType
TotalsSelectorInterface.UNFILTERED_TOTALS,
TotalsSelectorInterface.VISUAL_TOTALSpublic java.lang.String totalsPosition
TotalsSelectorInterface.TOP,
TotalsSelectorInterface.BOTTOMpublic static final java.lang.String TOTALS_SELECTOR_COMMAND_COMMITTED
| Constructor Detail |
|---|
public TotalsCommand()
public TotalsCommand(boolean isJSP)
isJSP - true if used in a JSP context; false if used in a Swing context.public TotalsCommand(java.lang.String name)
name - The command name.
public TotalsCommand(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 BaseSelectorCommandjava.io.IOExceptionpublic void cancel()
CancelInterfaceCommon things done in this method:
cancel in interface CancelInterfacecancel in class BaseSelectorCommandpublic boolean isSupported(ActionSupportFilter actionFilter)
CommandSupportedInterfaceReturns 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 CommandSupportedInterfaceactionFilter - The ActionSupportFilter that encapsulates all the necessary
information to describe the current area.
BaseAction.setReturnStatus(int)public java.lang.String getRowTotals()
TotalsSelectorInterface.ROW_TOTALS,
TotalsSelectorInterface.NO_ROW_TOTALSpublic void setRowTotals(java.lang.String value)
value - The flag that indicates if the totals have to be applied to the rows.TotalsSelectorInterface.ROW_TOTALS,
TotalsSelectorInterface.NO_ROW_TOTALSpublic java.lang.String getRowSubtotals()
TotalsSelectorInterface.ROW_SUBTOTALS,
TotalsSelectorInterface.NO_ROW_SUBTOTALSpublic void setRowSubtotals(java.lang.String value)
value - The flag that indicates if the sub totals have to be applied to the rows.TotalsSelectorInterface.ROW_SUBTOTALS,
TotalsSelectorInterface.NO_ROW_SUBTOTALSpublic java.lang.String getColumnTotals()
TotalsSelectorInterface.COLUMN_TOTALS,
TotalsSelectorInterface.NO_COLUMN_TOTALSpublic void setColumnTotals(java.lang.String value)
value - The flag that indicates if the totals have to be applied to the columns.TotalsSelectorInterface.COLUMN_TOTALS,
TotalsSelectorInterface.NO_COLUMN_TOTALSpublic java.lang.String getColumnSubtotals()
TotalsSelectorInterface.COLUMN_SUBTOTALS,
TotalsSelectorInterface.NO_COLUMN_SUBTOTALSpublic void setColumnSubtotals(java.lang.String value)
value - The flag that indicates if the sub totals have to be applied to the columns.TotalsSelectorInterface.COLUMN_SUBTOTALS,
TotalsSelectorInterface.NO_COLUMN_SUBTOTALSpublic java.lang.String getExpandedTotals()
TotalsSelectorInterface.EXPANDED_TOTALS,
TotalsSelectorInterface.NO_EXPANDED_TOTALSpublic void setExpandedTotals(java.lang.String value)
value - The flag that indicates if the totals are 'expanded'.TotalsSelectorInterface.EXPANDED_TOTALS,
TotalsSelectorInterface.NO_EXPANDED_TOTALSpublic java.lang.String getTotalsType()
TotalsSelectorInterface.UNFILTERED_TOTALS,
TotalsSelectorInterface.VISUAL_TOTALSpublic void setTotalsType(java.lang.String value)
value - The totals type.TotalsSelectorInterface.UNFILTERED_TOTALS,
TotalsSelectorInterface.VISUAL_TOTALSpublic java.lang.String getTotalsPosition()
TotalsSelectorInterface.TOP,
TotalsSelectorInterface.BOTTOMpublic void setTotalsPosition(java.lang.String value)
value - The totals position.TotalsSelectorInterface.TOP,
TotalsSelectorInterface.BOTTOM
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||