W3cubDocs

/OpenJDK 8 GUI

Class JToolBar.Separator

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants
Enclosing class:
JToolBar
public static class JToolBar.Separator
extends JSeparator

A toolbar-specific separator. An object with dimension but no contents used to divide buttons on a tool bar into groups.

Nested Classes

Nested classes/interfaces inherited from class javax.swing.JSeparator

JSeparator.AccessibleJSeparator

Nested classes/interfaces inherited from class javax.swing.JComponent

JComponent.AccessibleJComponent

Nested classes/interfaces inherited from class java.awt.Container

Container.AccessibleAWTContainer

Nested classes/interfaces inherited from class java.awt.Component

Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy

Fields

Fields inherited from class javax.swing.JComponent

listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW

Fields inherited from class java.awt.Component

accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT

Fields inherited from interface javax.swing.SwingConstants

BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST

Fields inherited from interface java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructors

Separator

public Separator()

Creates a new toolbar separator with the default size as defined by the current look and feel.

Separator

public Separator(Dimension size)

Creates a new toolbar separator with the specified size.

Parameters:
size - the Dimension of the separator

Methods

getUIClassID

public String getUIClassID()

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

Overrides:
getUIClassID in class JSeparator
Returns:
the string "ToolBarSeparatorUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

setSeparatorSize

public void setSeparatorSize(Dimension size)

Sets the size of the separator.

Parameters:
size - the new Dimension of the separator

getSeparatorSize

public Dimension getSeparatorSize()

Returns the size of the separator

Returns:
the Dimension object containing the separator's size (This is a reference, NOT a copy!)

getMinimumSize

public Dimension getMinimumSize()

Returns the minimum size for the separator.

Overrides:
getMinimumSize in class JComponent
Returns:
the Dimension object containing the separator's minimum size
See Also:
JComponent.setMinimumSize(java.awt.Dimension), ComponentUI

getMaximumSize

public Dimension getMaximumSize()

Returns the maximum size for the separator.

Overrides:
getMaximumSize in class JComponent
Returns:
the Dimension object containing the separator's maximum size
See Also:
JComponent.setMaximumSize(java.awt.Dimension), ComponentUI

getPreferredSize

public Dimension getPreferredSize()

Returns the preferred size for the separator.

Overrides:
getPreferredSize in class JComponent
Returns:
the Dimension object containing the separator's preferred size
See Also:
JComponent.setPreferredSize(java.awt.Dimension), ComponentUI

© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.