ElegantJ Data Entry Masks Java API Specification v1.1

com.elegantj.util.editmask
Class EditMask

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bycom.elegantj.util.editmask.EditMask
All Implemented Interfaces:
javax.accessibility.Accessible, java.io.Externalizable, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class EditMask
extends java.awt.Panel
implements java.io.Externalizable

EditMask provides mask for the numeric, alphabetic and alphanumeric, also provide facility of the spin For the numeric the mask pattern is N For the alphabetic the mask pattern is A For the alpha numeric the mask pattern is X If the text of your mask pattern contains the any of the above char like N, A, X please make its as a *N or *A or *X.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static java.lang.String ALL
          Mask type for the EditMask
static java.lang.String ALPHA_NUMERIC_MASK
          Mask type for the EditMask
static java.lang.String ALPHABETIC_MASK
          Mask type for the EditMask
 com.elegantj.editors.C1 c1
           
static int CENTER
          The CENTER alignment for the EditMask
static int LEFT
          The LEFT alignment for the EditMask
protected  java.awt.Dimension m_preferredSize
          Holds the preferred size of the compoennt
static java.lang.String NUMERIC_MASK
          Mask type for the EditMask
static int RIGHT
          The RIGHT alignment for the EditMask
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
EditMask()
          Default constructor of the EditMask
 
Method Summary
 void addEditMaskListener(EditMaskListener l)
          Adds the EditMaskListener
 void addFocusListener(java.awt.event.FocusListener focusListener)
          Adds the focus listener
 void addKeyListener(java.awt.event.KeyListener keyListener)
          Adds the key listener
 void addMouseListener(java.awt.event.MouseListener mouseListener)
          Adds the mouse listener
 void addMouseMotionListener(java.awt.event.MouseMotionListener mouseMotionListener)
          Adds the mouse motion listener
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds the property change listener
 void clear()
          Clears the contents of the mask
 void copy()
          Transfers the currently selected text to the system clipboard
 void cut()
          Deletes the currently selected text of the EditMask, and Transfers the currently selected text to the system clipboard
 void firePropertyChange(java.lang.String property, java.lang.Object oldValue, java.lang.Object newValue)
          Fires the property change
protected  void fireTextChangedEvent(EditMaskEvent e)
          Fires the TextChangedEvent event
protected  void fireTextWasGoingToChangeEvent(EditMaskEvent e)
          Fires the TextWasGoingToChange event
 int getAlignment()
          Returns the alignment of the EditMask
 AWTBorder getBorder()
          Method which returns the border of the EditMask
 int getCaretBlinkRate()
          Returns the caret blink rate for the caret
 java.awt.Color getCaretColor()
          Returns the caret color of the edit mask
 int getCaretPosition()
          Returns the caret position of the EditMask
 java.awt.Cursor getCursor()
          Returns the cursor of the EditMask
 int getDigitsAfterDecimalPoint()
          Returns the value of number of digits are entered and displayed after decimal point
 java.awt.Color getDisabledBackground()
          Returns the disabled background of the edit mask
 java.awt.Color getDisabledForeground()
          Returns the disabled foreground of the edit mask
 java.lang.String getExcludeChars(java.lang.String maskType)
          Returns the exclude chars for the speicified mask type
 java.lang.String getIncludeChars(java.lang.String maskType)
          Returns the include chars for the speicified mask type
 java.awt.Insets getInsets()
          Overriden the getInsets
 java.lang.String getLicenseKey()
          Returns the license key of the bean
 java.util.Locale getLocale()
          Method which returns the locale of the EditMask
 java.lang.String getMaskPattern()
          Returns the current mask pattern of the edit mask
 java.lang.String getMaskText()
          Returns the string currently containing by the mask
 java.lang.String getMaskType()
          Returns the mask type of the EditMask
 double getMaxNumericValue()
          Returns the maximum numeric value of the EditMask
 double getMinNumericValue()
          Returns the minimum numeric value of the EditMask
 java.awt.Dimension getPreferredSize()
          Returns the preferredSize of the component
 java.awt.Color getSelectionBackground()
          Returns the selection background of the edit mask
 int getSelectionEndIndex()
          Returns the selection end index
 java.awt.Color getSelectionForeground()
          Returns the selection foreground of the edit mask
 int getSelectionStartIndex()
          Returns the selection start index
 boolean hasFocus()
          Overriden has focus
 boolean isDecimalPointAllowed()
          Returns whether decimal point is allowed or not
 boolean isDoubleBuffered()
          Returns the whether double buffered or not
 boolean isEditable()
          Returns the whether edit mask is editable or not
 boolean isEnabled()
          Returns whether the EditMask is enabled or not
 boolean isFocusAllowed()
          Returns whether focus is allower or not
 boolean isMinusSignAllowed()
          Returns whether minus sign is allowed or not
 boolean isSelectionAllowed()
          Returns the value of property SelectionAllowed
 boolean isValidNumericValue()
          Check the numeric value
