|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.text.JTextComponent
javax.swing.JTextField
org.rapla.components.calendar.AbstractBlockField
org.rapla.components.calendar.DateField
public final class DateField
The DateField only accepts characters that are part of DateFormat.getDateInstance(DateFormat.SHORT,locale). The inputblocks are [date,month,year]. The order of the input-blocks is determined by the locale. You can use the keyboard to navigate between the blocks or to increment/decrement the blocks.
AbstractBlockField
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JTextField |
---|
JTextField.AccessibleJTextField |
Nested classes/interfaces inherited from class javax.swing.text.JTextComponent |
---|
JTextComponent.AccessibleJTextComponent, JTextComponent.KeyBinding |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class org.rapla.components.calendar.AbstractBlockField |
---|
m_oldText |
Fields inherited from class javax.swing.JTextField |
---|
notifyAction |
Fields inherited from class javax.swing.text.JTextComponent |
---|
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
DateField()
|
|
DateField(Locale locale)
|
|
DateField(Locale locale,
TimeZone timeZone)
|
Method Summary | |
---|---|
protected int |
blockCount()
The number of blocks for this Component. |
boolean |
blocksValid()
returns true if the text can be split into blocks. |
protected void |
changeSelectedBlock(int[] blocks,
int block,
String selected,
int count)
This method will be called, when the user has pressed the up/down arrows on a selected block. |
Date |
getDate()
|
DateFormat |
getOutputFormat()
returns the output format of the date-field. |
DateFormat |
getParsingFormat()
returns the parsingFormat of the selected locale. |
protected char[] |
getSeparators()
|
TimeZone |
getTimeZone()
|
String |
getToolTipText(MouseEvent event)
|
protected boolean |
isSeparator(char c)
returns true if the character is a block-separator. |
protected boolean |
isValidChar(char c)
returns true if the character should be accepted by the component. |
protected void |
mark(int dot,
int mark)
Select the text from dot to mark. |
protected int |
maxBlockLength(int block)
returns the maximum length of the specified block. |
void |
paint(Graphics g)
|
void |
setDate(Date value)
|
void |
setDateRenderer(DateRenderer dateRenderer)
sets the DateRenderer for the calendar |
void |
setLocale(Locale locale)
|
void |
setTimeZone(TimeZone timeZone)
|
void |
setWeekdaysVisible(boolean m_weekdaysVisible)
you can choose, if weekdays should be displayed in the right corner of the DateField. |
Methods inherited from class org.rapla.components.calendar.AbstractBlockField |
---|
addChangeListener, beep, calcBlocks, createDefaultModel, fireValueChanged, getChangeListeners, markBlock, removeChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DateField()
public DateField(Locale locale)
public DateField(Locale locale, TimeZone timeZone)
Method Detail |
---|
public void setLocale(Locale locale)
setLocale
in class Component
public void setTimeZone(TimeZone timeZone)
public void setWeekdaysVisible(boolean m_weekdaysVisible)
public void setDateRenderer(DateRenderer dateRenderer)
public TimeZone getTimeZone()
public Date getDate()
public void setDate(Date value)
protected char[] getSeparators()
getSeparators
in class AbstractBlockField
protected boolean isSeparator(char c)
AbstractBlockField
isSeparator
in class AbstractBlockField
AbstractBlockField.isValidChar(char)
public DateFormat getParsingFormat()
public DateFormat getOutputFormat()
protected void changeSelectedBlock(int[] blocks, int block, String selected, int count)
AbstractBlockField
changeSelectedBlock
in class AbstractBlockField
count
- Posible values are 1,-1,10,-10.public String getToolTipText(MouseEvent event)
getToolTipText
in class JTextComponent
public boolean blocksValid()
AbstractBlockField
blocksValid
in class AbstractBlockField
protected int blockCount()
AbstractBlockField
blockCount
in class AbstractBlockField
protected void mark(int dot, int mark)
AbstractBlockField
mark
in class AbstractBlockField
protected int maxBlockLength(int block)
AbstractBlockField
maxBlockLength
in class AbstractBlockField
protected boolean isValidChar(char c)
AbstractBlockField
isValidChar
in class AbstractBlockField
public void paint(Graphics g)
paint
in class JComponent
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |