- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.SplitPaneUI
-
- javax.swing.plaf.basic.BasicSplitPaneUI
-
- javax.swing.plaf.synth.SynthSplitPaneUI
-
- All Implemented Interfaces:
-
PropertyChangeListener
,EventListener
,SynthConstants
,SynthUI
public class SynthSplitPaneUI extends BasicSplitPaneUI implements PropertyChangeListener, SynthUI
为JSplitPane
提供Synth L&F UI代表。- 从以下版本开始:
- 1.7
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicSplitPaneUI
BasicSplitPaneUI.BasicHorizontalLayoutManager, BasicSplitPaneUI.BasicVerticalLayoutManager, BasicSplitPaneUI.FocusHandler, BasicSplitPaneUI.KeyboardDownRightHandler, BasicSplitPaneUI.KeyboardEndHandler, BasicSplitPaneUI.KeyboardHomeHandler, BasicSplitPaneUI.KeyboardResizeToggleHandler, BasicSplitPaneUI.KeyboardUpLeftHandler, BasicSplitPaneUI.PropertyHandler
-
-
Field Summary
-
Fields inherited from class javax.swing.plaf.basic.BasicSplitPaneUI
beginDragDividerLocation, divider, dividerResizeToggleKey, dividerSize, downKey, draggingHW, endKey, focusListener, homeKey, KEYBOARD_DIVIDER_MOVE_OFFSET, keyboardDownRightListener, keyboardEndListener, keyboardHomeListener, keyboardResizeToggleListener, keyboardUpLeftListener, layoutManager, leftKey, NON_CONTINUOUS_DIVIDER, nonContinuousLayoutDivider, propertyChangeListener, rightKey, splitPane, upKey
-
Fields inherited from interface javax.swing.plaf.synth.SynthConstants
DEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED
-
-
构造方法摘要
构造方法 Constructor 描述 SynthSplitPaneUI()
-
方法摘要
所有方法 静态方法 接口方法 具体的方法 Modifier and Type 方法 描述 BasicSplitPaneDivider
createDefaultDivider()
创建默认分隔符。protected Component
createDefaultNonContinuousLayoutDivider()
返回默认的非连续布局分隔符,它是Canvas
一个实例,用灰色填充背景。static ComponentUI
createUI(JComponent x)
创建一个新的SynthSplitPaneUI实例void
finishedPaintingChildren(JSplitPane jc, Graphics g)
当指定的拆分窗格绘制其子项时调用。SynthContext
getContext(JComponent c)
返回指定组件的上下文。protected void
installDefaults()
安装UI默认值。protected void
installListeners()
安装UI的事件监听器。void
paint(Graphics g, JComponent c)
根据外观和外观绘制指定的组件。protected void
paint(SynthContext context, Graphics g)
绘制指定的组件。void
paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
画边框void
propertyChange(PropertyChangeEvent e)
当绑定属性更改时,此方法将被调用。protected void
uninstallDefaults()
卸载UI默认值。protected void
uninstallListeners()
从UI中卸载事件侦听器。void
update(Graphics g, JComponent c)
通知此UI代理重新绘制指定的组件。-
Methods inherited from class javax.swing.plaf.basic.BasicSplitPaneUI
createFocusListener, createKeyboardDownRightListener, createKeyboardEndListener, createKeyboardHomeListener, createKeyboardResizeToggleListener, createKeyboardUpLeftListener, createPropertyChangeListener, dragDividerTo, finishDraggingTo, getDivider, getDividerBorderSize, getDividerLocation, getInsets, getLastDragLocation, getMaximumDividerLocation, getMaximumSize, getMinimumDividerLocation, getMinimumSize, getNonContinuousLayoutDivider, getOrientation, getPreferredSize, getSplitPane, installKeyboardActions, installUI, isContinuousLayout, resetLayoutManager, resetToPreferredSizes, setContinuousLayout, setDividerLocation, setLastDragLocation, setNonContinuousLayoutDivider, setNonContinuousLayoutDivider, setOrientation, startDragging, uninstallKeyboardActions, uninstallUI
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
-
-
-
-
方法详细信息
-
createUI
public static ComponentUI createUI(JComponent x)
创建一个新的SynthSplitPaneUI实例- 参数
-
x
- 为其创建UI对象的组件 - 结果
- UI对象
-
installDefaults
protected void installDefaults()
安装UI默认值。
-
installListeners
protected void installListeners()
安装UI的事件监听器。
-
uninstallDefaults
protected void uninstallDefaults()
卸载UI默认值。
-
uninstallListeners
protected void uninstallListeners()
从UI中卸载事件侦听器。
-
getContext
public SynthContext getContext(JComponent c)
返回指定组件的上下文。- Specified by:
-
getContext
在接口SynthUI
- 参数
-
c
- 组件请求SynthContext。 - 结果
- SynthContext描述组件。
-
propertyChange
public void propertyChange(PropertyChangeEvent e)
当绑定属性更改时,此方法将被调用。- Specified by:
-
propertyChange
在接口PropertyChangeListener
- 参数
-
e
- 描述事件源和已更改的属性的PropertyChangeEvent对象。
-
createDefaultDivider
public BasicSplitPaneDivider createDefaultDivider()
创建默认分隔符。- 重写:
-
createDefaultDivider
在BasicSplitPaneUI
- 结果
- 默认分频器
-
createDefaultNonContinuousLayoutDivider
protected Component createDefaultNonContinuousLayoutDivider()
返回默认的非连续布局分隔符,这是一个Canvas
的实例,用Canvas
填充背景。- 重写:
-
createDefaultNonContinuousLayoutDivider
在BasicSplitPaneUI
- 结果
- 默认的非连续布局分隔符
-
update
public void update(Graphics g, JComponent c)
通知此UI代理重新绘制指定的组件。 该方法描述了组件背景,然后调用paint(SynthContext,Graphics)
方法。通常,此方法不需要被子类覆盖。 所有Look和Feel渲染代码应该在
paint
方法中。- 重写:
-
update
在ComponentUI
- 参数
-
g
- 用于绘画的Graphics
对象 -
c
- 正在涂漆的组件 - 另请参见:
-
paint(SynthContext,Graphics)
-
paint
public void paint(Graphics g, JComponent c)
根据外观和外观绘制指定的组件。Synth Look and Feel不使用此方法。 绘画由
paint(SynthContext,Graphics)
处理。- 重写:
-
paint
在BasicSplitPaneUI
- 参数
-
g
- 用于绘画的Graphics
对象 -
c
- 正在画的部件 - 另请参见:
-
paint(SynthContext,Graphics)
-
paint
protected void paint(SynthContext context, Graphics g)
绘制指定的组件。 这个实现什么都不做。- 参数
-
context
- 正在绘制的组件的上下文 -
g
- 用于绘画的Graphics
对象 - 另请参见:
-
update(Graphics,JComponent)
-
paintBorder
public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
画边框- Specified by:
-
paintBorder
在接口SynthUI
- 参数
-
context
- 组件上下文 -
g
-Graphics
上画 -
x
- X坐标 -
y
- Y坐标 -
w
- 边框的宽度 -
h
- 边框的高度
-
finishedPaintingChildren
public void finishedPaintingChildren(JSplitPane jc, Graphics g)
当指定的拆分窗格绘制其子项时调用。- 重写:
-
finishedPaintingChildren
在BasicSplitPaneUI
- 参数
-
jc
- aJSplitPane
-
g
- theGraphics
context
-
-