com.sas.commands.dataselectors
Class FormatSelectorCommand

com.sas.commands.dataselectors.FormatSelectorCommand
All Implemented Interfaces:
CommandStatusInterface, CommandSupportedInterface, CancelInterface, ContentsChangedInterface, DataSelectorCommandInterface, DynamicAttributeCommandInterface, PendingCommandInterface, BaseEntityInterface, BaseEntityValueInterface, EntityKeyInterface, com.sas.lang.StringDataInterface, com.sas.PublicClonable, com.sas.util.Command, com.sas.util.SimpleCommand, java.lang.Cloneable, java.rmi.Remote

public class FormatSelectorCommand
implements CommandSupportedInterface, CommandStatusInterface

This class provides command support for the "Filter and Rank" Selector. Ideally, the command class will perform all the modifications to the Selector model. The selector should react to the ContentsChangedEvents fired off after the model changes.


Field Summary
protected  java.util.Map actionInfo
          The action map
static java.lang.String ERROR_MESSAGE
           
static java.lang.String FORMAT_SELECTED
           
static java.lang.String FORMAT_TYPE_CHANGED
           
static java.lang.String mode
           
static java.lang.String RB_KEY
          RB key for internationalization
 
Fields inherited from class com.sas.commands.dataselectors.BaseSelectorCommand
actionClass, CANCEL_MODE, COMMIT_MODE, complete, contentsChanged, eventInfo, eventSource, modal, 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
FormatSelectorCommand()
          The default constructor for this command.
FormatSelectorCommand(java.lang.String name)
          Constructor that accepts a command name.
FormatSelectorCommand(java.lang.String name, java.lang.String actionClass)
          Constructor that accepts a command name and an action class type.
 
Method Summary
 void cancel(java.lang.Object o)
          The cancel method resets the model to its original state and hides or destroys the selector visual.
protected  void cleanUp()
           
protected  void commit(java.lang.Object o)
          The commit method alters the original model to reflect any changes made by the user and hides or destroys the selector visual.
 java.lang.String getAction()
          Returns the current action of the selector command.
 int getCommandStatus(ActionSupportFilter filter)
          Returns a int value indicating whether the command is enabled for the given area as specified by the current area information encapsulate in the ActionSupportFilter.
 com.sas.iquery.metadata.business.DataItem getDataItem()
           
 java.lang.String getDecimalWidth()
           
 java.lang.String getFormat()
           
 java.lang.String getFormatType()
           
protected static java.lang.String getID(java.lang.Object object)
           
 java.lang.String getUserDefinedFormat()
           
 java.lang.String getWidth()
           
 boolean isSupported(ActionSupportFilter actionFilter)
          Returns TRUE if the command is supported given the contents of the support filter.
protected  boolean isSwing()
           
protected  void process(java.lang.Object o)
          Processes the request object to manipulate the model.
 void setAction(java.lang.String value)
          Sets the current action of the selector command.
 void setDataItem(com.sas.iquery.metadata.business.DataItem dataItem)
           
 void setDecimalWidth(java.lang.String decimalWidth)
           
 void setFormat(java.lang.String format)
           
 void setFormatType(java.lang.String formatType)
           
 void setUserDefinedFormat(java.lang.String userDefinedFormat)
           
 void setWidth(java.lang.String width)
           
protected  void show(java.lang.Object o)
          Creates the initial selector model from the stored data model and supplies it to the associated selector.
 
Methods inherited from class com.sas.commands.dataselectors.BaseSelectorCommand
cancel, closeSelector, execute, getEventInfo, getEventSource, getMode, getModel, getSelector, getSelectorModel, isComplete, isContentsChanged, isModal, 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

RB_KEY

public static final java.lang.String RB_KEY
RB key for internationalization

See Also:
Constant Field Values

ERROR_MESSAGE

public static final java.lang.String ERROR_MESSAGE
See Also:
Constant Field Values

FORMAT_TYPE_CHANGED

public static final java.lang.String FORMAT_TYPE_CHANGED
See Also:
Constant Field Values

FORMAT_SELECTED

public static final java.lang.String FORMAT_SELECTED
See Also:
Constant Field Values

actionInfo

protected java.util.Map actionInfo
The action map


