Class InterfaceOperationChooser

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

public class InterfaceOperationChooser extends JToolBar

The InterfaceOperationChooser class is a JToolBar that allows the user to perform basic interface change operations.

A static instance of this class is available via getInstance() so that a single chooser may be used from multiple classes, even though it is only included in one layout manager.

Since:
3.8.1
Author:
Peter Hollemans
See Also:
  • Field Details

  • Constructor Details

    • InterfaceOperationChooser

      public InterfaceOperationChooser()
      Creates a new horizontal operation chooser with text and icons. By default, the chooser is set to be not floatable.
    • InterfaceOperationChooser

      public InterfaceOperationChooser(int orientation, boolean showText)
      Creates a new operation chooser. By default, the chooser is set to be not floatable.
      Parameters:
      orientation - the toolbar orientation, either HORIZONTAL or VERTICAL.
      showText - the show text flag. If true, text is shown below the icon in each button. If false, no text is shown, but a tool tip is set for the button.
  • Method Details

    • setShowText

      public void setShowText(boolean flag)
      Sets the visiblity of the toolbar text labels.
      Parameters:
      flag - the new text visibility flag value.
    • setEnabled

      public void setEnabled(boolean flag)
      Sets the enabled status of the chooser buttons.
      Overrides:
      setEnabled in class JComponent
    • getInstance

      public static InterfaceOperationChooser getInstance()
      Creates a static instance of this class using the default constructor.
      Returns:
      the static instance of this class.
    • main

      public static void main(String[] argv)
      Tests this class.
      Parameters:
      argv - the array of command line parameters.