org.zaval.lw
Class LwPasswordText

java.lang.Object
  |
  +--org.zaval.util.ValidationObject
        |
        +--org.zaval.lw.LwView
              |
              +--org.zaval.lw.LwRender
                    |
                    +--org.zaval.lw.LwTextRender
                          |
                          +--org.zaval.lw.LwPasswordText
All Implemented Interfaces:
java.util.EventListener, TextListener, Validationable

public class LwPasswordText
extends LwTextRender

This class inherits LwTextRender to represent a password text. For the purpose the render uses an echo character.


Fields inherited from class org.zaval.lw.LwView
MOSAIC, ORIGINAL, STRETCH
 
Fields inherited from class org.zaval.util.ValidationObject
isValidFlag
 
Constructor Summary
LwPasswordText(TextModel text)
          Constructs the render with the specified target text model.
 
Method Summary
protected  java.lang.String getLine(int r)
          Gets the string presentation of the specified line.
 void setEchoChar(char ch)
          Sets the specified echo character.
 
Methods inherited from class org.zaval.lw.LwTextRender
calcPreferredSize, getAscent, getFont, getFontMetrics, getForeground, getLineHeight, getLineIndent, getText, getTextModel, invalidate, invalidate, lineWidth, ownerChanged, paint, paintLine, recalc, setFont, setForeground, stringWidth, substrWidth, targetWasChanged, textInserted, textRemoved, textUpdated
 
Methods inherited from class org.zaval.lw.LwRender
getTarget, setTarget
 
Methods inherited from class org.zaval.lw.LwView
getInsets, getPreferredSize, getType, paint, setType
 
Methods inherited from class org.zaval.util.ValidationObject
isValid, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LwPasswordText

public LwPasswordText(TextModel text)
Constructs the render with the specified target text model.
Parameters:
text - the specified target text model.
Method Detail

setEchoChar

public void setEchoChar(char ch)
Sets the specified echo character. The symbol will be used to render the text, it means that every character of the text is render with the echo character.
Parameters:
ch - the specified echo character.

getLine

protected java.lang.String getLine(int r)
Gets the string presentation of the specified line. The method is overrided with the class and it replaces every character of the given string with the echo character and after that returns the string as a result.
Overrides:
getLine in class LwTextRender
Parameters:
r - the specified line number.
Returns:
a string line.


Copyright © Zaval Creative Engineering Group, 2000-2005.
http://www.zaval.org