Spec-Zone.ru › OpenJDK 25

Class MetalToolBarUI

java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ToolBarUI
javax.swing.plaf.basic.BasicToolBarUI
javax.swing.plaf.metal.MetalToolBarUI
All Implemented Interfaces:
SwingConstants
public class MetalToolBarUI extends BasicToolBarUI
A Metal Look and Feel implementation of ToolBarUI. This implementation is a "combined" view/controller.

Nested Class Summary

Modifier and Type Class Description
protected class  MetalToolBarUI.MetalContainerListener
No longer used.
protected class  MetalToolBarUI.MetalDockingListener
DockingListener for MetalToolBarUI.
protected class  MetalToolBarUI.MetalRolloverListener
No longer used.

Nested classes/interfaces declared in class BasicToolBarUI

BasicToolBarUI.DockingListener, BasicToolBarUI.DragWindow, BasicToolBarUI.FrameListener, BasicToolBarUI.PropertyListener, BasicToolBarUI.ToolBarContListener, BasicToolBarUI.ToolBarFocusListener

Field Summary

Modifier and Type Field Description
protected ContainerListener contListener
This protected field is implementation specific.
protected PropertyChangeListener rolloverListener
This protected field is implementation specific.

Fields declared in class BasicToolBarUI

constraintBeforeFloating, dockingBorderColor, dockingColor, dockingListener, downKey, dragWindow, floatingBorderColor, floatingColor, focusedCompIndex, leftKey, propertyListener, rightKey, toolBar, toolBarContListener, toolBarFocusListener, upKey

Fields declared in interface SwingConstants

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

Constructor Summary

Constructor Description
MetalToolBarUI()
Constructs a MetalToolBarUI.

Method Summary

Modifier and Type Method Description
protected ContainerListener createContainerListener()
Creates a container listener that will be added to the JToolBar.
protected PropertyChangeListener createRolloverListener()
Creates a property change listener that will be added to the JToolBar.
static ComponentUI createUI(JComponent c)
Constructs an instance of MetalToolBarUI.
protected void setDragOffset(Point p)
Sets the offset of the mouse cursor inside the DragWindow.
void update(Graphics g, JComponent c)
If necessary paints the background of the component, then invokes paint.

Methods declared in class BasicToolBarUI

canDock, createDockingListener, createDragWindow, createFloatingFrame, createFloatingWindow, createFrameListener, createNonRolloverBorder, createPropertyListener, createRolloverBorder, createToolBarContListener, createToolBarFocusListener, dragTo, floatAt, getDockingColor, getFloatingColor, getNonRolloverBorder, getRolloverBorder, installComponents, installDefaults, installKeyboardActions, installListeners, installNonRolloverBorders, installNormalBorders, installRolloverBorders, isFloating, isRolloverBorders, navigateFocusedComp, paintDragWindow, setBorderToNonRollover, setBorderToNormal, setBorderToRollover, setDockingColor, setFloating, setFloatingColor, setFloatingLocation, setOrientation, setRolloverBorders, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners

Methods declared in class ComponentUI

contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI

Methods declared in class Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

contListener

protected ContainerListener contListener
This protected field is implementation specific. Do not access directly or override. Use the create method instead.
See Also:
  • createContainerListener()

rolloverListener

protected PropertyChangeListener rolloverListener
This protected field is implementation specific. Do not access directly or override. Use the create method instead.
See Also:
  • createRolloverListener()

Constructor Details

MetalToolBarUI

public MetalToolBarUI()
Constructs a MetalToolBarUI.

Method Details

createUI

public static ComponentUI createUI(JComponent c)
Constructs an instance of MetalToolBarUI.
Parameters:
c - a component
Returns:
an instance of MetalToolBarUI

createContainerListener

protected ContainerListener createContainerListener()
Creates a container listener that will be added to the JToolBar. If this method returns null then it will not be added to the toolbar.
Returns:
an instance of a ContainerListener or null

createRolloverListener

protected PropertyChangeListener createRolloverListener()
Creates a property change listener that will be added to the JToolBar. If this method returns null then it will not be added to the toolbar.
Returns:
an instance of a PropertyChangeListener or null

setDragOffset

protected void setDragOffset(Point p)
Sets the offset of the mouse cursor inside the DragWindow.
Parameters:
p - the offset

update

public void update(Graphics g, JComponent c)
If necessary paints the background of the component, then invokes paint.
Overrides:
update in class ComponentUI
Parameters:
g - Graphics to paint to
c - JComponent painting on
Throws:
NullPointerException - if g or c is null
Since:
1.5
See Also:
  • ComponentUI.update(Graphics, JComponent)
  • ComponentUI.paint(Graphics, JComponent)

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2025, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

© 1993, 2025, 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.
https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/javax/swing/plaf/metal/MetalToolBarUI.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API