Class JavaTestToolBar

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

public class JavaTestToolBar extends JToolBar
The custom toolbar.
See Also:
  • Constructor Details

    • JavaTestToolBar

      public JavaTestToolBar(ResourceBundle bundle, String resourceID, boolean menuControlled)
      Creates using specified ResourceBundle a new tool bar with the specified menu controlled state.
      Parameters:
      bundle - a resource bundle used to obtain the resources for the toolbar.
      resourceID - String ID should be unique within the instance of the test suite. The ID is never visible to the user. The ID should be a short, alphanumeric (Latin) string. It is automatically used to retrieve the toolbar name and description from the resource bundle. Can't be null and empty string.
      menuControlled - - true to make View/Toolbars/menu for the toolbar.
    • JavaTestToolBar

      public JavaTestToolBar(ResourceBundle bundle, String resourceID)
      Creates using specified ResourceBundle a new menu controlled tool bar.
      Parameters:
      bundle - a resource bundle used to obtain the resources for the toolbar.
      resourceID - String ID should be unique within the instance of the test suite. The ID is never visible to the user. The ID should be a short, alphanumeric (Latin) string. It is automatically used to retrieve the toolbar name and description from the resource bundle. Can't be null and empty string.
  • Method Details

    • getId

      public String getId()
      Get the identification string for this toolbar.
      Returns:
      the string ID for the tool bar.
    • getDescription

      public String getDescription()
      Get the long description of this toolbar's purpose. May be multiple sentences if desired. This is automatically retrieved from the supplied resource bundle by combining it with the toolbar ID (getId()), e.g. it will try to retrieve getId().tb.desc from the resource bundle.
      Returns:
      the long description for the tool bar.
    • getName

      public String getName()
      Get the short name of this toolbar. Would be used in places such as a toolbar selector drop-down for the user, so it should be kept to one or two words. This is automatically retrieved from the supplied resource bundle by combining it with the toolbar ID (getId()), e.g. it will try to retrieve getId().tb.name from the resource bundle.
      Overrides:
      getName in class Component
      Returns:
      the short for the tool bar.
    • isMenuControlled

      public boolean isMenuControlled()
      Determines whether this tool bar should be controlled from view menu.
      Returns:
      true if this tool bar is menu controlled.
    • setVisible

      public void setVisible(boolean visible)
      Shows or hides this component depending on the value of parameter visible. visible - true to make the component visible; false to make it invisible
      Overrides:
      setVisible in class JComponent