|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.visuals.ButtonPanel
public class ButtonPanel
ButtonPanel creates a consistent looking set of buttons in a row. It is used by the OkCancelHelpDialog.
| Field Summary | |
|---|---|
protected Container |
buttons
|
protected java.lang.String |
selectedActionCommand
|
| Constructor Summary | |
|---|---|
ButtonPanel()
|
|
ButtonPanel(java.lang.String[][] buttonInfo)
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
actionPerformed handling the ActionEvents from the buttons in the ButtonPanel and stores the action command of the last selected button for later querying by a user. |
PushButton |
addButton(java.lang.String buttonText)
|
PushButton |
addButton(java.lang.String buttonText,
java.lang.String actionCommand)
|
PushButton |
getButton(java.lang.String buttonText)
|
PushButton |
getButtonFromActionCommand(java.lang.String actionCommand)
Get the button from the specified actionCommand. |
java.lang.String |
getSelectedActionCommand()
getSelectedActionCommand returns the action command of the last button pressed. |
protected PushButton |
makeButton(java.lang.String text)
makeButton is a factory method which creates a PushButton to using in the ButtonPanel. |
void |
removeButton(PushButton btn)
Remove the specified button from the ButtonPanel. |
PushButton |
removeButton(java.lang.String buttonText)
|
void |
setSelectedActionCommand(java.lang.String selectedActionCommand)
setSelectedActionCommand sets the action command that was last pressed. |
| Methods inherited from class com.sas.awt.Container |
|---|
getDefaultHeight, getDefaultWidth, getExtendedBeanInfo, setDefaultHeight, setDefaultValues, setDefaultWidth |
| Methods inherited from interface com.sas.awt.ContainerInterface |
|---|
getComponents, getLayout, invalidate, setLayout, validate |
| Field Detail |
|---|
protected Container buttons
protected java.lang.String selectedActionCommand
| Constructor Detail |
|---|
public ButtonPanel()
public ButtonPanel(java.lang.String[][] buttonInfo)
| Method Detail |
|---|
protected PushButton makeButton(java.lang.String text)
text - The text to put on the button.public PushButton addButton(java.lang.String buttonText)
public PushButton addButton(java.lang.String buttonText,
java.lang.String actionCommand)
public PushButton removeButton(java.lang.String buttonText)
public PushButton getButton(java.lang.String buttonText)
public void removeButton(PushButton btn)
btn - the button to remove from the ButtonPanelpublic PushButton getButtonFromActionCommand(java.lang.String actionCommand)
actionCommand - the actionCommand of the button to get
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed in interface java.awt.event.ActionListenerevent - The ActionEvent from the button.public java.lang.String getSelectedActionCommand()
setSelectedActionCommand(java.lang.String)public void setSelectedActionCommand(java.lang.String selectedActionCommand)
actionCommand - the action command of the last button pressed.getSelectedActionCommand()
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||