mode

public static java.lang.String mode
Constructor Detail

FormatSelectorCommand

public FormatSelectorCommand()
The default constructor for this command.


FormatSelectorCommand

public FormatSelectorCommand(java.lang.String name)
Constructor that accepts a command name.

Parameters:
name - the name of this command

FormatSelectorCommand

public FormatSelectorCommand(java.lang.String name,
                             java.lang.String actionClass)
Constructor that accepts a command name and an action class type.

Parameters:
name - the name of this command
actionClass - the class name for the appropriate action
Method Detail

show

protected void show(java.lang.Object o)
Creates the initial selector model from the stored data model and supplies it to the associated selector.

Overrides:
show in class BaseSelectorCommand
Parameters:
o - ignored in this implementation

cleanUp

protected void cleanUp()

isSwing

protected boolean isSwing()

process

protected void process(java.lang.Object o)
Processes the request object to manipulate the model. The selector then represents these changes for the user.

Overrides:
process in class BaseSelectorCommand
Parameters:
o - ignored in this implementation

cancel

public void cancel(java.lang.Object o)
The cancel method resets the model to its original state and hides or destroys the selector visual.

Overrides:
cancel in class BaseSelectorCommand
Parameters:
o - ignored in this implementation

commit

protected void commit(java.lang.Object o)
               throws java.io.IOException
The commit method alters the original model to reflect any changes made by the user and hides or destroys the selector visual.

Overrides:
commit in class BaseSelectorCommand
Parameters:
o - ignored in this implementation
Throws:
java.io.IOException

setAction

public void setAction(java.lang.String value)
Sets the current action of the selector command.

Parameters:
value - the action being executed

getAction

public java.lang.String getAction()
Returns the current action of the selector command.

Returns:
the current action

getID

protected static java.lang.String getID(java.lang.Object object)

getCommandStatus

public int getCommandStatus(ActionSupportFilter filter)
Returns a int value indicating whether the command is enabled for the given area as specified by the current area information encapsulate in the ActionSupportFilter. If not enabled, the key indicates a reason why the command is not enabled.

Specified by:
getCommandStatus in interface CommandStatusInterface
Parameters:
filter - The ActionSupportFilter that encapsulates all the necessary information to describe the current area.
Returns:
an int value indicating whether the command is enabled and, if not, why.
See Also:
BaseAction.setReturnStatus(int)

isSupported

public boolean isSupported(ActionSupportFilter actionFilter)
Returns TRUE if the command is supported given the contents of the support filter.

Specified by:
isSupported in interface CommandSupportedInterface
Parameters:
actionFilter - The ActionSupportFilter that encapsulates all the necessary information to describe the current area.
Returns:
a boolean indicating whether the command is supported
See Also:
BaseAction.setReturnStatus(int)

getDataItem

public com.sas.iquery.metadata.business.DataItem getDataItem()
Returns:
Returns the dataItem.

setDataItem

public void setDataItem(com.sas.iquery.metadata.business.DataItem dataItem)
Parameters:
dataItem - The dataItem to set.

getFormatType

public java.lang.String getFormatType()
Returns:
Returns the formatTypeChoice.

setFormatType

public void setFormatType(java.lang.String formatType)
Parameters:
formatTypeChoice - The formatTypeChoice to set.

getFormat

public java.lang.String getFormat()
Returns:
Returns the formatSelected.

setFormat

public void setFormat(java.lang.String format)
Parameters:
formatSelected - The formatSelected to set.

getDecimalWidth

public java.lang.String getDecimalWidth()
Returns:
Returns the decimalEntry.

setDecimalWidth

public void setDecimalWidth(java.lang.String decimalWidth)
Parameters:
decimalEntry - The decimalEntry to set.

getWidth

public java.lang.String getWidth()
Returns:
Returns the widthEntry.

setWidth

public void setWidth(java.lang.String width)
Parameters:
widthEntry - The widthEntry to set.

getUserDefinedFormat

public java.lang.String getUserDefinedFormat()
Returns:
Returns the userDefinedFormat.

setUserDefinedFormat

public void setUserDefinedFormat(java.lang.String userDefinedFormat)
Parameters:
userDefinedFormat - The userDefinedFormat to set.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.