|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.zaval.lw.mask.MaskedText
This class implements text model interface for masked text.
| Constructor Summary | |
MaskedText(java.lang.String mask)
Constructs the class with the specified mask. |
|
MaskedText(java.lang.String mask,
MaskValidator v)
Constructs the class with the specified mask and the given mask validator. |
|
| Method Summary | |
void |
addTextListener(TextListener l)
Adds the specified text listener to receive text events. |
int |
findHandledTag(int offset,
int d)
Looks for the next handled (by the validator) character index in the text starting from the given offset. |
int |
getExtraChar(int i)
Gets special extra char that is used to store extra information by the specified index. |
java.lang.String |
getLine(int i)
Returns the line at the specified line number. |
java.lang.String |
getMask()
Gets the mask. |
int |
getSize()
Returns the line number of the text. |
java.lang.String |
getText()
Returns the original text data that have been set with setText method. |
int |
getTextLength()
Returns the text length (number of the text characters). |
MaskValidator |
getValidator()
Gets the mask validator. |
boolean |
isHandledOffset(int offset)
|
void |
remove(int offset,
int count)
Removes a text at the specified offset with the size. |
void |
removeTextListener(TextListener l)
Removes the specified text listener. |
void |
setExtraChar(int i,
int ch)
Sets special extra char that is used to store extra information by the specified index. |
void |
setMask(java.lang.String m)
Sets the specified mask. |
void |
setText(java.lang.String t)
Sets the specified text data. |
void |
setValidator(MaskValidator v)
Sets the specified mask validator. |
void |
write(char ch,
int offset)
Inserts the specified character at the given offset. |
void |
write(java.lang.String s,
int offset)
Inserts the specified text at the given offset. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MaskedText(java.lang.String mask)
mask - the specified mask.
public MaskedText(java.lang.String mask,
MaskValidator v)
mask - the specified mask.v - the specified mask validator.| Method Detail |
public java.lang.String getMask()
public void setMask(java.lang.String m)
m - the specified mask.public java.lang.String getLine(int i)
TextModelgetLine in interface TextModelorg.zaval.data.TextModelline - the specified line number.public MaskValidator getValidator()
public void setValidator(MaskValidator v)
v - the specified mask validator.public java.lang.String getText()
TextModelsetText method.getText in interface TextModelorg.zaval.data.TextModelpublic void setText(java.lang.String t)
TextModelsetText in interface TextModelorg.zaval.data.TextModeltext - the specified text data.public int getSize()
TextModelgetSize in interface TextModelorg.zaval.data.TextModelpublic int getTextLength()
TextModelgetTextLength in interface TextModelorg.zaval.data.TextModel
public void write(char ch,
int offset)
TextModelwrite in interface TextModelorg.zaval.data.TextModelch - the character to be inserted.offset - the offset where the character will be inserted.
public void write(java.lang.String s,
int offset)
TextModelwrite in interface TextModelorg.zaval.data.TextModels - the text to be inserted.offset - the offset where the text will be inserted.
public void remove(int offset,
int count)
TextModelremove in interface TextModelorg.zaval.data.TextModeloffset - the offset where the text will be removed.size - the size of the part that is going to be removed.public void addTextListener(TextListener l)
TextModeladdTextListener in interface TextModelorg.zaval.data.TextModell - the text listener.TextListener,
TextEventpublic void removeTextListener(TextListener l)
TextModelremoveTextListener in interface TextModelorg.zaval.data.TextModell - the text listener.TextListener,
TextEventpublic int getExtraChar(int i)
TextModelgetExtraChar in interface TextModelorg.zaval.data.TextModeli - the specified extra char index.
public void setExtraChar(int i,
int ch)
TextModelsetExtraChar in interface TextModelorg.zaval.data.TextModeli - the specified extra char index.val - the specified extra char value.
public int findHandledTag(int offset,
int d)
offset - the starting offset.d - the look-up direction.public boolean isHandledOffset(int offset)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||