|
Diamond Control Suite 3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent diamondedge.swing.DsDatePicker
public class DsDatePicker
DsDatePicker displays a drop down DsDateView to select a date visually using a calendar style component. The date can also be edited directly by typing into the date field.
Nested Class Summary |
---|
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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
CUSTOM_FORMAT
Display date and time using the format string specified in the 'CustomFormat' property. |
protected JFormattedTextField |
field
|
static int |
FULL_DATE
Display date in full format, for example 'Monday, September 2, 1974'. |
static int |
FULL_DATE_TIME
Display date and time in full format, for example 'Monday, September 2, 1974 5:31:42 PM MST'. |
static int |
LONG_DATE
Display date in long format, for example 'September 2, 1974'. |
static int |
LONG_DATE_TIME
Display date and time in long format, for example 'September 2, 1974 5:31:42 PM MST'. |
static int |
MEDIUM_DATE
Display date in medium format, for example 'Sep 2, 1974'. |
static int |
MEDIUM_DATE_TIME
Display date and time in medium format, for example 'Sep 2, 1974 5:31 PM'. |
static int |
SHORT_DATE
Display date in short format, for example '9/2/74'. |
static int |
SHORT_DATE_TIME
Display date and time in short format, for example '9/2/74 5:31 PM'. |
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 java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
DsDatePicker()
|
|
DsDatePicker(Calendar displayDate,
Locale locale)
|
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
|
void |
addActionListener(ActionListener l)
|
Calendar |
getCalendar()
Returns a Calendar object containing the currently selected date. |
String |
getCustomFormat()
Returns a format string used to set the date format when the Format property is set to CUSTOM_FORMAT. |
Date |
getDate()
Returns a Date object containing the currently selected date. |
boolean |
getDateOnly()
Returns whether the time portion should be always set to 0. |
int |
getFormat()
Determines whether dates and times are displayed using standard or custom formatting. |
Locale |
getLocale()
Gets the locale of this component. |
boolean |
isAlwaysValid()
Returns whether the text input always represents a valid date according to the Format property. |
boolean |
isFocusOwner()
|
boolean |
isNullAllowed()
Returns whether a null date is allowed. |
void |
keyPressed(KeyEvent e)
|
void |
keyReleased(KeyEvent e)
|
void |
keyTyped(KeyEvent e)
|
void |
propertyChange(PropertyChangeEvent e)
|
void |
removeActionListener(ActionListener l)
|
void |
setAlwaysValid(boolean alwaysValid)
Sets whether the text input always represents a valid date according to the Format property. |
void |
setCalendar(Calendar date)
Sets the date to be displayed. |
void |
setCustomFormat(String customFormat)
Sets the format string used to set the date format when the Format property is set to CUSTOM_FORMAT. |
void |
setDate(Date date)
Sets the date to be displayed. |
void |
setDateFormat(DateFormat dateFormat)
Sets the format object used to display the date. |
void |
setDateOnly(boolean dateOnly)
Sets whether the time portion should be always set to 0. |
static void |
setDefaultAlwaysValid(boolean b)
Sets the default value for all newly created DsDatePickers as to whether the text input always represents a valid date according to the Format property. |
void |
setEnabled(boolean b)
|
void |
setFont(Font f)
|
void |
setFormat(int val)
Determines whether dates and times are displayed using standard or custom formatting. |
void |
setLocale(Locale locale)
Sets the locale of this component. |
void |
setNullAllowed(boolean allowNull)
Sets whether a null date is allowed. |
void |
setToolTipText(String text)
Sets the text for the ToolTip of the editor to the given text. |
void |
updateUI()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int SHORT_DATE
public static final int MEDIUM_DATE
public static final int LONG_DATE
public static final int FULL_DATE
public static final int SHORT_DATE_TIME
public static final int MEDIUM_DATE_TIME
public static final int LONG_DATE_TIME
public static final int FULL_DATE_TIME
public static final int CUSTOM_FORMAT
protected JFormattedTextField field
Constructor Detail |
---|
public DsDatePicker()
public DsDatePicker(Calendar displayDate, Locale locale)
Method Detail |
---|
public void updateUI()
updateUI
in class JComponent
public void setEnabled(boolean b)
setEnabled
in class JComponent
public boolean isFocusOwner()
isFocusOwner
in class Component
public Calendar getCalendar()
public void setCalendar(Calendar date)
public Date getDate()
public void setDate(Date date)
public Locale getLocale()
getLocale
in class Component
public void setLocale(Locale locale)
setLocale
in class Component
setFormat(int)
public void setDateFormat(DateFormat dateFormat)
setFormat(int)
public int getFormat()
public void setFormat(int val)
SHORT_DATE - Short Date Format (for example "9/2/74"). MEDIUM_DATE - Long Date Format (for example "Sep 2, 1974"). LONG_DATE - Long Date Format (for example "September 2, 1974"). FULL_DATE - Full Date Format (for example "Monday, September 2, 1974"). SHORT_DATE_TIME - Short Date, Short Time Format (for example "9/2/74 5:31 PM"). MEDIUM_DATE_TIME - Medium Date, Short Time Format (for example "Sep 2, 1974 5:31 PM"). LONG_DATE_TIME - Long Date, Long Time Format (for example "September 2, 1974 5:31:42 PM MST"). FULL_DATE_TIME - Full Date, Full Time Format (for example "Monday, September 2, 1974 5:31:42 PM MST"). CUSTOM_FORMAT - Custom format (see CustomFormat property).This is a convenience method that calls setDateFormat with the appropriate DateFormat instance. You can call setDateFormat directly with any other format combinations such as: DateFormat.getDateTimeInstance( DateFormat.LONG, DateFormat.SHORT )
setDateFormat(java.text.DateFormat)
public String getCustomFormat()
public void setCustomFormat(String customFormat)
setFormat(int)
,
setDateFormat(java.text.DateFormat)
public static void setDefaultAlwaysValid(boolean b)
setAlwaysValid(boolean)
public boolean isAlwaysValid()
public void setAlwaysValid(boolean alwaysValid)
setFormat(int)
public boolean isNullAllowed()
public void setNullAllowed(boolean allowNull)
public boolean getDateOnly()
public void setDateOnly(boolean dateOnly)
setFormat(int)
public void setFont(Font f)
setFont
in class JComponent
public void setToolTipText(String text)
setToolTipText
in class JComponent
public void addActionListener(ActionListener l)
public void removeActionListener(ActionListener l)
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void keyPressed(KeyEvent e)
keyPressed
in interface KeyListener
public void keyReleased(KeyEvent e)
keyReleased
in interface KeyListener
public void keyTyped(KeyEvent e)
keyTyped
in interface KeyListener
public void propertyChange(PropertyChangeEvent e)
propertyChange
in interface PropertyChangeListener
|
Diamond Control Suite 3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |