: Download: FAQ: Licensing: Support: Contact ME
LwVCL Home
Introduction
Overview
Screen Shots
On-line Demos
Requirements
Further Plans
Docs
Tutorial
How-to (PDF)
API
FAQ
Download
Latest version

Home > J2SE > API

Overview  Package   Class  Tree  Deprecated  Index  Help 

org.zaval.lw.mask
Class LwMaskTextField

java.lang.Object
  |
  +--org.zaval.lw.LwCanvas
        |
        +--org.zaval.lw.LwLabel
              |
              +--org.zaval.lw.LwTextField
                    |
                    +--org.zaval.lw.mask.LwMaskTextField
All Implemented Interfaces:
Cursorable, 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 bring to incorrect work of the component.


Fields inherited from class org.zaval.lw.LwCanvas
bits, bottom, height, isValidValue, left, parent, psHeight, psWidth, right, skins, temporary, top, width, x, y
 
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.
 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, clearSelection, 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, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, moveContent, pageSize, paint, posChanged, recalc, remove, repaint, select, setCursorView, setEditable, setEnabled, setPosController, setPSByRowsCols, setScrollMan, setSelectColor, setSOLocation, setText, startDragged
 
Methods inherited from class org.zaval.lw.LwLabel
getForeground, getText, getTextModel, getTextRender, setForeground
 
Methods inherited from class org.zaval.lw.LwCanvas
calcInsets, calcPreferredSize, customize, cvp, getBackground, getBottom, getBounds, getHeight, getInsets, getLeft, getLocation, getLwComponentAt, getLwParent, getPSImpl, getRight, getSize, getTop, getViewMan, getVisiblePart, getWidth, getX, getY, hasFocus, invalidate, isEnabled, isOpaque, isValid, isVisible, repaint, repaint, requestFocus, setBackground, setInsets, setLocation, setLwParent, setOpaque, setPSSize, setSize, setViewMan, setVisible, update, validate, viewManChanged, vrp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.zaval.lw.TxtSelectionInfo
getBackground
 

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

public 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.


: up