|
JavaTM 2 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 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。