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
-
JToolBar()
-
-
add(Action)
-
-
addSeparator()
- Adds a separator to the ToolBar.
-
getAccessibleRole()
- Get the role of this object.
-
getComponentAtIndex(int)
-
-
getComponentIndex(Component)
-
-
getMargin()
- Returns the margin between the toolbar's border and
its buttons.
-
getUI()
- Returns the toolbar's current UI.
-
getUIClassID()
-
-
isBorderPainted()
- Checks whether the border should be painted.
-
isOpaque()
- Returns true if this component is completely opaque.
-
paintBorder(Graphics)
- Paint the toolbar's border if BorderPainted property is true.
-
setBorderPainted(boolean)
- Sets whether the border should be painted.
-
setMargin(Insets)
- Sets the margin between the toolbar's border and
its buttons.
-
setUI(ToolBarUI)
- Sets the toolbar's UI.
-
updateUI()
- Gets a new UI object from the default UIFactory.
JToolBar
public JToolBar()
getUI
public ToolBarUI getUI()
- Returns the toolbar's current UI.
- See Also:
- setUI
setUI
public void setUI(ToolBarUI ui)
- Sets the toolbar's UI.
- Parameters:
- ui - the new ToolBarUI
- See Also:
- getUI
updateUI
public void updateUI()
- Gets a new UI object from the default UIFactory.
- Overrides:
- updateUI in class JComponent
getUIClassID
public String getUIClassID()
- Returns:
- "ToolBarUI"
- Overrides:
- getUIClassID in class JComponent
- See Also:
- getUIClassID, getUI
getComponentIndex
public int getComponentIndex(Component c)
getComponentAtIndex
public Component getComponentAtIndex(int i)
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
getMargin
public Insets getMargin()
- Returns the margin between the toolbar's border and
its buttons.
isBorderPainted
public boolean isBorderPainted()
- Checks whether the border should be painted.
- See Also:
- setBorderPainted
isOpaque
public boolean isOpaque()
- Returns true if this component is completely opaque.
- Overrides:
- isOpaque in class JComponent
setBorderPainted
public void setBorderPainted(boolean b)
- Sets whether the border should be painted.
- Parameters:
- b - if true, the border is painted.
- See Also:
- isBorderPainted
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
addSeparator
public void addSeparator()
- Adds a separator to the ToolBar.
add
public JButton add(Action a)
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