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
Constructs a new view wrapped on an element.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
drawEchoCharacter(Graphics
Renders the echo character, or whatever graphic should be used to display the password characters.
|
protected int |
drawSelectedText(Graphics
Renders the given range in the model as selected text.
|
protected int |
drawUnselectedText(Graphics
Renders the given range in the model as normal unselected text.
|
float |
getPreferredSpan(int axis)
Determines the preferred span for this view along an axis.
|
Shape |
modelToView(int pos, Shape
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
|
int |
viewToModel(float fx, float fy, Shape
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
|
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(Elementelem)
elem - the element
protected int drawUnselectedText(Graphicsg, int x, int y, int p0, int p1) throws BadLocationException
drawUnselectedText in class
PlainView
g - the graphics context
x - the starting X coordinate >= 0
y - the starting Y coordinate >= 0
p0 - the starting offset in the model >= 0
p1 - the ending offset in the model >= p0
BadLocationException - if p0 or p1 are out of range
protected int drawSelectedText(Graphicsg, int x, int y, int p0, int p1) throws BadLocationException
drawSelectedText in class
PlainView
g - the graphics context
x - the starting X coordinate >= 0
y - the starting Y coordinate >= 0
p0 - the starting offset in the model >= 0
p1 - the ending offset in the model >= p0
BadLocationException - if p0 or p1 are out of range
protected int drawEchoCharacter(Graphicsg, int x, int y, char c)
g - the graphics context
x - the starting X coordinate >= 0
y - the starting Y coordinate >= 0
c - the echo character
public ShapemodelToView(int pos, Shape a, Position .Bias b) throws BadLocationException
modelToView in class
FieldView
pos - the position to convert >= 0
a - the allocated region to render into
b - the bias toward the previous character or the next character represented by the offset, in case the position is a boundary of two views;
b will have one of these values:
Position.Bias.Forward Position.Bias.Backward BadLocationException - if the given position does not represent a valid location in the associated document
View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
public int viewToModel(float fx,
float fy,
Shape a,
Position.Bias [] bias)
viewToModel in class
FieldView
fx - the X coordinate >= 0.0f
fy - the Y coordinate >= 0.0f
a - the allocated region to render into
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])
public float getPreferredSpan(int axis)
getPreferredSpan in class
FieldView
axis - may be either View.X_AXIS or View.Y_AXIS
View.getPreferredSpan(int)