java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.OptionPaneUI
javax.swing.plaf.basic.BasicOptionPaneUI
javax.swing.plaf.synth.SynthOptionPaneUI
- 所有已实现的接口:
-
PropertyChangeListener,EventListener,SynthConstants,SynthUI
为
JOptionPane提供Synth L&F UI代理。
- 自:
- 1.7
-
Nested Class Summary
Nested classes/interfaces declared in class javax.swing.plaf.basic.BasicOptionPaneUI
BasicOptionPaneUI.ButtonActionListener, BasicOptionPaneUI.ButtonAreaLayout, BasicOptionPaneUI.PropertyChangeHandler -
Field Summary
Fields declared in class javax.swing.plaf.basic.BasicOptionPaneUI
hasCustomComponents, initialFocusComponent, inputComponent, MinimumHeight, minimumSize, MinimumWidth, optionPane, propertyChangeListenerFields declared in interface javax.swing.plaf.synth.SynthConstants
DEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Container从BasicOptionPaneUI.installComponents()调用,创建一个包含消息主体的Container。static ComponentUI为给定的组件创建一个新的UI对象。返回指定组件的上下文。voidpaint(Graphics g, JComponent c) 根据外观和感觉绘制指定的组件。protected voidpaint(SynthContext context, Graphics g) 绘制指定的组件。voidpaintBorder(SynthContext context, Graphics g, int x, int y, int w, int h) 绘制边框。void当绑定属性更改时调用此方法。voidupdate(Graphics g, JComponent c) 通知此UI代理重新绘制指定的组件。Methods declared in class javax.swing.plaf.basic.BasicOptionPaneUI
addButtonComponents, addIcon, addMessageComponents, burstStringInto, containsCustomComponents, createButtonActionListener, createButtonArea, createLayoutManager, createPropertyChangeListener, createSeparator, getButtons, getIcon, getIconForType, getInitialValueIndex, getMaxCharactersPerLineCount, getMessage, getMinimumOptionPaneSize, getPreferredSize, getSizeButtonsToSameWidth, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, resetInputValue, selectInitialValue, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUIMethods declared in class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize
-
Constructor Details
-
SynthOptionPaneUI
public SynthOptionPaneUI()构造一个SynthOptionPaneUI。
-
-
Method Details
-
createUI
为给定的组件创建一个新的UI对象。- 参数:
-
x- 要为其创建UI对象的组件 - 返回:
- UI对象
-
getContext
返回指定组件的上下文。- 指定者:
-
getContext在接口SynthUI中 - 参数:
-
c- 请求SynthContext的组件 - 返回:
- 描述组件的SynthContext
-
update
通知此UI代理重新绘制指定的组件。此方法绘制组件背景,然后调用paint(SynthContext,Graphics)方法。一般来说,子类不需要覆盖此方法。所有外观和感觉渲染代码应位于
paint方法中。- 覆盖:
-
update在类ComponentUI中 - 参数:
-
g- 用于绘制的Graphics对象 -
c- 正在绘制的组件 - 参见:
-
paint
根据外观和感觉绘制指定的组件。此方法不被Synth外观和感觉使用。绘制由
paint(SynthContext,Graphics)方法处理。- 覆盖:
-
paint在类ComponentUI中 - 参数:
-
g- 用于绘制的Graphics对象 -
c- 正在绘制的组件 - 参见:
-
paint
绘制指定的组件。此实现不执行任何操作。- 参数:
-
context- 正在绘制的组件的上下文 -
g- 用于绘制的Graphics对象 - 参见:
-
paintBorder
绘制边框。- 指定者:
-
paintBorder在接口SynthUI中 - 参数:
-
context- 组件上下文 -
g- 要绘制的Graphics -
x- X坐标 -
y- Y坐标 -
w- 边框的宽度 -
h- 边框的高度
-
propertyChange
当绑定属性更改时调用此方法。- 指定者:
-
propertyChange在接口PropertyChangeListener中 - 参数:
-
e- 描述事件源和已更改属性的PropertyChangeEvent对象
-
createMessageArea
从BasicOptionPaneUI.installComponents()调用,创建一个包含消息主体的Container。图标是通过调用BasicOptionPaneUI.addIcon(java.awt.Container)创建的。- 覆盖:
-
createMessageArea在类BasicOptionPaneUI中 - 返回:
-
Container的一个实例
-