Class TLcdOkCancelButtonPanelSW

All Implemented Interfaces:
ILcdOkCancelButtonPanel, ImageObserver, MenuContainer, Serializable, Accessible

public class TLcdOkCancelButtonPanelSW extends JPanel implements ILcdOkCancelButtonPanel
Deprecated.
use JOptionPane or another GUI toolkit equivalent instead
This is a util class that can be used as a Button Panel with Apply, OK and Cancel and Help Buttons.

The OK and Cancel buttons are displayed if either a "WindowToDispose" has been set using the setWindowToDispose method, or if the Parent Container of this Panel is a Window, or if the parent of the parent Container if a Window, and has only one Component that is the parent of this TLcdButtonPanel.

The Help button is displayed if a valid ILcdHelpActionFactory is set (by default, the factory is null) and a help id string is set by using setHelpIDString.

Pressing the escape key has the same effect as the cancel button.

See Also:
  • Constructor Details

    • TLcdOkCancelButtonPanelSW

      public TLcdOkCancelButtonPanelSW()
      Deprecated.
      Default constructor. The Layout is a FlowLayout with a right alignment. The buttons are from left to right: Apply, OK and Cancel.
  • Method Details

    • getHelpActionFactory

      public static ILcdHelpActionFactory getHelpActionFactory()
      Deprecated.
      Returns:
      The help action factory associated with this object. Default is null.
    • setHelpActionFactory

      public static void setHelpActionFactory(ILcdHelpActionFactory aHelpActionFactory)
      Deprecated.
      Sets the help action factory used to create an action listener for the help button.
      Parameters:
      aHelpActionFactory - The new factory to be used, or null if you don't want help buttons. Null is default.
    • setDisposeWindowOnOk

      public void setDisposeWindowOnOk(boolean aDisposeWindowOnOk)
      Deprecated.
    • getDisposeWindowOnOk

      public boolean getDisposeWindowOnOk()
      Deprecated.
    • setDisposeWindowOnCancel

      public void setDisposeWindowOnCancel(boolean aDisposeWindowOnCancel)
      Deprecated.
    • getDisposeWindowOnCancel

      public boolean getDisposeWindowOnCancel()
      Deprecated.
    • getComponent

      public Component getComponent()
      Deprecated.
      Description copied from interface: ILcdOkCancelButtonPanel
      Returns the Component.
      Specified by:
      getComponent in interface ILcdOkCancelButtonPanel
    • setWindowToDispose

      public void setWindowToDispose(Window aWindowToDispose)
      Deprecated.
      Sets the Window to dispose when pressing of the OK or Cancel Button.
      Specified by:
      setWindowToDispose in interface ILcdOkCancelButtonPanel
    • getWindowToDispose

      public Window getWindowToDispose()
      Deprecated.
      Gets the Window to be disposed when pressing of the OK or Cancel Button, or null if no such Window has been set.
    • disposeParentWindow

      public void disposeParentWindow()
      Deprecated.
      Ask to dispose a Parent Window if possible. This method is called when pressing of the OK or Cancel Button.
    • paint

      public void paint(Graphics g)
      Deprecated.
      Overrides:
      paint in class JComponent
    • checkButtonPresence

      protected void checkButtonPresence()
      Deprecated.
      Check if the OK and Cancel Buttons are required or not, depending on the presence of a parent Window to dispose.
    • getHelpIDString

      public String getHelpIDString()
      Deprecated.
      Specified by:
      getHelpIDString in interface ILcdOkCancelButtonPanel
      Returns:
      The help id string associated with the help button of this panel, default is null.
    • setHelpIDString

      public void setHelpIDString(String aHelpID)
      Deprecated.
      Description copied from interface: ILcdOkCancelButtonPanel
      Sets the help id for the button. Pressing the help button will have the effect that the help item for the given help id will be displayed. Setting null means to remove the currently help id's. The presence of the help button depends on whether a help id is set or not.
      Specified by:
      setHelpIDString in interface ILcdOkCancelButtonPanel
      Parameters:
      aHelpID - The help id for the help button.
    • addActionListener

      public void addActionListener(ActionListener aActionListener)
      Deprecated.
      Description copied from interface: ILcdOkCancelButtonPanel
      Add aActionListener to all the buttons.
      Specified by:
      addActionListener in interface ILcdOkCancelButtonPanel
    • removeActionListener

      public void removeActionListener(ActionListener aActionListener)
      Deprecated.
      Description copied from interface: ILcdOkCancelButtonPanel
      Remove aActionListener to all the buttons.
      Specified by:
      removeActionListener in interface ILcdOkCancelButtonPanel
    • getApplyButton

      public Component getApplyButton()
      Deprecated.
      Description copied from interface: ILcdOkCancelButtonPanel
      Returns the Apply Component.
      Specified by:
      getApplyButton in interface ILcdOkCancelButtonPanel
      Returns:
      the Apply Button.
    • getOkButton

      public Component getOkButton()
      Deprecated.
      Description copied from interface: ILcdOkCancelButtonPanel
      Returns the OK Component.
      Specified by:
      getOkButton in interface ILcdOkCancelButtonPanel
      Returns:
      the OK Button.
    • getHelpButton

      public Component getHelpButton()
      Deprecated.
      Description copied from interface: ILcdOkCancelButtonPanel
      Returns the Help Component.
      Specified by:
      getHelpButton in interface ILcdOkCancelButtonPanel
      Returns:
      the Help Button
    • getCancelButton

      public Component getCancelButton()
      Deprecated.
      Description copied from interface: ILcdOkCancelButtonPanel
      Returns the Cancel Component.
      Specified by:
      getCancelButton in interface ILcdOkCancelButtonPanel
      Returns:
      the Cancel Button.