public class BasicColorChooserUI extends ColorChooserUI
Modifier and Type | Class and Description |
---|---|
class |
BasicColorChooserUI.PropertyHandler
这个类应该被视为一个“受保护”的内部类。
|
Modifier and Type | Field and Description |
---|---|
protected JColorChooser |
chooser
JColorChooser安装了BasicColorChooserUI。
|
protected AbstractColorChooserPanel[] |
defaultChoosers |
protected ChangeListener |
previewListener |
protected PropertyChangeListener |
propertyChangeListener |
Constructor and Description |
---|
BasicColorChooserUI() |
Modifier and Type | Method and Description |
---|---|
protected AbstractColorChooserPanel[] |
createDefaultChoosers() |
protected PropertyChangeListener |
createPropertyChangeListener() |
static ComponentUI |
createUI(JComponent c) |
protected void |
installDefaults() |
protected void |
installListeners() |
protected void |
installPreviewPanel() |
void |
installUI(JComponent c)
适当地配置指定的组件的外观和感觉。
|
protected void |
uninstallDefaultChoosers() |
protected void |
uninstallDefaults() |
protected void |
uninstallListeners() |
protected void |
uninstallPreviewPanel()
从UI代理中删除已安装的预览面板。
|
void |
uninstallUI(JComponent c)
在installUI中反转在
installUI 上完成的
installUI 。
|
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
protected JColorChooser chooser
protected AbstractColorChooserPanel[] defaultChoosers
protected ChangeListener previewListener
protected PropertyChangeListener propertyChangeListener
public static ComponentUI createUI(JComponent c)
protected AbstractColorChooserPanel[] createDefaultChoosers()
protected void uninstallDefaultChoosers()
public void installUI(JComponent c)
ComponentUI
ComponentUI
实例作为指定组件上的UI委托时,将调用此方法。
该方法应该完全配置组件的外观,包括以下内容:
LayoutManager
上安装LayoutManager。 PropertyChangeListener
上创建/安装PropertyChangeListener,以便适当地检测和响应组件属性更改。 installUI
在
ComponentUI
类
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
在
ComponentUI
类
c
- 删除此UI代理的组件;
这个参数经常被忽略,但如果UI对象是无状态的并且被多个组件共享,则可能会被使用
ComponentUI.installUI(javax.swing.JComponent)
,
JComponent.updateUI()
protected void installPreviewPanel()
protected void uninstallPreviewPanel()
protected void installDefaults()
protected void uninstallDefaults()
protected void installListeners()
protected PropertyChangeListener createPropertyChangeListener()
protected void uninstallListeners()
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.