Class PToolBar

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

public class PToolBar extends JToolBar
A toolbar that has a layout more like that described in the Java Look and Feel Guidelines. This is more for toolbars that contain buttons with labels; If using a toolbar with icons use the normal JToolBar.
Version:
%version: 9 % %date_modified: Wed Oct 24 10:21:55 2001 %
Author:
kapono
See Also:
  • Constructor Details

    • PToolBar

      public PToolBar()
      Creates a HORIZONTAL toolbar
    • PToolBar

      public PToolBar(int orientation)
      Creates a new toolbar with the specified orientation. The orientation must be either HORIZONTAL or VERTICAL.
      Parameters:
      orientation - the orientation desired
  • Method Details

    • setOrientation

      public void setOrientation(int o)
      Set the orientation of the toolbar
      Overrides:
      setOrientation in class JToolBar
      Parameters:
      o - The new orientation (HORIZONTAL/VERTICAL)
      See Also:
    • add

      public JButton add(Action a)
      Create a new PToolBarButton based on the passed in Action
      Overrides:
      add in class JToolBar
      Parameters:
      a - the Action object to add as a new toolbar item
    • createActionComponent

      protected JButton createActionComponent(Action a)
      Factory method which creates the JButton for Actions added to the PToolBar. The default name is empty if a null action is passed.

      As of 1.3, this is no longer the preferred method for adding Actions to a Container. Instead it is recommended to configure a control with an action using setAction, and then add that control directly to the Container.

      Overrides:
      createActionComponent in class JToolBar
      Parameters:
      a - the Action for the button to be added
      Returns:
      the newly created button
      See Also: