|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.swing.text.View
javax.swing.text.PlainView
javax.swing.text.FieldView
javax.swing.text.PasswordView
public class PasswordView
实现适用于 JPasswordField UI 实现的视图。这基本上是一个将其内容呈现为在相关组件中指定的回显字符的字段 ui(如果其能将组件收缩为 JPasswordField)。
View| 字段摘要 |
|---|
| 从类 javax.swing.text.PlainView 继承的字段 |
|---|
metrics |
| 从类 javax.swing.text.View 继承的字段 |
|---|
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS |
| 从接口 javax.swing.SwingConstants 继承的字段 |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| 构造方法摘要 | |
|---|---|
PasswordView(Element elem)
构造在元素上包装的新视图。 |
|
| 方法摘要 | |
|---|---|
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)
提供从视图坐标空间到该模型的逻辑坐标空间的映射。 |
| 从类 javax.swing.text.FieldView 继承的方法 |
|---|
adjustAllocation, getFontMetrics, getResizeWeight, insertUpdate, paint, removeUpdate |
| 从类 javax.swing.text.PlainView 继承的方法 |
|---|
changedUpdate, damageLineRange, drawLine, getLineBuffer, getTabSize, lineToRect, nextTabStop, setSize, updateDamage, updateMetrics |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public PasswordView(Element elem)
elem - 元素| 方法详细信息 |
|---|
protected int drawUnselectedText(Graphics g,
int x,
int y,
int p0,
int p1)
throws BadLocationException
PlainView 中的 drawUnselectedTextg - 图形上下文x - 起始 X 坐标,该值 >= 0y - 起始 Y 坐标,该值 >= 0p0 - 模型中的起始偏移量,该值 >= 0p1 - 模型中的结束偏移量,该值 >= p0
BadLocationException - 如果 p0 或 p1 超出范围
protected int drawSelectedText(Graphics g,
int x,
int y,
int p0,
int p1)
throws BadLocationException
PlainView 中的 drawSelectedTextg - 图形上下文x - 起始 X 坐标,该值 >= 0y - 起始 Y 坐标,该值 >= 0p0 - 模型中的起始偏移量,该值 >= 0p1 - 模型中的结束偏移量,该值 >= p0
BadLocationException - 如果 p0 或 p1 超出范围
protected int drawEchoCharacter(Graphics g,
int x,
int y,
char c)
g - 图形上下文x - 起始 X 坐标,该值 >= 0y - 起始 Y 坐标,该值 >= 0c - 回显字符
public Shape modelToView(int pos,
Shape a,
Position.Bias b)
throws BadLocationException
FieldView 中的 modelToViewpos - 要转换的位置,其值 >= 0a - 分配的要在其中呈现的区域b - 当位置是两个视图的边界时,该参数是离由偏移量表示的前一个字符或者下一个字符的偏差;b 将是这些值之一:
Position.Bias.Forward
Position.Bias.Backward
BadLocationException - 如果给定位置在所关联的文档中不是一个有效位置View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
public int viewToModel(float fx,
float fy,
Shape a,
Position.Bias[] bias)
FieldView 中的 viewToModelfx - X 坐标,该值 >= 0.0ffy - Y 坐标,该值 >= 0.0fa - 要在其中呈现的分配区域
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])public float getPreferredSpan(int axis)
FieldView 中的 getPreferredSpanaxis - 可以是 View.X_AXIS 或 View.Y_AXIS
View.getPreferredSpan(int)
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。