org.zaval.lw.mask
Class LwMaskTextField

java.lang.Object
  |
  +--org.zaval.util.ValidationObject
        |
        +--org.zaval.lw.LwCanvas
              |
              +--org.zaval.lw.LwLabel
                    |
                    +--org.zaval.lw.LwTextField
                          |
                          +--org.zaval.lw.mask.LwMaskTextField
All Implemented Interfaces:
Cursorable, Drawable, java.util.EventListener, Layoutable, LwComponent, LwFocusListener, LwKeyListener, LwMouseListener, LwMouseMotionListener, PosInfo, PosListener, ScrollObj, TxtSelectionInfo, Validationable

public class LwMaskTextField
extends LwTextField

This is masked text field lightweight component that is supposed to be used for masked input. The component uses masked text (MaskedText) as the text model and special pos controller (MaskPosController) to navigate through the mask. Don't redefine the properties, since it can result in incorrected work of the component.


Fields inherited from class org.zaval.lw.LwCanvas
bits, height, insets, parent, psHeight, psWidth, skins, width, x, y
 
Fields inherited from class org.zaval.util.ValidationObject
isValidFlag
 
Constructor Summary
LwMaskTextField()
          Constructs the class with empty text and empty mask.
LwMaskTextField(MaskedText t)
          Constructs the class with the specified masked text model.
LwMaskTextField(java.lang.String text, java.lang.String mask)
          Constructs the class with the specified text and the given mask.
 
Method Summary
 java.lang.String getMask()
          Gets the mask.
 MaskValidator getValidator()
          Gets the mask validator.
 void setMask(java.lang.String mask)
          Sets the mask.
 void setValidator(MaskValidator v)
          Sets the mask validator.
protected  void write(int pos, java.lang.String s)
          Inserts the specified text at the given position.
 
Methods inherited from class org.zaval.lw.LwTextField
canHaveFocus, drawCursor, endDragged, findNextWord, focusGained, focusLost, getCursorType, getCursorView, getEndSelection, getLines, getLineSize, getMaxOffset, getOrigin, getPosController, getPreferredSize, getSelectColor, getSelectedText, getSelectionOffsets, getSOLocation, getSOSize, getStartSelection, getSubString, getTextLocationAt, getTextRowColAt, handleKey, hasSelection, isEditable, isFiltered, keyPressed, keyReleased, keyTyped, makeTextRender, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, moveContent, pageSize, paint, posChanged, recalc, remove, select, setCursorView, setEditable, setEnabled, setPosController, setPSByRowsCols, setScrollMan, setSelectColor, setSOLocation, setText, startDragged, stopSelection
 
Methods inherited from class org.zaval.lw.LwLabel
getForeground, getText, getTextModel, getTextRender, setForeground
 
Methods inherited from class org.zaval.lw.LwCanvas
calcPreferredSize, getBackground, getBounds, getHeight, getInsets, getLocation, getLwComponentAt, getLwParent, getSize, getViewMan, getVisiblePart, getWidth, getX, getY, hasFocus, invalidate, isEnabled, isOpaque, isVisible, repaint, repaint, requestFocus, setBackground, setInsets, setLocation, setLwParent, setOpaque, setPSSize, setSize, setViewMan, setVisible, toString, update, validate, viewManChanged, vrp
 
Methods inherited from class org.zaval.util.ValidationObject
isValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.zaval.util.Validationable
isValid
 

Constructor Detail

LwMaskTextField

public LwMaskTextField()
Constructs the class with empty text and empty mask.

LwMaskTextField

public LwMaskTextField(java.lang.String text,
                       java.lang.String mask)
Constructs the class with the specified text and the given mask.
Parameters:
text - the specified text.
mask - the specified mask.

LwMaskTextField

public LwMaskTextField(MaskedText t)
Constructs the class with the specified masked text model.
Parameters:
t - specified masked text model.
Method Detail

setValidator

public void setValidator(MaskValidator v)
Sets the mask validator.
Parameters:
v - the mask validator.

getValidator

public MaskValidator getValidator()
Gets the mask validator.
Returns:
a mask validator.

getMask

public java.lang.String getMask()
Gets the mask.
Returns:
a mask.

setMask

public void setMask(java.lang.String mask)
Sets the mask.
Parameters:
mask - the mask.

write

protected void write(int pos,
                     java.lang.String s)
Description copied from class: LwTextField
Inserts the specified text at the given position.
Overrides:
write in class LwTextField
Following copied from class: org.zaval.lw.LwTextField
Parameters:
pos - the given position.
s - the specified text to be inserted.


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