All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.swing.JToolBar
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.swing.JComponent
|
+----java.awt.swing.JToolBar
- public class JToolBar
- extends JComponent
- implements Accessible
An implementation of a ToolBar
JToolBar.Separator-
JToolBar()
-
add(Action)
-
addSeparator()
- Adds a separator to the ToolBar.
getAccessibleRole()
- Get the role of this object.
getAccessibleStateSet()
- Get the state 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()
-
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.
setOpaque(boolean)
- If true the buttons background will be filled with the
background color.
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
setOpaque
public void setOpaque(boolean isOpaque)
- If true the buttons background will be filled with the
background color.
The default value of this property is true.
This is a JavaBeans bound property.
- See Also:
- isOpaque, getBackground
isOpaque
public boolean isOpaque()
- Returns:
- The value of the opaque property.
- Overrides:
- isOpaque in class JComponent
- See Also:
- setOpaque
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)
getAccessibleStateSet
public AccessibleStateSet getAccessibleStateSet()
- Get the state of this object.
- Returns:
- an instance of AccessibleStateSet containing the current state
set of the object
- Overrides:
- getAccessibleStateSet in class JComponent
- See Also:
- AccessibleState
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
Submit a bug or feature