public class MetalScrollPaneUI extends BasicScrollPaneUI
警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4开始,对所有JavaBeans的长期存储的支持已经添加到java.beans
包中。 请参阅XMLEncoder
。
BasicScrollPaneUI.HSBChangeListener, BasicScrollPaneUI.MouseWheelHandler, BasicScrollPaneUI.PropertyChangeHandler, BasicScrollPaneUI.ViewportChangeHandler, BasicScrollPaneUI.VSBChangeListener
hsbChangeListener, scrollpane, spPropertyChangeListener, viewportChangeListener, vsbChangeListener
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 |
---|
MetalScrollPaneUI() |
Modifier and Type | Method and Description |
---|---|
protected PropertyChangeListener |
createScrollBarSwapListener() |
static ComponentUI |
createUI(JComponent x) |
void |
installListeners(JScrollPane scrollPane) |
void |
installUI(JComponent c)
适当地配置指定的组件的外观和感觉。
|
protected void |
uninstallListeners(JComponent c) |
void |
uninstallListeners(JScrollPane scrollPane)
已弃用
|
void |
uninstallUI(JComponent c)
在installUI中反转在
installUI 上完成的
installUI 。
|
createHSBChangeListener, createMouseWheelListener, createPropertyChangeListener, createViewportChangeListener, createVSBChangeListener, getBaseline, getBaselineResizeBehavior, getMaximumSize, installDefaults, installKeyboardActions, paint, syncScrollPaneWithViewport, uninstallDefaults, uninstallKeyboardActions, updateColumnHeader, updateRowHeader, updateScrollBarDisplayPolicy, updateViewport
contains, getAccessibleChild, getAccessibleChildrenCount, getMinimumSize, getPreferredSize, update
public static ComponentUI createUI(JComponent x)
public void installUI(JComponent c)
ComponentUI
ComponentUI
实例作为指定组件上的UI委托时,将调用此方法。
该方法应该完全配置组件的外观,包括以下内容:
LayoutManager
上安装LayoutManager。 PropertyChangeListener
上创建/安装PropertyChangeListener,以便适当地检测和响应组件属性的更改。 installUI
在
BasicScrollPaneUI
c
- 正在安装此UI代理的组件
ComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(JComponent c)
ComponentUI
installUI
上完成的installUI
。
当将此UIComponent
实例作为指定组件的UI委托删除时,将调用此方法。
该方法应该撤消在installUI中执行的installUI
,小心使JComponent
实例处于干净状态(无外部侦听器,外观特定属性对象等)。
这应该包括以下内容:
uninstallUI
在
BasicScrollPaneUI
c
- 从中删除此UI代理的组件;
这个参数经常被忽略,但如果UI对象是无状态的并且被多个组件共享,则可能会被使用
ComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
public void installListeners(JScrollPane scrollPane)
protected void uninstallListeners(JComponent c)
@Deprecated public void uninstallListeners(JScrollPane scrollPane)
uninstallListeners(JComponent)
protected PropertyChangeListener createScrollBarSwapListener()
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.