Home » openjdk-7 » javax » swing » text » [javadoc | source]
public class: PasswordView [javadoc | source]

All Implemented Interfaces:
    TabExpander, SwingConstants

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).
Field Summary
static  char[] ONE     
Fields inherited from javax.swing.text.PlainView:
metrics,  longLine,  font,  lineBuffer,  tabSize,  tabBase,  sel0,  sel1,  unselected,  selected,  firstLineOffset
Fields inherited from javax.swing.text.View:
BadBreakWeight,  GoodBreakWeight,  ExcellentBreakWeight,  ForcedBreakWeight,  X_AXIS,  Y_AXIS,  sharedBiasReturn
 public PasswordView(Element elem) 
    Constructs a new view wrapped on an element.
    elem - the element
Method from javax.swing.text.PasswordView Summary:
drawEchoCharacter,   drawSelectedText,   drawUnselectedText,   getPreferredSpan,   modelToView,   viewToModel
Methods from javax.swing.text.FieldView:
adjustAllocation,   adjustPaintRegion,   getFontMetrics,   getPreferredSpan,   getResizeWeight,   insertUpdate,   modelToView,   paint,   removeUpdate,   updateVisibilityModel,   viewToModel
Methods from javax.swing.text.PlainView:
adjustPaintRegion,   changedUpdate,   damageLineRange,   drawLine,   drawSelectedText,   drawUnselectedText,   getLineBuffer,   getPreferredSpan,   getTabSize,   insertUpdate,   lineToRect,   modelToView,   nextTabStop,   paint,   removeUpdate,   setSize,   updateDamage,   updateMetrics,   viewToModel
Methods from javax.swing.text.View:
append,   breakView,   changedUpdate,   createFragment,   forwardUpdate,   forwardUpdateToView,   getAlignment,   getAttributes,   getBreakWeight,   getChildAllocation,   getContainer,   getDocument,   getElement,   getEndOffset,   getGraphics,   getMaximumSpan,   getMinimumSpan,   getNextVisualPositionFrom,   getParent,   getPreferredSpan,   getResizeWeight,   getStartOffset,   getToolTipText,   getView,   getViewCount,   getViewFactory,   getViewIndex,   getViewIndex,   insert,   insertUpdate,   isVisible,   modelToView,   modelToView,   modelToView,   paint,   preferenceChanged,   remove,   removeAll,   removeUpdate,   replace,   setParent,   setSize,   updateChildren,   updateLayout,   viewToModel,   viewToModel
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.text.PasswordView Detail:
 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.
 protected int drawSelectedText(Graphics g,
    int x,
    int y,
    int p0,
    int p1) throws BadLocationException 
    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 drawUnselectedText(Graphics g,
    int x,
    int y,
    int p0,
    int p1) throws BadLocationException 
    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().
 public float getPreferredSpan(int axis) 
    Determines the preferred span for this view along an axis.
 public Shape modelToView(int pos,
    Shape a,
    Bias b) throws BadLocationException 
    Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
 public int viewToModel(float fx,
    float fy,
    Shape a,
    Bias[] bias) 
    Provides a mapping from the view coordinate space to the logical coordinate space of the model.