This method will check the numeric value against min and max numeric value
throws EditMaskException if method is called in case of when the mask type is not NUMERIC_MASK
or mask pattern has been set.
 void paint(java.awt.Graphics g)
          Overriden paint method
 void paste()
          Transfers the contents of system clipboard to the EditMask
 void readExternal(java.io.ObjectInput in)
          Implementation of Externalizable
 void removeEditMaskListener(EditMaskListener l)
          Removes the EditMaskListener
 void removeFocusListener(java.awt.event.FocusListener focusListener)
          Removes the focus listener
 void removeKeyListener(java.awt.event.KeyListener keyListener)
          Removes the key listener
 void removeMouseListener(java.awt.event.MouseListener mouseListener)
          Removes the mouse listener
 void removeMouseMotionListener(java.awt.event.MouseMotionListener mouseMotionListener)
          Removes the mouse motion listener
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes the property change listener
 void requestFocus()
          Overriden request focus
 void select(int startIndex, int endIndex)
          Selects the range of chars from specified startIndex to endIndex
 void setAlignment(int alignment)
          Sets the alignment for the EditMask
 void setBackground(java.awt.Color background)
          Method which sets the background color for the EditMask
 void setBorder(AWTBorder awtBorder)
          Method which sets the border for the EditMask
 void setBounds(int x, int y, int width, int height)
          Method which sets the bounds of the EditMask
 void setCaretBlinkRate(int caretBlinkRate)
          Sets the caret blink rate for the caret
 void setCaretColor(java.awt.Color caretColor)
          Sets the caret color for the edit mask
 void setCaretPosition(int caretPosition)
          Sets the caret position for the EditMask
 void setCursor(java.awt.Cursor cursor)
          Method which sets the cursor for the EditMask
 void setDecimalPointAllowed(boolean isDecimalPointAllowed)
          Sets the whether decimal point is allowed or not
 void setDigitsAfterDecimalPoint(int digitsAfterDecimalPoint)
          Sets the value of number of digits are required after decimal point
 void setDisabledBackground(java.awt.Color disabledBackground)
          Sets the disabled background for the edit mask
 void setDisabledForeground(java.awt.Color disabledForeground)
          Sets the disabled foreground for the edit mask
 void setDoubleBuffered(boolean isDoubleBuffered)
          Sets the double buffered on or off
 void setEditable(boolean isEditable)
          Sets the value for the property whether edit mask is editable or not
 void setEnabled(boolean bEnabled)
          Method which sets the enability of the EditMask
 void setExcludeChars(java.lang.String maskTeyp, java.lang.String excludeChars)
          Sets the exclude chars for the specified maskType
 void setFocusAllowed(boolean isFocusAllowed)
          Sets the whether focus is allowed or not
 void setFont(java.awt.Font font)
          Method which sets the font for the EditMask
 void setForeground(java.awt.Color foreground)
          Method which sets the foreground color for the EditMask
 void setIncludeChars(java.lang.String maskType, java.lang.String includeChars)
          Sets the include chars for the specified maskType
 void setLicenseKey(java.lang.String licenseKey)
          Methods which sets the license key
 void setLocale(java.util.Locale locale)
          Method which sets the locale for the EditMask
 void setMaskPattern(java.lang.String maskPattern)
          Sets the mask pattern for the edit mask
 void setMaskText(java.lang.String maskText)
          Sets the string for the mask
 void setMaskType(java.lang.String maskType)
          Sets the mask type for the EditMask
 void setMaxNumericValue(double maxNumericValue)
          Sets the maximum numeric value for the EditMask
 void setMinNumericValue(double minNumericValue)
          Sets the minimum numeric value for the EditMask
 void setMinusSignAllowed(boolean isMinusSignAllowed)
          Sets the whether minus sign is allowed or not
 void setPreferredSize(java.awt.Dimension preferredSize)
          Sets the preferredSize of the component
 void setSelectionAllowed(boolean isSelectionAllowed)
          Sets the value of property SelectionAllowed
 void setSelectionBackground(java.awt.Color selectionBackground)
          Sets the selection background for the edit mask
 void setSelectionForeground(java.awt.Color selectionForeground)
          Sets the selection foreground for the edit mask
 void setVisible(boolean bVisible)
          Method which sets the visibility for the EditMask
 void transferFocus()
          Overriden transfer focus
 void writeExternal(java.io.ObjectOutput out)
          Implementation of Externalizable
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getListeners, getMaximumSize, getMinimumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LEFT

public static int LEFT
The LEFT alignment for the EditMask


CENTER

public static int CENTER
The CENTER alignment for the EditMask


RIGHT

public static int RIGHT
The RIGHT alignment for the EditMask


ALL

public static java.lang.String ALL
Mask type for the EditMask


NUMERIC_MASK

public static java.lang.String NUMERIC_MASK
Mask type for the EditMask


ALPHABETIC_MASK

public static java.lang.String ALPHABETIC_MASK
Mask type for the EditMask


ALPHA_NUMERIC_MASK

public static java.lang.String ALPHA_NUMERIC_MASK
Mask type for the EditMask


c1

public transient com.elegantj.editors.C1 c1

m_preferredSize

protected java.awt.Dimension m_preferredSize
Holds the preferred size of the compoennt

Constructor Detail

EditMask

public EditMask()
Default constructor of the EditMask

Method Detail

paint

public void paint(java.awt.Graphics g)
Overriden paint method


setMaskText

public void setMaskText(java.lang.String maskText)
Sets the string for the mask


getMaskText

public java.lang.String getMaskText()
Returns the string currently containing by the mask

Returns:
The string currently containing by the mask

clear

public void clear()
Clears the contents of the mask


setMaskType

public void setMaskType(java.lang.String maskType)
Sets the mask type for the EditMask

Parameters:
maskType - the mask type for the EditMask The values are NUMERIC_MASK, ALPHABETIC_MASK, ALPHA_NUMERIC_MASK

getMaskType

public java.lang.String getMaskType()
Returns the mask type of the EditMask

Returns:
The mask type of the EditMask

setMaskPattern

public void setMaskPattern(java.lang.String maskPattern)
Sets the mask pattern for the edit mask


getMaskPattern

public java.lang.String getMaskPattern()
Returns the current mask pattern of the edit mask

Returns:
The current mask pattern of the edit mask

setCaretColor

public void setCaretColor(java.awt.Color caretColor)
Sets the caret color for the edit mask

Parameters:
caretColor - The caret color for the edit mask

getCaretColor

public java.awt.Color getCaretColor()
Returns the caret color of the edit mask

Returns:
The caret color of the edit mask

setSelectionAllowed

public void setSelectionAllowed(boolean isSelectionAllowed)
Sets the value of property SelectionAllowed

Parameters:
isSelectionAllowed - whether selection is allowed or not

isSelectionAllowed

public boolean isSelectionAllowed()
Returns the value of property SelectionAllowed

Returns:
isSelectionAllowed whether selection is allowed or not

setSelectionBackground

public void setSelectionBackground(java.awt.Color selectionBackground)
Sets the selection background for the edit mask


getSelectionBackground

public java.awt.Color getSelectionBackground()
Returns the selection background of the edit mask


setSelectionForeground

public void setSelectionForeground(java.awt.Color selectionForeground)
Sets the selection foreground for the edit mask


getSelectionForeground

public java.awt.Color getSelectionForeground()
Returns the selection foreground of the edit mask


setDisabledBackground

public void setDisabledBackground(java.awt.Color disabledBackground)
Sets the disabled background for the edit mask

Parameters:
disabledBackground - The disabled background

getDisabledBackground

public java.awt.Color getDisabledBackground()
Returns the disabled background of the edit mask

Returns:
The disabled background of the edit mask

setDisabledForeground

public void setDisabledForeground(java.awt.Color disabledForeground)
Sets the disabled foreground for the edit mask

Parameters:
disabledForeground - The disabled foreground

getDisabledForeground

public java.awt.Color getDisabledForeground()
Returns the disabled foreground of the edit mask

Returns:
The disabled foreground of the edit mask

setEditable

public void setEditable(boolean isEditable)
Sets the value for the property whether edit mask is editable or not

Parameters:
isEditable - The boolean value for the editability of the edit mask

isEditable

public boolean isEditable()
Returns the whether edit mask is editable or not

Returns:
The whether edit mask is editable or not

setAlignment

public void setAlignment(int alignment)
Sets the alignment for the EditMask

Parameters:
alignment - The value of the alignment The possible values are LEFT, CENTER, RIGHT

getAlignment

public int getAlignment()
Returns the alignment of the EditMask

Returns:
The alignment of the EditMask The possible values are LEFT, CENTER, RIGHT

setCaretBlinkRate

public void setCaretBlinkRate(int caretBlinkRate)
Sets the caret blink rate for the caret

Parameters:
caretBlinkRate - The caret blink rate for the caret This method gets the blink rate in milli seconds

getCaretBlinkRate

public int getCaretBlinkRate()
Returns the caret blink rate for the caret

Returns:
The caret blink rate for the caret This returns the blink rate in milli seconds

setDigitsAfterDecimalPoint

public void setDigitsAfterDecimalPoint(int digitsAfterDecimalPoint)
Sets the value of number of digits are required after decimal point


getDigitsAfterDecimalPoint

public int getDigitsAfterDecimalPoint()
Returns the value of number of digits are entered and displayed after decimal point

Returns:
The number of digits are entered and displayed after decimal point This property's value takes effect only when the mask type is NUMERIC and the mask pattern is null, if user has supplied any mask pattern then it does not make any effect

setDecimalPointAllowed

public void setDecimalPointAllowed(boolean isDecimalPointAllowed)
Sets the whether decimal point is allowed or not

Parameters:
isDecimalPointAllowed - whether the decimal point is allowed or not This property's value takes effect only when the mask type is NUMERIC and the mask pattern is null, if user has supplied any mask pattern then it does not make any effect

isDecimalPointAllowed

public boolean isDecimalPointAllowed()
Returns whether decimal point is allowed or not

Returns:
The decimal point is allowed or not This property's value takes effect only when the mask type is NUMERIC and the mask pattern is null, if user has supplied any mask pattern then it does not make any effect

setMinusSignAllowed

public void setMinusSignAllowed(boolean isMinusSignAllowed)
Sets the whether minus sign is allowed or not

Parameters:
isMinusSignAllowed - whether the minus point is allowed or not This property's value takes effect only when the mask type is NUMERIC and the mask pattern is null, if user has supplied any mask pattern then it does not make any effect

isMinusSignAllowed

public boolean isMinusSignAllowed()
Returns whether minus sign is allowed or not

Returns:
The minus sign is allowed or not This property's value takes effect only when the mask type is NUMERIC and the mask pattern is null, if user has supplied any mask pattern then it does not make any effect

setMinNumericValue

public void setMinNumericValue(double minNumericValue)
Sets the minimum numeric value for the EditMask


getMinNumericValue

public double getMinNumericValue()
Returns the minimum numeric value of the EditMask


setMaxNumericValue

public void setMaxNumericValue(double maxNumericValue)
Sets the maximum numeric value for the EditMask


getMaxNumericValue

public double getMaxNumericValue()
Returns the maximum numeric value of the EditMask


isValidNumericValue

public boolean isValidNumericValue()
Check the numeric value
This method will check the numeric value against min and max numeric value
throws EditMaskException if method is called in case of when the mask type is not NUMERIC_MASK
or mask pattern has been set.


setDoubleBuffered

public void setDoubleBuffered(boolean isDoubleBuffered)
Sets the double buffered on or off


isDoubleBuffered

public boolean isDoubleBuffered()
Returns the whether double buffered or not

Returns:
The whether double buffered or not

setIncludeChars

public void setIncludeChars(java.lang.String maskType,
                            java.lang.String includeChars)
Sets the include chars for the specified maskType

Parameters:
maskType - The specified mask type, possible values are EditMask.ALL, EditMask.NUMERIC_MASK, EditMask.ALPHABETIC_MASK, EditMask.ALPHA_NUMERIC_MASK
includeChars - The string containing the include chars
This IncludeChars works in both case whether mask pattern has been set or not except in case of NUMERIC_MASK it works only if mask pattern has been set If user has set the mask pattern, then for each position of A, X and N of mask pattern If any of the specified include chars are available in exclude chars for the sepcified mask pattern Then it overwrites the exclude chars

getIncludeChars

public java.lang.String getIncludeChars(java.lang.String maskType)
Returns the include chars for the speicified mask type

Parameters:
maskType - The specified mask type The possible values for the maskType are EditMask.ALL, EditMask.NUMERIC_MASK, EditMask.ALPHABETIC_MASK, EditMask.ALPHA_NUMERIC_MASK

setExcludeChars

public void setExcludeChars(java.lang.String maskTeyp,
                            java.lang.String excludeChars)
Sets the exclude chars for the specified maskType

Parameters:
excludeChars - The string containing the include chars
This ExcludeChars works in both case whether mask pattern has been set or not except in case of NUMERIC_MASK it works only if mask pattern has been set If user has set the mask pattern, then for each position of A, X and N of mask pattern If any of the specified exclude chars are available in include chars for the sepcified mask pattern Then it overwrites the include chars

getExcludeChars

public java.lang.String getExcludeChars(java.lang.String maskType)
Returns the exclude chars for the speicified mask type

Parameters:
maskType - The specified mask type The possible values for the maskType are EditMask.ALL, EditMask.NUMERIC_MASK, EditMask.ALPHABETIC_MASK, EditMask.ALPHA_NUMERIC_MASK

cut

public void cut()
Deletes the currently selected text of the EditMask, and Transfers the currently selected text to the system clipboard


copy

public void copy()
Transfers the currently selected text to the system clipboard


paste

public void paste()
Transfers the contents of system clipboard to the EditMask


select

public void select(int startIndex,
                   int endIndex)
Selects the range of chars from specified startIndex to endIndex

Parameters:
startIndex - The specified start index for the selection
endIndex - The specified end index for the selection this method selects the range including both startIndex and endIndex

getSelectionStartIndex

public int getSelectionStartIndex()
Returns the selection start index


getSelectionEndIndex

public int getSelectionEndIndex()
Returns the selection end index


setCaretPosition

public void setCaretPosition(int caretPosition)
Sets the caret position for the EditMask

Parameters:
caretPosition - The caret position for the EditMask

getCaretPosition

public int getCaretPosition()
Returns the caret position of the EditMask

Returns:
The caret position of the EditMask

setFont

public void setFont(java.awt.Font font)
Method which sets the font for the EditMask

Parameters:
font - The font for the EditMask

setBackground

public void setBackground(java.awt.Color background)
Method which sets the background color for the EditMask

Parameters:
background - The background color for the EditMask

setForeground

public void setForeground(java.awt.Color foreground)
Method which sets the foreground color for the EditMask

Parameters:
foreground - The foreground color for the EditMask

setBorder

public void setBorder(AWTBorder awtBorder)
Method which sets the border for the EditMask

Parameters:
awtBorder - the border for the EditMask

getBorder

public AWTBorder getBorder()
Method which returns the border of the EditMask

Returns:
the border of the EditMask

getInsets

public final java.awt.Insets getInsets()
Overriden the getInsets


setVisible

public void setVisible(boolean bVisible)
Method which sets the visibility for the EditMask

Parameters:
bVisible - the visibility for the EditMask

setEnabled

public void setEnabled(boolean bEnabled)
Method which sets the enability of the EditMask

Parameters:
bEnabled - the enability of the EditMask

isEnabled

public boolean isEnabled()
Returns whether the EditMask is enabled or not

