|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.swing.visuals.dataselectors.BaseSwingSelectorPanel
public abstract class BaseSwingSelectorPanel
This is an abstract class that all swing selectors should extend from.
Field Summary | |
---|---|
protected DynamicAttributeCommandInterface |
command
|
protected boolean |
contentsValid
|
protected java.lang.Object |
selectorModel
|
protected boolean |
wasCancelled
|
Fields inherited from interface com.sas.swing.visuals.PanelInterface |
---|
CONTENTS_VALID_PROPERTY |
Constructor Summary | |
---|---|
BaseSwingSelectorPanel()
Default constructor. |
Method Summary | |
---|---|
DynamicAttributeCommandInterface |
getCommand()
Returns the command associated with the selector. |
java.lang.String |
getDialogTitle()
Returns a title for this panel that should be displayed on a dialog's title bar. |
java.lang.String |
getHelpID()
Returns the help id for this panel. |
javax.swing.JComponent |
getPanel()
Returns the panel to be displayed. |
java.lang.Object |
getSelectorModel()
Returns the model used for the selector, or null if there isn't a model yet. |
java.lang.String |
getTabTitle()
Returns a title for this panel that should be displayed as a title on a tab. |
boolean |
isContentsValid()
Indicates if the panel's contents are in a valid state. |
boolean |
isYesNo()
Indicates if the panel asks a yes-no or ok type question. |
void |
onApply()
Apply any changes that may have been made in the panel. |
void |
onCancel()
Cancel any changes that may have been made in the panel. |
void |
onClose()
Indicates that the panel is being closed. |
void |
setCommand(DynamicAttributeCommandInterface newCommand)
Sets the command associated with the selector, the command is used to updated or cancel the selector when needed. |
void |
setContentsValid(boolean newValue)
Sets the valid state of the panel's contents. |
void |
setSelectorModel(java.lang.Object model)
Sets the model used for the selector on the panel. |
Methods inherited from interface com.sas.dataselectors.DataSelectorInterface |
---|
isVisible, setVisible |
Field Detail |
---|
protected boolean contentsValid
protected java.lang.Object selectorModel
protected DynamicAttributeCommandInterface command
protected boolean wasCancelled
Constructor Detail |
---|
public BaseSwingSelectorPanel()
Method Detail |
---|
public void setCommand(DynamicAttributeCommandInterface newCommand)
newCommand
- the command associated with the selectorgetCommand()
public DynamicAttributeCommandInterface getCommand()
setCommand(DynamicAttributeCommandInterface)
public void onApply()
onApply
in interface PanelInterface
public void onCancel()
onCancel
in interface PanelInterface
public void onClose()
onApply()
or onClose()
is called. If the command is an
instanceof BaseSelectorCommand, the command is put into COMMIT_MODE and is executed.
onClose
in interface PanelInterface
public java.lang.String getDialogTitle()
getDialogTitle
in interface PanelInterface
public java.lang.String getTabTitle()
getTabTitle
in interface PanelInterface
public javax.swing.JComponent getPanel()
this
.
getPanel
in interface PanelInterface
public java.lang.String getHelpID()
null
is returned, a help button is
not added for this panel. By default this returns null.
getHelpID
in interface PanelInterface
public boolean isYesNo()
isYesNo
in interface PanelInterface
true
if the panel asks a yes-no type question,
false
if the panel asks an ok type questionpublic boolean isContentsValid()
true
except for when the panel is behaving as an editor and incomplete information has been entered.
This state can be used by a dialog, for example, to enable/disable the its "apply" buttons ("OK", "Yes", etc).
isContentsValid
in interface PanelInterface
true
if the panel's contents are valid, otherwise false
setContentsValid(boolean)
public void setContentsValid(boolean newValue)
PanelInterface
provides the property name identifier CONTENTS_VALID_PROPERTY
as
a convenience for implementing this as a bound property.
setContentsValid
in interface PanelInterface
newValue
- the new valid state for the panel's contentsisContentsValid()
public void setSelectorModel(java.lang.Object model)
setSelectorModel
in interface DataSelectorInterface
model
- the new selector model to set on the panelgetSelectorModel()
public java.lang.Object getSelectorModel()
getSelectorModel
in interface DataSelectorInterface
setSelectorModel(Object)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |