ElegantJ Data Entry Masks Java API Specification v1.1

com.elegantj.util.datemask
Class DateMask

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Canvas
          extended bycom.elegantj.util.datemask.DateMask
All Implemented Interfaces:
javax.accessibility.Accessible, java.io.Externalizable, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class DateMask
extends java.awt.Canvas
implements java.io.Externalizable

DateMask provides mask for the date, also contains facility of the spin, automatic insert week day

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 com.elegantj.editors.C1 c1
           
static java.lang.String dd_mm_yyyy
          Mask pattern for the DateMask
static java.lang.String dd_mmm_yyyy
          Mask pattern for the DateMask
static java.lang.String dd_mmmmm_yyyy
          Mask pattern for the DateMask
protected  java.awt.Dimension m_preferredSize
          Holds the preferred size of the compoennt
static java.lang.String mm_dd_yyyy
          Mask pattern for the DateMask
static java.lang.String mmm_dd_yyyy
          Mask pattern for the DateMask
static java.lang.String mmmmm_dd_yyyy
          Mask pattern for the DateMask
static java.lang.String yyyy_mm_dd
          Mask pattern for the DateMask
static java.lang.String yyyy_mmm_dd
          Mask pattern for the DateMask
static java.lang.String yyyy_mmmmm_dd
          Mask pattern for the DateMask
 
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
DateMask()
          Constructs the DateMask
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds the property change listener
 void clear()
          Clears the contents of the mask
 void dateMaskKeyPressed(java.awt.event.KeyEvent e)
          Implementation of the KeyListener
 void dateMaskKeyReleased(java.awt.event.KeyEvent e)
          Implementation of the KeyListener
 void dateMaskKeyTyped(java.awt.event.KeyEvent e)
          Implementation of the KeyListener
 void firePropertyChange(java.lang.String property, java.lang.Object oldValue, java.lang.Object newValue)
          Fires the property change
 AWTBorder getBorder()
          Method which returns the border of the DateMask
 java.awt.Color getCaretColor()
          Returns the caret color of the date mask
protected  int getDate()
          Returns the date
protected  int getDateLength(java.lang.String inputMask)
          Returns the length of the date
 java.util.Date getDateObject()
           
 java.lang.String getLicenseKey()
          Returns the license key of the bean
 java.util.Locale getLocale()
          Method which returns the locale of the DateMask
 java.lang.String getMaskPattern()
          Returns the current mask pattern of the date mask
 java.lang.String getMaskText()
          Returns the string currently containing by the mask
 java.awt.Dimension getMinimumSize()
          Returns the minimum size
protected  int getMonth()
          Returns the month
protected  int getMonthLength(java.lang.String inputMask)
          Returns the length of the month
 java.awt.Dimension getPreferredSize()
          Returns the preferredSize of the component
 char getSeparatorChar()
          Returns the separator char for the date mask
protected  int getYear()
          Returns the year
protected  int getYearLength(java.lang.String inputMask)
          Returns the length of the year
 boolean isFocusTraversable()
          Overriden is focus traversable
 boolean isShowShortWeekDay()
          Returns the value of the property, isShowShortWeekDay
 boolean isShowWeekDay()
          Returns the value of the property, isShowWeekDay
 boolean isSpinAllowed()
          Returns The value of the property is spin allowed
 void paint(java.awt.Graphics g)
          Overriden the paint method
protected  void processFocusEvent(java.awt.event.FocusEvent e)
          Overriden process focus event
protected  void processKeyEvent(java.awt.event.KeyEvent e)
          Overriden process key event
 void readExternal(java.io.ObjectInput in)
          Implementation of the Externalizable
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes the property change listener
 void setBackground(java.awt.Color background)
          Method which sets the background color for the DateMask
 void setBorder(AWTBorder awtBorder)
          Method which sets the border for the DateMask
 void setBounds(int x, int y, int width, int height)
          Method which sets the bounds of the DateMask
 void setCaretColor(java.awt.Color caretColor)
          Sets the caret color for the date mask
 void setCursor(java.awt.Cursor cursor)
          Method which sets the cursor for the DateMask
 void setDate(java.util.Date dateObject)
          Sets the date for the date mask
 void setEnabled(boolean bEnabled)
          Method which sets the enability of the DateMask
 void setFont(java.awt.Font font)
          Method which sets the font for the DateMask
 void setForeground(java.awt.Color foreground)
          Method which sets the foreground color for the DateMask
 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 DateMask
 void setMaskPattern(java.lang.String maskPattern)
          Sets the mask pattern for the date mask
protected  void setMaskText(java.lang.String maskText)
          Sets the string for the mask
 void setPreferredSize(java.awt.Dimension preferredSize)
          Sets the preferredSize of the component
 void setSeparatorChar(char separatorChar)
          Sets the separator char for the date mask
 void setShowShortWeekDay(boolean showShortWeekDay)
          Sets the value of property, isShowShortWeekDay
 void setShowWeekDay(boolean showWeekDay)
          Sets the value of the property, isShowWeekDay
 void setSpinAllowed(boolean spinAllowed)
          Sets the value of the property is spin allowed
 void setVisible(boolean bVisible)
          Method which sets the visibility for the DateMask
 void update(java.awt.Graphics g)
          Overriden the update method
 void writeExternal(java.io.ObjectOutput out)
          Implementation of the Externalizable
 
Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dd_mm_yyyy

