public class PasswordView extends FieldView
View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXISBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST| Constructor and Description |
|---|
PasswordView(Element elem)
构造一个包在元素上的新视图。
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
drawEchoCharacter(Graphics g, int x, int y, char c)
呈现回声字符,或使用任何图形显示密码字符。
|
protected int |
drawSelectedText(Graphics g, int x, int y, int p0, int p1)
以选定的文本呈现模型中的给定范围。
|
protected int |
drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
将给定的范围内,为正常模式选中的文本。
|
float |
getPreferredSpan(int axis)
沿着一个轴确定该视图的首选跨度。
|
Shape |
modelToView(int pos, Shape a, Position.Bias b)
提供从文档模型坐标空间到映射到它的视图的坐标空间的映射。
|
int |
viewToModel(float fx, float fy, Shape a, Position.Bias[] bias)
从视图坐标空间提供一个映射到模型的逻辑坐标空间。
|
adjustAllocation, getFontMetrics, getResizeWeight, insertUpdate, paint, removeUpdatechangedUpdate, damageLineRange, drawLine, getLineBuffer, getTabSize, lineToRect, nextTabStop, setSize, updateDamage, updateMetricsappend, breakView, createFragment, forwardUpdate, forwardUpdateToView, getAlignment, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getMaximumSpan, getMinimumSpan, getNextVisualPositionFrom, getParent, getStartOffset, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, replace, setParent, updateChildren, updateLayout, viewToModelpublic PasswordView(Element elem)
elem -元素
protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException
drawUnselectedText 方法重写,继承类
PlainView
g -图形上下文
x -启动X坐标> = 0
y -起始Y坐标> = 0
p0在模型> = 0的起始偏移
p1 -结束偏移在模型> = P0
BadLocationException超出范围
protected int drawSelectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException
drawSelectedText 方法重写,继承类
PlainView
g -图形上下文
x -启动X坐标> = 0
y -起始Y坐标> = 0
p0在模型> = 0的起始偏移
p1 -结束偏移在模型> = P0
BadLocationException超出范围
protected int drawEchoCharacter(Graphics g, int x, int y, char c)
g -图形上下文
x -启动X坐标> = 0
y -起始Y坐标> = 0
c的回波特征
public Shape modelToView(int pos, Shape a, Position.Bias b) throws BadLocationException
modelToView 方法重写,继承类
FieldView
pos -位置转换> = 0
a -分配区域进行渲染
b -偏向前一个字符或下一个字符的偏移量表示,如果位置是两视图边界;
b将有以下值之一:
Position.Bias.ForwardPosition.Bias.BackwardBadLocationException -如果给定的位置不在相关文件表示一个有效的位置
View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
public int viewToModel(float fx,
float fy,
Shape a,
Position.Bias[] bias)
viewToModel 方法重写,继承类
FieldView
fx - x坐标> = 0.0f
fy - Y坐标> = 0.0f
a -分配区域进行渲染
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])
public float getPreferredSpan(int axis)
getPreferredSpan 方法重写,继承类
FieldView
axis -可能是view.x_axis或view.y_axis
View.getPreferredSpan(int)
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.