java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ToolBarUI
javax.swing.plaf.basic.BasicToolBarUI
javax.swing.plaf.metal.MetalToolBarUI
- 所有已实现的接口:
-
SwingConstants
ToolBarUI的Metal外观实现。此实现是一个“组合”视图/控制器。
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
不再使用。protected class
用于MetalToolBarUI的DockingListener。protected class
不再使用。Nested classes/interfaces declared in class javax.swing.plaf.basic.BasicToolBarUI
BasicToolBarUI.DockingListener, BasicToolBarUI.DragWindow, BasicToolBarUI.FrameListener, BasicToolBarUI.PropertyListener, BasicToolBarUI.ToolBarContListener, BasicToolBarUI.ToolBarFocusListener
-
Field Summary
Modifier and TypeFieldDescriptionprotected ContainerListener
此受保护字段是特定于实现的。protected PropertyChangeListener
此受保护字段是特定于实现的。Fields declared in class javax.swing.plaf.basic.BasicToolBarUI
constraintBeforeFloating, dockingBorderColor, dockingColor, dockingListener, downKey, dragWindow, floatingBorderColor, floatingColor, focusedCompIndex, leftKey, propertyListener, rightKey, toolBar, toolBarContListener, toolBarFocusListener, upKey
Fields declared in 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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ContainerListener
创建一个将添加到JToolBar的容器监听器。protected PropertyChangeListener
创建一个将添加到JToolBar的属性更改监听器。static ComponentUI
构造MetalToolBarUI的一个实例。protected void
设置DragWindow内鼠标光标的偏移量。void
update
(Graphics g, JComponent c) 如有必要,绘制组件的背景,然后调用paint。Methods declared in class javax.swing.plaf.basic.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 javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI
-
Field Details
-
contListener
此受保护字段是特定于实现的。请勿直接访问或覆盖。请改用create方法。- 参见:
-
rolloverListener
此受保护字段是特定于实现的。请勿直接访问或覆盖。请改用create方法。- 参见:
-
-
Constructor Details
-
MetalToolBarUI
public MetalToolBarUI()构造一个MetalToolBarUI。
-
-
Method Details
-
createUI
构造MetalToolBarUI的一个实例。- 参数:
-
c
- 一个组件 - 返回:
- 一个MetalToolBarUI的实例
-
createContainerListener
创建一个将添加到JToolBar的容器监听器。如果此方法返回null,则不会添加到工具栏中。- 返回:
- 一个ContainerListener的实例或null
-
createRolloverListener
创建一个将添加到JToolBar的属性更改监听器。如果此方法返回null,则不会添加到工具栏中。- 返回:
- 一个PropertyChangeListener的实例或null
-
setDragOffset
设置DragWindow内鼠标光标的偏移量。- 参数:
-
p
- 偏移量
-
update
如有必要,绘制组件的背景,然后调用paint。- 覆盖:
-
update
在类ComponentUI
- 参数:
-
g
- 要绘制的Graphics -
c
- 正在绘制的JComponent - 抛出:
-
NullPointerException
- 如果g
或c
为null - 自:
- 1.5
- 参见:
-