public static java.lang.String dd_mm_yyyy
Mask pattern for the DateMask


dd_mmm_yyyy

public static java.lang.String dd_mmm_yyyy
Mask pattern for the DateMask


dd_mmmmm_yyyy

public static java.lang.String dd_mmmmm_yyyy
Mask pattern for the DateMask


mm_dd_yyyy

public static java.lang.String mm_dd_yyyy
Mask pattern for the DateMask


mmm_dd_yyyy

public static java.lang.String mmm_dd_yyyy
Mask pattern for the DateMask


mmmmm_dd_yyyy

public static java.lang.String mmmmm_dd_yyyy
Mask pattern for the DateMask


yyyy_mm_dd

public static java.lang.String yyyy_mm_dd
Mask pattern for the DateMask


yyyy_mmm_dd

public static java.lang.String yyyy_mmm_dd
Mask pattern for the DateMask


yyyy_mmmmm_dd

public static java.lang.String yyyy_mmmmm_dd
Mask pattern for the DateMask


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

DateMask

public DateMask()
Constructs the DateMask

Method Detail

getDateLength

protected int getDateLength(java.lang.String inputMask)
Returns the length of the date

Returns:
The length of the date

getMonthLength

protected int getMonthLength(java.lang.String inputMask)
Returns the length of the month

Returns:
The length of the month

getYearLength

protected int getYearLength(java.lang.String inputMask)
Returns the length of the year

Returns:
The length of the year

getDate

protected int getDate()
Returns the date

Returns:
The date

getMonth

protected int getMonth()
Returns the month

Returns:
The month

getYear

protected int getYear()
Returns the year

Returns:
The year

update

public void update(java.awt.Graphics g)
Overriden the update method


paint

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


processKeyEvent

protected void processKeyEvent(java.awt.event.KeyEvent e)
Overriden process key event


dateMaskKeyPressed

public void dateMaskKeyPressed(java.awt.event.KeyEvent e)
Implementation of the KeyListener


dateMaskKeyTyped

public void dateMaskKeyTyped(java.awt.event.KeyEvent e)
Implementation of the KeyListener


dateMaskKeyReleased

public void dateMaskKeyReleased(java.awt.event.KeyEvent e)
Implementation of the KeyListener


processFocusEvent

protected void processFocusEvent(java.awt.event.FocusEvent e)
Overriden process focus event


setDate

public void setDate(java.util.Date dateObject)
Sets the date for the date mask


getDateObject

public java.util.Date getDateObject()

setMaskText

protected 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


setMaskPattern

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


getMaskPattern

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

Returns:
The current mask pattern of the date mask

setSeparatorChar

public void setSeparatorChar(char separatorChar)
Sets the separator char for the date mask

Parameters:
separatorChar - The separator char for the date mask

getSeparatorChar

public char getSeparatorChar()
Returns the separator char for the date mask

Returns:
the separator char for the date mask

setSpinAllowed

public void setSpinAllowed(boolean spinAllowed)
Sets the value of the property is spin allowed


isSpinAllowed

public boolean isSpinAllowed()
Returns The value of the property is spin allowed

Returns:
The value of the property is spin allowed

setCaretColor

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

Parameters:
caretColor - The caret color for the date mask

getCaretColor

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

Returns:
The caret color of the date mask

setShowWeekDay

public void setShowWeekDay(boolean showWeekDay)
Sets the value of the property, isShowWeekDay

Parameters:
showWeekDay - The value of the property, isShowWeekDay

isShowWeekDay

public boolean isShowWeekDay()
Returns the value of the property, isShowWeekDay


setShowShortWeekDay

public void setShowShortWeekDay(boolean showShortWeekDay)
Sets the value of property, isShowShortWeekDay

Parameters:
showShortWeekDay - The value of the property, showShortWeekDay

isShowShortWeekDay

public boolean isShowShortWeekDay()
Returns the value of the property, isShowShortWeekDay


setFont

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

Parameters:
font - The font for the DateMask

setBackground

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

Parameters:
background - The background color for the DateMask

setForeground

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

Parameters:
foreground - The foreground color for the DateMask

setBorder

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

Parameters:
awtBorder - the border for the DateMask

getBorder

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

Returns:
the border of the DateMask

setVisible

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

Parameters:
bVisible - the visibility for the DateMask

setEnabled

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

Parameters:
bEnabled - the enability of the DateMask

setLocale

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

Parameters:
locale - The locale for the DateMask

getLocale

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

Returns:
The locale of the DateMask

setCursor

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

Parameters:
cursor - The cursor for the DateMask

setBounds

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

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

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

getMinimumSize

public java.awt.Dimension getMinimumSize()
Returns the minimum size

Returns:
The minimum size

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

isFocusTraversable

public boolean isFocusTraversable()
Overriden is focus traversable


writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException,
                          java.awt.IllegalComponentStateException
Implementation of the 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 the 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.