JToolBar (Java Platform SE 8 ) (original) (raw)

Modifier and Type

Method

Description

[JButton](../../javax/swing/JButton.html "class in javax.swing")

[add](../../javax/swing/JToolBar.html#add-javax.swing.Action-)([Action](../../javax/swing/Action.html "interface in javax.swing") a)

Adds a new JButton which dispatches the action.

protected void

[addImpl](../../javax/swing/JToolBar.html#addImpl-java.awt.Component-java.lang.Object-int-)([Component](../../java/awt/Component.html "class in java.awt") comp,[Object](../../java/lang/Object.html "class in java.lang") constraints, int index)

If a JButton is being added, it is initially set to be disabled.

void

[addSeparator](../../javax/swing/JToolBar.html#addSeparator--)()

Appends a separator of default size to the end of the tool bar.

void

[addSeparator](../../javax/swing/JToolBar.html#addSeparator-java.awt.Dimension-)([Dimension](../../java/awt/Dimension.html "class in java.awt") size)

Appends a separator of a specified size to the end of the tool bar.

protected [PropertyChangeListener](../../java/beans/PropertyChangeListener.html "interface in java.beans")

[createActionChangeListener](../../javax/swing/JToolBar.html#createActionChangeListener-javax.swing.JButton-)([JButton](../../javax/swing/JButton.html "class in javax.swing") b)

Returns a properly configured PropertyChangeListener which updates the control as changes to the Action occur, or null if the default property change listener for the control is desired.

protected [JButton](../../javax/swing/JButton.html "class in javax.swing")

[createActionComponent](../../javax/swing/JToolBar.html#createActionComponent-javax.swing.Action-)([Action](../../javax/swing/Action.html "interface in javax.swing") a)

Factory method which creates the JButton forActions added to the JToolBar.

[AccessibleContext](../../javax/accessibility/AccessibleContext.html "class in javax.accessibility")

[getAccessibleContext](../../javax/swing/JToolBar.html#getAccessibleContext--)()

Gets the AccessibleContext associated with this JToolBar.

[Component](../../java/awt/Component.html "class in java.awt")

[getComponentAtIndex](../../javax/swing/JToolBar.html#getComponentAtIndex-int-)(int i)

Returns the component at the specified index.

int

[getComponentIndex](../../javax/swing/JToolBar.html#getComponentIndex-java.awt.Component-)([Component](../../java/awt/Component.html "class in java.awt") c)

Returns the index of the specified component.

[Insets](../../java/awt/Insets.html "class in java.awt")

[getMargin](../../javax/swing/JToolBar.html#getMargin--)()

Returns the margin between the tool bar's border and its buttons.

int

[getOrientation](../../javax/swing/JToolBar.html#getOrientation--)()

Returns the current orientation of the tool bar.

[ToolBarUI](../../javax/swing/plaf/ToolBarUI.html "class in javax.swing.plaf")

[getUI](../../javax/swing/JToolBar.html#getUI--)()

Returns the tool bar's current UI.

[String](../../java/lang/String.html "class in java.lang")

[getUIClassID](../../javax/swing/JToolBar.html#getUIClassID--)()

Returns the name of the L&F class that renders this component.

boolean

[isBorderPainted](../../javax/swing/JToolBar.html#isBorderPainted--)()

Gets the borderPainted property.

boolean

[isFloatable](../../javax/swing/JToolBar.html#isFloatable--)()

Gets the floatable property.

boolean

[isRollover](../../javax/swing/JToolBar.html#isRollover--)()

Returns the rollover state.

protected void

[paintBorder](../../javax/swing/JToolBar.html#paintBorder-java.awt.Graphics-)([Graphics](../../java/awt/Graphics.html "class in java.awt") g)

Paints the tool bar's border if the borderPainted property is true.

protected [String](../../java/lang/String.html "class in java.lang")

[paramString](../../javax/swing/JToolBar.html#paramString--)()

Returns a string representation of this JToolBar.

void

[setBorderPainted](../../javax/swing/JToolBar.html#setBorderPainted-boolean-)(boolean b)

Sets the borderPainted property, which istrue if the border should be painted.

void

[setFloatable](../../javax/swing/JToolBar.html#setFloatable-boolean-)(boolean b)

Sets the floatable property, which must be true for the user to move the tool bar.

void

[setLayout](../../javax/swing/JToolBar.html#setLayout-java.awt.LayoutManager-)([LayoutManager](../../java/awt/LayoutManager.html "interface in java.awt") mgr)

Sets the layout manager for this container.

void

[setMargin](../../javax/swing/JToolBar.html#setMargin-java.awt.Insets-)([Insets](../../java/awt/Insets.html "class in java.awt") m)

Sets the margin between the tool bar's border and its buttons.

void

[setOrientation](../../javax/swing/JToolBar.html#setOrientation-int-)(int o)

Sets the orientation of the tool bar.

void

[setRollover](../../javax/swing/JToolBar.html#setRollover-boolean-)(boolean rollover)

Sets the rollover state of this toolbar.

void

[setUI](../../javax/swing/JToolBar.html#setUI-javax.swing.plaf.ToolBarUI-)([ToolBarUI](../../javax/swing/plaf/ToolBarUI.html "class in javax.swing.plaf") ui)

Sets the L&F object that renders this component.

void

[updateUI](../../javax/swing/JToolBar.html#updateUI--)()

Notification from the UIFactory that the L&F has changed.