|
ElegantJ Data Entry Masks Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
com.elegantj.util.editmask.EditMask
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.
| 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 |
public static int LEFT
public static int CENTER
public static int RIGHT
public static java.lang.String ALL
public static java.lang.String NUMERIC_MASK
public static java.lang.String ALPHABETIC_MASK
public static java.lang.String ALPHA_NUMERIC_MASK
public transient com.elegantj.editors.C1 c1
protected java.awt.Dimension m_preferredSize
| Constructor Detail |
public EditMask()
| Method Detail |
public void paint(java.awt.Graphics g)
public void setMaskText(java.lang.String maskText)
public java.lang.String getMaskText()
public void clear()
public void setMaskType(java.lang.String maskType)
maskType - the mask type for the EditMask
The values are NUMERIC_MASK, ALPHABETIC_MASK, ALPHA_NUMERIC_MASKpublic java.lang.String getMaskType()
public void setMaskPattern(java.lang.String maskPattern)
public java.lang.String getMaskPattern()
public void setCaretColor(java.awt.Color caretColor)
caretColor - The caret color for the edit maskpublic java.awt.Color getCaretColor()
public void setSelectionAllowed(boolean isSelectionAllowed)
isSelectionAllowed - whether selection is allowed or notpublic boolean isSelectionAllowed()
public void setSelectionBackground(java.awt.Color selectionBackground)
public java.awt.Color getSelectionBackground()
public void setSelectionForeground(java.awt.Color selectionForeground)
public java.awt.Color getSelectionForeground()
public void setDisabledBackground(java.awt.Color disabledBackground)
disabledBackground - The disabled backgroundpublic java.awt.Color getDisabledBackground()
public void setDisabledForeground(java.awt.Color disabledForeground)
disabledForeground - The disabled foregroundpublic java.awt.Color getDisabledForeground()
public void setEditable(boolean isEditable)
isEditable - The boolean value for the editability of the edit maskpublic boolean isEditable()
public void setAlignment(int alignment)
alignment - The value of the alignment
The possible values are LEFT, CENTER, RIGHTpublic int getAlignment()
public void setCaretBlinkRate(int caretBlinkRate)
caretBlinkRate - The caret blink rate for the caret
This method gets the blink rate in milli secondspublic int getCaretBlinkRate()
public void setDigitsAfterDecimalPoint(int digitsAfterDecimalPoint)
public int getDigitsAfterDecimalPoint()
public void setDecimalPointAllowed(boolean isDecimalPointAllowed)
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 effectpublic boolean isDecimalPointAllowed()
public void setMinusSignAllowed(boolean isMinusSignAllowed)
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 effectpublic boolean isMinusSignAllowed()
public void setMinNumericValue(double minNumericValue)
public double getMinNumericValue()
public void setMaxNumericValue(double maxNumericValue)
public double getMaxNumericValue()
public boolean isValidNumericValue()
public void setDoubleBuffered(boolean isDoubleBuffered)
public boolean isDoubleBuffered()
public void setIncludeChars(java.lang.String maskType,
java.lang.String includeChars)
maskType - The specified mask type, possible values are EditMask.ALL, EditMask.NUMERIC_MASK, EditMask.ALPHABETIC_MASK, EditMask.ALPHA_NUMERIC_MASKincludeChars - The string containing the include charspublic java.lang.String getIncludeChars(java.lang.String maskType)
maskType - The specified mask type
The possible values for the maskType are EditMask.ALL, EditMask.NUMERIC_MASK, EditMask.ALPHABETIC_MASK, EditMask.ALPHA_NUMERIC_MASK
public void setExcludeChars(java.lang.String maskTeyp,
java.lang.String excludeChars)
excludeChars - The string containing the include charspublic java.lang.String getExcludeChars(java.lang.String maskType)
maskType - The specified mask type
The possible values for the maskType are EditMask.ALL, EditMask.NUMERIC_MASK, EditMask.ALPHABETIC_MASK, EditMask.ALPHA_NUMERIC_MASKpublic void cut()
public void copy()
public void paste()
public void select(int startIndex,
int endIndex)
startIndex - The specified start index for the selectionendIndex - The specified end index for the selection
this method selects the range including both startIndex and endIndexpublic int getSelectionStartIndex()
public int getSelectionEndIndex()
public void setCaretPosition(int caretPosition)
caretPosition - The caret position for the EditMaskpublic int getCaretPosition()
public void setFont(java.awt.Font font)
font - The font for the EditMaskpublic void setBackground(java.awt.Color background)
background - The background color for the EditMaskpublic void setForeground(java.awt.Color foreground)
foreground - The foreground color for the EditMaskpublic void setBorder(AWTBorder awtBorder)
awtBorder - the border for the EditMaskpublic AWTBorder getBorder()
public final java.awt.Insets getInsets()
public void setVisible(boolean bVisible)
bVisible - the visibility for the EditMaskpublic void setEnabled(boolean bEnabled)
bEnabled - the enability of the EditMaskpublic boolean isEnabled()
public void setLocale(java.util.Locale locale)
locale - The locale for the EditMaskpublic java.util.Locale getLocale()
public void setCursor(java.awt.Cursor cursor)
cursor - The cursor for the EditMaskpublic java.awt.Cursor getCursor()
public void setFocusAllowed(boolean isFocusAllowed)
public boolean isFocusAllowed()
public void setBounds(int x,
int y,
int width,
int height)
x - The x coordinate of the EditMasky - The y coordinate of the EditMaskwidth - The width of the of the EditMaskheight - The height of the EditMaskpublic void setPreferredSize(java.awt.Dimension preferredSize)
preferredSize - The preferredSize for the componentpublic java.awt.Dimension getPreferredSize()
public void setLicenseKey(java.lang.String licenseKey)
public java.lang.String getLicenseKey()
public void addEditMaskListener(EditMaskListener l)
l - The EditMaskListenerpublic void removeEditMaskListener(EditMaskListener l)
l - The EditMaskListenerprotected void fireTextChangedEvent(EditMaskEvent e)
protected void fireTextWasGoingToChangeEvent(EditMaskEvent e)
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
l - The property change listenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
l - The property change listener
public void firePropertyChange(java.lang.String property,
java.lang.Object oldValue,
java.lang.Object newValue)
property - The name of the propertyoldValue - The old valuenewValue - The new valuepublic void addKeyListener(java.awt.event.KeyListener keyListener)
keyListener - The key listenerpublic void removeKeyListener(java.awt.event.KeyListener keyListener)
keyListener - The key listenerpublic void addFocusListener(java.awt.event.FocusListener focusListener)
focusListener - The focus listenerpublic void removeFocusListener(java.awt.event.FocusListener focusListener)
focusListener - The focus listenerpublic void addMouseListener(java.awt.event.MouseListener mouseListener)
mouseListener - The mouse listenerpublic void removeMouseListener(java.awt.event.MouseListener mouseListener)
mouseListener - The mouse listenerpublic void addMouseMotionListener(java.awt.event.MouseMotionListener mouseMotionListener)
public void removeMouseMotionListener(java.awt.event.MouseMotionListener mouseMotionListener)
public void requestFocus()
public boolean hasFocus()
public void transferFocus()
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException,
java.awt.IllegalComponentStateException
writeExternal in interface java.io.Externalizablejava.io.IOException
java.awt.IllegalComponentStateException
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundException
|
ElegantJ Data Entry Masks Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||