org.zaval.lw
Class LwPasswordText
java.lang.Object
|
+--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.
|
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, paintSelection, recalc, setFont, setForeground, stringWidth, substrWidth, targetWasChanged, textInserted, textRemoved, textUpdated |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LwPasswordText
public LwPasswordText(TextModel text)
- Constructs the render with the specified target text model.
- Parameters:
text - the specified target text model.
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 overridden 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.
|