public class SynthEditorPaneUI extends BasicEditorPaneUI implements SynthUI
JEditorPane提供Synth L&F UI代表。
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighterDEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED| Constructor and Description |
|---|
SynthEditorPaneUI() |
| Modifier and Type | Method and Description |
|---|---|
static ComponentUI |
createUI(JComponent c)
为给定的组件创建一个新的UI对象。
|
SynthContext |
getContext(JComponent c)
返回指定组件的上下文。
|
protected void |
installDefaults()
初始化组件属性,如字体,前景,背景,插入符号颜色,选择颜色,选定的文本颜色,禁用的文本颜色和边框颜色。
|
protected void |
paint(SynthContext context, Graphics g)
绘制指定的组件。
|
protected void |
paintBackground(Graphics g)
绘制视图的背景。
|
void |
paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
画边框
|
protected void |
propertyChange(PropertyChangeEvent evt)
当在关联的JTextComponent上更改bound属性时,将调用此方法。
|
protected void |
uninstallDefaults()
将未明确覆盖的组件属性设置为
null 。
|
void |
update(Graphics g, JComponent c)
通知此UI代理重新绘制指定的组件。
|
getEditorKit, getPropertyPrefix, installUI, uninstallUIcreate, create, createCaret, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getToolTipText, getVisibleEditorRect, installKeyboardActions, installListeners, modelChanged, modelToView, modelToView, paint, paintSafely, setView, uninstallKeyboardActions, uninstallListeners, viewToModel, viewToModelcontains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehaviorpublic static ComponentUI createUI(JComponent c)
c - 创建UI对象的组件
protected void installDefaults()
protected void uninstallDefaults()
null 。
如果某个属性的当前值不是UIResource,则该属性被视为被UIResource 。
protected void propertyChange(PropertyChangeEvent evt)
propertyChange在
BasicEditorPaneUI类
evt - 物业变更事件
public SynthContext getContext(JComponent c)
getContext在界面
SynthUI
c - 组件请求SynthContext。
public void update(Graphics g, JComponent c)
paint(SynthContext,Graphics)方法。
通常,此方法不需要被子类覆盖。 所有Look和Feel渲染代码应该位于paint方法中。
update在
BasicTextUI类
g - 用于绘画的
Graphics对象
c - 正在涂漆的组件
paint(SynthContext,Graphics)
protected void paint(SynthContext context, Graphics g)
context - 正在绘制的组件的上下文
g - 用于绘画的
Graphics对象
update(Graphics,JComponent)
protected void paintBackground(Graphics g)
paintBackground在
BasicTextUI
g - 图形上下文
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 - height of the border
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.