public class SynthScrollPaneUI extends BasicScrollPaneUI implements PropertyChangeListener, SynthUI
JScrollPane
提供Synth L&F UI代表。
BasicScrollPaneUI.HSBChangeListener, BasicScrollPaneUI.MouseWheelHandler, BasicScrollPaneUI.PropertyChangeHandler, BasicScrollPaneUI.ViewportChangeHandler, BasicScrollPaneUI.VSBChangeListener
hsbChangeListener, scrollpane, spPropertyChangeListener, viewportChangeListener, vsbChangeListener
DEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT
Constructor and Description |
---|
SynthScrollPaneUI() |
Modifier and Type | Method and Description |
---|---|
static ComponentUI |
createUI(JComponent x)
为给定的组件创建一个新的UI对象。
|
SynthContext |
getContext(JComponent c)
返回指定组件的上下文。
|
protected void |
installDefaults(JScrollPane scrollpane) |
protected void |
installListeners(JScrollPane c) |
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(JScrollPane c) |
protected void |
uninstallListeners(JComponent c) |
void |
update(Graphics g, JComponent c)
通知此UI代理重新绘制指定的组件。
|
createHSBChangeListener, createMouseWheelListener, createPropertyChangeListener, createViewportChangeListener, createVSBChangeListener, getBaseline, getBaselineResizeBehavior, getMaximumSize, installKeyboardActions, installUI, syncScrollPaneWithViewport, uninstallKeyboardActions, uninstallUI, updateColumnHeader, updateRowHeader, updateScrollBarDisplayPolicy, updateViewport
contains, getAccessibleChild, getAccessibleChildrenCount, getMinimumSize, getPreferredSize
public static ComponentUI createUI(JComponent x)
x
- 为其创建UI对象的组件
public void update(Graphics g, JComponent c)
paint(SynthContext,Graphics)
方法。
通常,此方法不需要被子类覆盖。 所有Look和Feel渲染代码都应该在paint
。
update
在
ComponentUI
类
g
- 用于绘画的
Graphics
对象
c
- 正在涂漆的组件
paint(SynthContext,Graphics)
public void paint(Graphics g, JComponent c)
Synth Look and Feel不使用此方法。 绘画由paint(SynthContext,Graphics)
处理。
paint
在
BasicScrollPaneUI
g
- 用于绘画的
Graphics
对象
c
- 正在涂漆的组件
paint(SynthContext,Graphics)
protected void paint(SynthContext context, Graphics g)
context
- 正在绘制的组件的上下文
g
- 用于绘画的
Graphics
对象
update(Graphics,JComponent)
public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
paintBorder
在接口
SynthUI
context
- 组件上下文
g
-
Graphics
上画
x
- X坐标
y
- Y坐标
w
- 边框的宽度
h
- 边框的高度
protected void installDefaults(JScrollPane scrollpane)
protected void installListeners(JScrollPane c)
protected void uninstallDefaults(JScrollPane c)
protected void uninstallListeners(JComponent c)
public SynthContext getContext(JComponent c)
getContext
在接口
SynthUI
c
- 组件请求SynthContext。
public void propertyChange(PropertyChangeEvent e)
PropertyChangeListener
propertyChange
在接口
PropertyChangeListener
e
- 描述事件源和已更改的属性的PropertyChangeEvent对象。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.