Implements a View suitable for use in JPasswordField
UI implementations. This is basically a field ui that
renders its contents as the echo character specified
in the associated component (if it can narrow the
component to a JPasswordField).
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.
Methods inherited from class javax.swing.text.FieldView
Renders the given range in the model as normal unselected
text. This sets the foreground color and echos the characters
using the value returned by getEchoChar().
Renders the given range in the model as selected text. This
is implemented to render the text in the color specified in
the hosting component. It assumes the highlighter will render
the selected background. Uses the result of getEchoChar() to
display the characters.
protected int drawEchoCharacter(Graphics g,
int x,
int y,
char c)
Renders the echo character, or whatever graphic should be used
to display the password characters. The color in the Graphics
object is set to the appropriate foreground color for selected
or unselected text.
Submit a bug or feature For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, California, 94303, U.S.A. All Rights Reserved.