Returns:
whether the EditMask is enabled or not

setLocale

public void setLocale(java.util.Locale locale)
Method which sets the locale for the EditMask

Parameters:
locale - The locale for the EditMask

getLocale

public java.util.Locale getLocale()
Method which returns the locale of the EditMask

Returns:
The locale of the EditMask

setCursor

public void setCursor(java.awt.Cursor cursor)
Method which sets the cursor for the EditMask

Parameters:
cursor - The cursor for the EditMask

getCursor

public java.awt.Cursor getCursor()
Returns the cursor of the EditMask

Returns:
The cursor of the EditMask

setFocusAllowed

public void setFocusAllowed(boolean isFocusAllowed)
Sets the whether focus is allowed or not


isFocusAllowed

public boolean isFocusAllowed()
Returns whether focus is allower or not

Returns:
wheather focus is allowed or not

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Method which sets the bounds of the EditMask

Parameters:
x - The x coordinate of the EditMask
y - The y coordinate of the EditMask
width - The width of the of the EditMask
height - The height of the EditMask

setPreferredSize

public void setPreferredSize(java.awt.Dimension preferredSize)
Sets the preferredSize of the component

Parameters:
preferredSize - The preferredSize for the component

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns the preferredSize of the component

Returns:
The preferredSize of the component

setLicenseKey

public void setLicenseKey(java.lang.String licenseKey)
Methods which sets the license key


getLicenseKey

public java.lang.String getLicenseKey()
Returns the license key of the bean

Returns:
The license key of the bean

addEditMaskListener

public void addEditMaskListener(EditMaskListener l)
Adds the EditMaskListener

Parameters:
l - The EditMaskListener

removeEditMaskListener

public void removeEditMaskListener(EditMaskListener l)
Removes the EditMaskListener

Parameters:
l - The EditMaskListener

fireTextChangedEvent

protected void fireTextChangedEvent(EditMaskEvent e)
Fires the TextChangedEvent event


fireTextWasGoingToChangeEvent

protected void fireTextWasGoingToChangeEvent(EditMaskEvent e)
Fires the TextWasGoingToChange event


addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds the property change listener

Parameters:
l - The property change listener

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes the property change listener

Parameters:
l - The property change listener

firePropertyChange

public void firePropertyChange(java.lang.String property,
                               java.lang.Object oldValue,
                               java.lang.Object newValue)
Fires the property change

Parameters:
property - The name of the property
oldValue - The old value
newValue - The new value

addKeyListener

public void addKeyListener(java.awt.event.KeyListener keyListener)
Adds the key listener

Parameters:
keyListener - The key listener

removeKeyListener

public void removeKeyListener(java.awt.event.KeyListener keyListener)
Removes the key listener

Parameters:
keyListener - The key listener

addFocusListener

public void addFocusListener(java.awt.event.FocusListener focusListener)
Adds the focus listener

Parameters:
focusListener - The focus listener

removeFocusListener

public void removeFocusListener(java.awt.event.FocusListener focusListener)
Removes the focus listener

Parameters:
focusListener - The focus listener

addMouseListener

public void addMouseListener(java.awt.event.MouseListener mouseListener)
Adds the mouse listener

Parameters:
mouseListener - The mouse listener

removeMouseListener

public void removeMouseListener(java.awt.event.MouseListener mouseListener)
Removes the mouse listener

Parameters:
mouseListener - The mouse listener

addMouseMotionListener

public void addMouseMotionListener(java.awt.event.MouseMotionListener mouseMotionListener)
Adds the mouse motion listener


removeMouseMotionListener

public void removeMouseMotionListener(java.awt.event.MouseMotionListener mouseMotionListener)
Removes the mouse motion listener


requestFocus

public void requestFocus()
Overriden request focus


hasFocus

public boolean hasFocus()
Overriden has focus


transferFocus

public void transferFocus()
Overriden transfer focus


writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException,
                          java.awt.IllegalComponentStateException
Implementation of Externalizable

Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.awt.IllegalComponentStateException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Implementation of Externalizable

Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

ElegantJ Data Entry Masks Java API Specification v1.1

Submit a bug or feature

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjbeans.com
All Rights Reserved.