- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.TextUI
-
- javax.swing.plaf.basic.BasicTextUI
-
- javax.swing.plaf.basic.BasicTextFieldUI
-
- javax.swing.plaf.synth.SynthTextFieldUI
-
- javax.swing.plaf.synth.SynthPasswordFieldUI
-
- All Implemented Interfaces:
-
SynthConstants
,SynthUI
,ViewFactory
public class SynthPasswordFieldUI extends SynthTextFieldUI
为JPasswordField
提供Synth L&F UI代表。- 从以下版本开始:
- 1.7
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTextUI
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter
-
-
Field Summary
-
Fields inherited from interface javax.swing.plaf.synth.SynthConstants
DEFAULT, DISABLED, ENABLED, FOCUSED, MOUSE_OVER, PRESSED, SELECTED
-
-
构造方法摘要
构造方法 Constructor 描述 SynthPasswordFieldUI()
-
方法摘要
所有方法 静态方法 接口方法 具体的方法 Modifier and Type 方法 描述 View
create(Element elem)
为元素创建一个视图(PasswordView)。static ComponentUI
createUI(JComponent c)
为JPasswordField创建一个UI。protected String
getPropertyPrefix()
获取用作密钥的名称,通过UIManager查找属性。protected void
installKeyboardActions()
注册键盘操作。void
paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
画边框-
Methods inherited from class javax.swing.plaf.basic.BasicTextFieldUI
getBaseline, getBaselineResizeBehavior
-
Methods inherited from class javax.swing.plaf.basic.BasicTextUI
create, createCaret, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getToolTipText, getVisibleEditorRect, installListeners, installUI, modelChanged, modelToView, modelToView, modelToView2D, paint, paintSafely, setView, uninstallKeyboardActions, uninstallListeners, uninstallUI, viewToModel, viewToModel, viewToModel2D
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class javax.swing.plaf.synth.SynthTextFieldUI
getContext, installDefaults, paint, paintBackground, propertyChange, uninstallDefaults, update
-
Methods inherited from class javax.swing.plaf.TextUI
getToolTipText2D
-
-
-
-
方法详细信息
-
createUI
public static ComponentUI createUI(JComponent c)
为JPasswordField创建一个UI。- 参数
-
c
- JPasswordField - 结果
- UI
-
getPropertyPrefix
protected String getPropertyPrefix()
获取用作密钥的名称,通过UIManager查找属性。 这被用作所有标准文本属性的前缀。- 重写:
-
getPropertyPrefix
在BasicTextFieldUI
- 结果
- 名称(“PasswordField”)
-
create
public View create(Element elem)
为元素创建一个视图(PasswordView)。- Specified by:
-
create
在接口ViewFactory
- 重写:
-
create
在BasicTextFieldUI
- 参数
-
elem
- 元素 - 结果
- 风景
- 另请参见:
-
View
-
paintBorder
public void paintBorder(SynthContext context, Graphics g, int x, int y, int w, int h)
画边框- Specified by:
-
paintBorder
在接口SynthUI
- 重写:
-
paintBorder
在SynthTextFieldUI
- 参数
-
context
- 组件上下文 -
g
-Graphics
上画 -
x
- X坐标 -
y
- Y坐标 -
w
- 边框的宽度 -
h
- 边框的高度
-
installKeyboardActions
protected void installKeyboardActions()
注册键盘操作。- 重写:
-
installKeyboardActions
in classBasicTextUI
-
-