Package rma.swing

Class ButtonCmdPanel

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, EditableComponent

public class ButtonCmdPanel extends JPanel implements ActionListener, Serializable, EditableComponent
ButtonCmdPanel.java Creates a panel which can host a OK/CANCEL/APPLY/HELP Buttons. Sends an Action Event with the ID of the button which the user click. To catch events the listener must implement ButtonCmdPanelListener.
See Also:
  • Field Details

  • Constructor Details

    • ButtonCmdPanel

      public ButtonCmdPanel()
    • ButtonCmdPanel

      public ButtonCmdPanel(int display_buttons)
    • ButtonCmdPanel

      public ButtonCmdPanel(int display_buttons, Insets insets)
  • Method Details

    • addCmdPanelListener

      public void addCmdPanelListener(ButtonCmdPanelListener l)
    • removeCmdPanelListener

      public void removeCmdPanelListener(ButtonCmdPanelListener l)
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • fireActionPerformed

      protected void fireActionPerformed(ActionEvent event, JButton button, int buttonType)
    • getButton

      public JButton getButton(int buttonId)
      Returns the JButton for the button id. If the panel was not created with that button (ie the ids passed to the constructor) then null is returned.
    • getButton

      public JButton getButton(String buttonText)
      Returns the JButton with the text buttonText. If the panel was not created with that button (ie the ids passed to the constructor) then null is returned.
      Parameters:
      buttonText - the text of the button to return
    • setApplyAlwaysOn

      public void setApplyAlwaysOn(boolean on)
      Allows the apply button to always be fixed on
    • setApplyEnabled

      public void setApplyEnabled(boolean enabled)
      Allows the apply button to be toggled on and off
    • setButtonEnable

      public void setButtonEnable(int buttonID, boolean enabled)
    • setButtonVisible

      public void setButtonVisible(int buttonID, boolean visible)
    • doButtonClick

      public void doButtonClick(int buttonID)
    • main

      public static void main(String[] args)
    • setIsEditable

      public void setIsEditable(boolean b)
      Specified by:
      setIsEditable in interface EditableComponent