charva.awt.util
Class DateEntryField
- EventListener, FocusListener, KeyListener
public class DateEntryField
This class displays a date entry field in the format CCYY/MM/DD
and allows the user to edit the contents of the three subfields.
It intercepts each keystroke and causes a beep if a non-numeric key
is typed.
BOTTOM_ALIGNMENT , CENTER_ALIGNMENT , LEFT_ALIGNMENT , RIGHT_ALIGNMENT , TOP_ALIGNMENT , _alignmentX , _alignmentY , _background , _cursesColor , _enabled , _focusListeners , _foreground , _keyListeners , _origin , _parent , _visible |
void | focusGained(FocusEvent fe_)
|
void | focusLost(FocusEvent e_)
|
int | getDay() - Get the day-of-month value.
|
int | getMonth() - Get the month value (between 1 and 12)
|
int | getYear() - Get the year value.
|
void | keyPressed(KeyEvent e_) - KEY_PRESSED events are fired when any key (including a function
key and cursor key) is pressed while the component has keyboard
input focus.
|
void | keyReleased(KeyEvent e_) - This is never called.
|
void | keyTyped(KeyEvent e_) - KEY_TYPED events are fired when a key representing a valid text
character (not a function key or cursor key) is pressed.
|
void | set() - Set the fields to the current time.
|
void | setDay(int day_)
|
void | setMonth(int month_) - Set the month field
|
void | setYear(int year_) - Set the year field
|
add , add , debug , doLayout , draw , getComponent , getComponentAt , getComponentAt , getComponentCount , getComponents , getCurrentFocus , getHeight , getInsets , getSize , getWidth , invalidate , isFocusTraversable , isValid , minimumSize , nextFocus , previousFocus , processKeyEvent , remove , requestFocus , setBackground , setFocus , setForeground , setHeight , setLayout , setSize , setSize , setWidth , validate |
addFocusListener , addKeyListener , contains , contains , debug , draw , getAlignmentX , getAlignmentY , getAncestorWindow , getBackground , getBounds , getCursesColor , getForeground , getHeight , getLocation , getLocationOnScreen , getName , getParent , getSize , getWidth , hasFocus , hide , invalidate , isDisplayed , isEnabled , isFocusTraversable , isTotallyObscured , isValid , isVisible , minimumSize , processEvent , processFocusEvent , processKeyEvent , processMouseEvent , repaint , requestFocus , requestSync , setBackground , setBounds , setBounds , setBounds , setEnabled , setForeground , setLocation , setLocation , setName , setParent , setVisible , show , validate , validateCursesColor |
DateEntryField
public DateEntryField(Dialog owner_)
DateEntryField
public DateEntryField(Dialog owner_,
TimeZone zone_)
DateEntryField
public DateEntryField(Frame owner_)
DateEntryField
public DateEntryField(Frame owner_,
TimeZone zone_)
getDay
public int getDay()
Get the day-of-month value.
getMonth
public int getMonth()
Get the month value (between 1 and 12)
getYear
public int getYear()
Get the year value.
keyPressed
public void keyPressed(KeyEvent e_)
KEY_PRESSED events are fired when any key (including a function
key and cursor key) is pressed while the component has keyboard
input focus.
KeyEvent.getKeyCode() can be used to find out which key was pressed.
- keyPressed in interface KeyListener
keyTyped
public void keyTyped(KeyEvent e_)
KEY_TYPED events are fired when a key representing a valid text
character (not a function key or cursor key) is pressed.
KeyEvent.getKeyChar() can be used to get the ASCII code of the key
that was pressed.
- keyTyped in interface KeyListener
set
public void set()
Set the fields to the current time.
setDay
public void setDay(int day_)
setMonth
public void setMonth(int month_)
Set the month field
setYear
public void setYear(int year_)
Set the year field