All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.JToolBar

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.JToolBar

public class JToolBar
extends JComponent
implements Accessible
An implementation of a ToolBar


Constructor Index

 o JToolBar()

Method Index

 o add(Action)
 o addSeparator()
Adds a separator to the ToolBar.
 o getAccessibleRole()
Get the role of this object.
 o getComponentAtIndex(int)
 o getComponentIndex(Component)
 o getMargin()
Returns the margin between the toolbar's border and its buttons.
 o getUI()
Returns the toolbar's current UI.
 o getUIClassID()
 o isBorderPainted()
Checks whether the border should be painted.
 o isOpaque()
Returns true if this component is completely opaque.
 o paintBorder(Graphics)
Paint the toolbar's border if BorderPainted property is true.
 o setBorderPainted(boolean)
Sets whether the border should be painted.
 o setMargin(Insets)
Sets the margin between the toolbar's border and its buttons.
 o setUI(ToolBarUI)
Sets the toolbar's UI.
 o updateUI()
Gets a new UI object from the default UIFactory.

Constructors

 o JToolBar
 public JToolBar()

Methods

 o getUI
 public ToolBarUI getUI()
Returns the toolbar's current UI.

See Also:
setUI
 o setUI
 public void setUI(ToolBarUI ui)
Sets the toolbar's UI.

Parameters:
ui - the new ToolBarUI
See Also:
getUI
 o updateUI
 public void updateUI()
Gets a new UI object from the default UIFactory.

Overrides:
updateUI in class JComponent
 o getUIClassID
 public String getUIClassID()
Returns:
"ToolBarUI"
Overrides:
getUIClassID in class JComponent
See Also:
getUIClassID, getUI
 o getComponentIndex
 public int getComponentIndex(Component c)
 o getComponentAtIndex
 public Component getComponentAtIndex(int i)
 o setMargin
 public void setMargin(Insets m)
Sets the margin between the toolbar's border and its buttons. Setting to null will cause the toolbar to use the default margins. The toolbar's default Border object will use this value to create the proper margin. However, if a non-default border is set on the toolbar, it is that Border object's responsibility to create the appropriate margin space (else this property will effectively be ignored).

Parameters:
m - the space between the border and the buttons
 o getMargin
 public Insets getMargin()
Returns the margin between the toolbar's border and its buttons.

 o isBorderPainted
 public boolean isBorderPainted()
Checks whether the border should be painted.

See Also:
setBorderPainted
 o isOpaque
 public boolean isOpaque()
Returns true if this component is completely opaque.

Overrides:
isOpaque in class JComponent
 o setBorderPainted
 public void setBorderPainted(boolean b)
Sets whether the border should be painted.

Parameters:
b - if true, the border is painted.
See Also:
isBorderPainted
 o paintBorder
 protected void paintBorder(Graphics g)
Paint the toolbar's border if BorderPainted property is true.

Overrides:
paintBorder in class JComponent
See Also:
paint, setBorder
 o addSeparator
 public void addSeparator()
Adds a separator to the ToolBar.

 o add
 public JButton add(Action a)
 o getAccessibleRole
 public AccessibleRole getAccessibleRole()
Get the role of this object.

Returns:
an instance of AccessibleRole describing the role of the object
Overrides:
getAccessibleRole in class JComponent

All Packages  Class Hierarchy  This Package  Previous  Next  Index