All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.visuals
Class ButtonPanel

    com.sas.visuals.ButtonPanel

All Implemented Interfaces:
  ContainerInterface, com.sas.awt.print.PrintableInterface, VisualInterface, com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, com.sas.ComponentInterface, com.sas.DesignTimeDropTargetInterface, com.sas.LinkPropertiesInterface, com.sas.ModelInterface, ValidatorInterface, com.sas.ViewInterface, MultipleValueEventSourceInterface, java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.util.EventListener

    public class ButtonPanel

implements java.awt.event.ActionListener

ButtonPanel creates a consistent looking set of buttons in a row. It is used by the OkCancelHelpDialog.

See Also:
  Serialized Form

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 class com.sas.awt.ContainerContainerComponent
`addNotify, clone, dragEnter, dragLeave, dragOver, drop, getContainerInterfaceSupportInfo, getErrorHandler, getInsets, getValidator, isIDEDnDDropBarrier, isIDEDnDDropTarget, isValid, removeNotify, setContainerInterfaceSupportInfo, setErrorHandler, setIDEDnDDropBarrier, setIDEDnDDropTarget, setInsets, setInsets, setValidator, superAddNotify, superGetInsets, superRemoveNotify, superSetDefaultValues`

Methods inherited from class com.sas.awt.ContainerVisualComponent
`addLink, addPropertyChangeListener, addVetoableChangeListener, anyPropertyChangeListeners, attachModel, attachView, computePreferredSize, detachModel, detachView, dumpComponent, firePropertyChange, firePropertyChange, fireVetoableChange, getBackgroundColor, getBorder, getComponentDescription, getComponentSupportInfo, getEventMethod, getEventValues, getFont, getForegroundColor, getHeight, getHorizontalPosition, getLinkInfo, getMinimumSize, getModelInterface, getPageBounds, getPreferredSize, getPrePainter, getPrintOptionsPanel, getRequiredInterfaces, getVerticalPosition, getViewInterfaceSupportInfo, getVisualInterfaceSupportInfo, getWidth, initialize, initializeComponent, isDesignTime, isEnabled, isFocus, isLinked, isTransparent, isVisible, pageExists, paint, print, printFinalize, printInitialize, propertyChange, queryLinks, queryLinks, refresh, removeAllLinks, removeInterfaceTraps, removeLink, removePropertyChangeListener, removeVetoableChangeListener, setBackgroundColor, setBorder, setBounds, setComponentDescription, setComponentSupportInfo, setEnabled, setFocus, setFont, setForegroundColor, setHeight, setHorizontalPosition, setLinkInfo, setModelInterface, setPreferredSize, setPrePainter, setRequiredInterfaces, setTransparent, setVerticalPosition, setViewInterfaceSupportInfo, setVisible, setVisualInterfaceSupportInfo, setWidth, superGetFont, superGetMinimumSize, superGetPreferredSize, superIsEnabled, superIsVisible, superPaint, superSetBounds, superSetEnabled, superSetFont, superSetVisible, superUpdate, supportsListenerInterface, supportsRequiredInterfaces, trapInterfaceEvents, update, validateObject`

Methods inherited from interface com.sas.awt.ContainerInterface
`getComponents, getLayout, invalidate, setLayout, validate`

Methods inherited from interface com.sas.awt.VisualInterface
`computePreferredSize, getBackgroundColor, getBorder, getFont, getForegroundColor, getHeight, getHorizontalPosition, getMinimumSize, getPreferredSize, getPrePainter, getVerticalPosition, getVisualInterfaceSupportInfo, getWidth, isEnabled, isFocus, isTransparent, isVisible, setBackgroundColor, setBorder, setBounds, setEnabled, setFocus, setFont, setForegroundColor, setHeight, setHorizontalPosition, setPreferredSize, setPrePainter, setTransparent, setVerticalPosition, setVisible, setVisualInterfaceSupportInfo, setWidth, superGetFont, superGetMinimumSize, superGetPreferredSize, superIsEnabled, superIsVisible, superPaint, superSetBounds, superSetEnabled, superSetFont, superSetVisible, superUpdate`

Field Detail

### buttons

    protected Container buttons

### selectedActionCommand

    protected java.lang.String selectedActionCommand

Constructor Detail

### ButtonPanel

    public ButtonPanel()

### ButtonPanel

    public ButtonPanel(java.lang.String[][] buttonInfo)

Method Detail

### makeButton

    protected PushButton makeButton(java.lang.String text)

  makeButton is a factory method which creates a PushButton to using in the ButtonPanel.

  Parameters:
    `text` - The text to put on the button.

### addButton

    public PushButton addButton(java.lang.String buttonText)

### addButton

    public PushButton addButton(java.lang.String buttonText,
                                java.lang.String actionCommand)

### removeButton

    public PushButton removeButton(java.lang.String buttonText)

### getButton

    public PushButton getButton(java.lang.String buttonText)

### removeButton

    public void removeButton(PushButton btn)

  Remove the specified button from the ButtonPanel.

  Parameters:
    `btn` - the button to remove from the ButtonPanel

### getButtonFromActionCommand

    public PushButton getButtonFromActionCommand(java.lang.String actionCommand)

  Get the button from the specified actionCommand.

  Parameters:
    `actionCommand` - the actionCommand of the button to get
  Returns:
    the button with the specified actionCommand or null

### actionPerformed

    public 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.

  Specified by:
    `actionPerformed` in interface `java.awt.event.ActionListener`
  Parameters:
    `event` - The ActionEvent from the button.

### getSelectedActionCommand

    public java.lang.String getSelectedActionCommand()

  getSelectedActionCommand returns the action command of the last button pressed.

  Returns:
    the action command of the last button pressed.
  See Also:
    `setSelectedActionCommand(java.lang.String)`

### setSelectedActionCommand

    public void setSelectedActionCommand(java.lang.String selectedActionCommand)

  setSelectedActionCommand sets the action command that was last pressed. This is used internally by the button event handler. A user might use setSelectedActionCommand to clear out the last selection once it has been read.

  Parameters:
    `actionCommand` - the action command of the last button pressed.
  See Also:
    `getSelectedActionCommand()`

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.