javax.swing.text
public class PasswordView extends FieldView
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
BOTTOM, 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 ch)
Draws one echo character at a given position.
|
protected int |
drawSelectedText(Graphics g,
int x,
int y,
int p0,
int p1)
Draws selected text at a given position.
|
protected int |
drawUnselectedText(Graphics g,
int x,
int y,
int p0,
int p1)
Draws unselected text at a given position.
|
float |
getPreferredSpan(int axis)
Determines the preferred span for this view along an axis.
|
Shape |
modelToView(int pos,
Shape a,
Position.Bias b)
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 a,
Position.Bias[] bias)
Provides a mapping from the view coordinate space to the logical
coordinate space of the model.
|
adjustAllocation, changedUpdate, getFontMetrics, getResizeWeight, insertUpdate, paint, removeUpdate
damageLineRange, drawLine, getLineBuffer, getTabSize, lineToRect, nextTabStop, updateDamage, updateMetrics
append, breakView, createFragment, dump, 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, setSize, updateChildren, updateLayout, viewToModel
public PasswordView(Element elem)
protected int drawEchoCharacter(Graphics g, int x, int y, char ch)
g
- the Graphics
object to draw tox
- the x-positiony
- the y-positionch
- the echo characterprotected int drawSelectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException
drawSelectedText
in class PlainView
g
- the Graphics
object to draw tox
- the x-positiony
- the y-positionp0
- the position of the first character to drawp1
- the position of the first character not to drawBadLocationException
protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException
drawUnselectedText
in class PlainView
g
- the Graphics
object to draw tox
- the x-position of the start of the baseliney
- the y-position of the start of the baselinep0
- the position of the first character to drawp1
- the position of the first character not to drawBadLocationException
- if p0
or p1
are
invalidpublic float getPreferredSpan(int axis)
getPreferredSpan
in class FieldView
axis
- to get the preferred span ofpublic Shape modelToView(int pos, Shape a, Position.Bias b) throws BadLocationException
modelToView
in class FieldView
pos
- - the position to convert >= 0a
- - the allocated region to render intob
- - typesafe enumeration to indicate bias to a position in the model.BadLocationException
- if the given position does not
represent a valid location in the associated documentpublic int viewToModel(float fx, float fy, Shape a, Position.Bias[] bias)
viewToModel
in class FieldView
fx
- - the X coordinate >= 0.0ffy
- - the Y coordinate >= 0.0fa
- - the allocated region to render intobias
- - typesafe enumeration to indicate bias to a position in the model.