com.jgoodies.looks.common
Class ExtPasswordView

java.lang.Object
  extended by javax.swing.text.View
      extended by javax.swing.text.PlainView
          extended by javax.swing.text.FieldView
              extended by javax.swing.text.PasswordView
                  extended by com.jgoodies.looks.common.ExtPasswordView
All Implemented Interfaces:
javax.swing.SwingConstants, javax.swing.text.TabExpander

public final class ExtPasswordView
extends javax.swing.text.PasswordView

Differs from its superclass in that it uses the UIManager's echo char, not a star ("*"). Used in Java 1.4 and Java 5 only.

Version:
$Revision: 1.12 $
Author:
Karsten Lentzsch

Field Summary
 
Fields inherited from class javax.swing.text.PlainView
metrics
 
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
 
Fields inherited from interface 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
 
Constructor Summary
ExtPasswordView(javax.swing.text.Element element)
           
 
Method Summary
protected  int drawEchoCharacter(java.awt.Graphics g, int x, int y, char c)
          Overrides the superclass behavior to draw the Windows dot, not the star ("*") character.
 float getPreferredSpan(int axis)
           
 java.awt.Shape modelToView(int pos, java.awt.Shape a, javax.swing.text.Position.Bias b)
           
 int viewToModel(float fx, float fy, java.awt.Shape a, javax.swing.text.Position.Bias[] bias)
           
 
Methods inherited from class javax.swing.text.PasswordView
drawSelectedText, drawUnselectedText
 
Methods inherited from class javax.swing.text.FieldView
adjustAllocation, getFontMetrics, getResizeWeight, insertUpdate, paint, removeUpdate
 
Methods inherited from class javax.swing.text.PlainView
changedUpdate, damageLineRange, drawLine, getLineBuffer, getTabSize, lineToRect, nextTabStop, setSize, updateDamage, updateMetrics
 
Methods inherited from class javax.swing.text.View
append, 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, viewToModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtPasswordView

public ExtPasswordView(javax.swing.text.Element element)
Method Detail

getPreferredSpan

public float getPreferredSpan(int axis)
Overrides:
getPreferredSpan in class javax.swing.text.PasswordView

modelToView

public java.awt.Shape modelToView(int pos,
                                  java.awt.Shape a,
                                  javax.swing.text.Position.Bias b)
                           throws javax.swing.text.BadLocationException
Overrides:
modelToView in class javax.swing.text.PasswordView
Throws:
javax.swing.text.BadLocationException

viewToModel

public int viewToModel(float fx,
                       float fy,
                       java.awt.Shape a,
                       javax.swing.text.Position.Bias[] bias)
Overrides:
viewToModel in class javax.swing.text.PasswordView

drawEchoCharacter

protected int drawEchoCharacter(java.awt.Graphics g,
                                int x,
                                int y,
                                char c)
Overrides the superclass behavior to draw the Windows dot, not the star ("*") character.

Overrides:
drawEchoCharacter in class javax.swing.text.PasswordView
Parameters:
g - the graphics context
x - the starting X coordinate >= 0
y - the starting Y coordinate >= 0
c - the echo character
Returns:
the updated X position >= 0


Copyright © 2001-2011 JGoodies Karsten Lentzsch. All Rights Reserved.