|
MDateSelector | |||||||||
| 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
mseries.ui.MDateEntryField
public class MDateEntryField
Date entry component which looks like a combobox, when the button is pushed a calendar drops down for selection of the date. Uses a JFormattedTextField as the display component
| 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 | |
|---|---|
protected MDateField |
display
|
protected EventListenerList |
listenerList
|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, 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 | |
|---|---|
MDateEntryField()
Creates a MDateEntryField with default SHORT DateFormatter |
|
MDateEntryField(DateFormat df)
Creates a MDateEntryField with the formatter passed |
|
MDateEntryField(int size)
Deprecated. simply delegates to MDateEntryField() |
|
| Method Summary | |
|---|---|
void |
addMChangeListener(MChangeListener listener)
Registers the listeners of the field changes. |
void |
addMFieldListener(MFieldListener listener)
Registers the listeners of the field changes. |
void |
closed()
This method is public as an implementation side effect, do not override or call it directly |
void |
drawBorder(boolean border)
causes a border to be drawn around the component |
void |
focusGained(FocusEvent e)
This method is public as an implementation side effect, do not override or call it directly |
void |
focusLost(FocusEvent e)
This method is public as an implementation side effect, do not override or call it directly |
boolean |
getCloseOnToday()
|
MDateSelectorConstraints |
getConstraints()
Gets the constraints object that contains the parameters used to configure the pull down calendar |
MDateFormat |
getDateFormatter()
Deprecated. |
JFormattedTextField.AbstractFormatter |
getDateFormatter(Object x)
|
MDateField |
getDisplay()
Returns the textfield that handles the date editing. |
int |
getFocusLostBehavior()
Delegates to the same method in the JFormattedTextField |
Font |
getFont()
Returns the font that the editor part (the textfield) uses |
InputVerifier |
getInputVerifier()
|
Date |
getMaximum()
|
Date |
getMinimum()
|
String |
getName()
Gets the name attribute which is delegated to the textfield used as the display component |
boolean |
getNullOnEmpty()
|
boolean |
getShowTodayButton()
Does this field have a today button when the pull down is shown ? |
String |
getText()
|
String |
getToolTipText()
|
String |
getUIClassID()
This method gives the UI Manager a constant to use to look up in the UI Defaults table to find the class name of the UI Delegate for the installed L&F. |
Date |
getValue()
|
boolean |
hasBorder()
|
boolean |
isEditable()
|
boolean |
isEnabled()
|
void |
notifyListeners(FocusEvent e)
|
void |
notifyListeners(int type)
Causes the MChangeEvents to be fired. |
void |
opened()
This method is public as an implementation side effect, do not override or call it directly |
protected ComponentUI |
registerUIDelegate()
Used to automatically install the UIDelagate for Windows & Metal Look & Feels. |
void |
removeMChangeListener(MChangeListener listener)
Removes the listener from the registered list of listeners |
void |
removeMFieldListener(MFieldListener listener)
Removes the listener from the registered list of listeners |
void |
requestFocus()
Set focus on the receiving component if isRequestFocusEnabled returns true |
void |
setConstraints(MDateSelectorConstraints c)
Sets the constraints object that contains the parameters used to configure the pull down calendar. |
void |
setDateFormatter(MDateFormat df)
Deprecated. use setFormatter(DateFormat) |
void |
setEditable(boolean editable)
Sets the date entry field editable or not, the button can still be used to allow date selection. |
void |
setFocusLostBehavior(int b)
Delegates to the same method in the JFormattedTextField |
void |
setFont(Font font)
|
void |
setInputVerifier(InputVerifier inputVerifier)
|
void |
setMaximum(Date date)
Sets the latest value that may be selected for this field when the poup calendar in invoked. |
void |
setMinimum(Date date)
Sets the earliest value that may be selected for this field when the poup calendar in invoked. |
void |
setName(String name)
Sets the name attribute which is delegated to the textfield used as the display component |
void |
setNullOnEmpty(boolean nullOnEmpty)
If set to true the getValue method will return null when the text field is empty, otherwise a ParseException is thrown since "" is not a valid date. |
void |
setShowTodayButton(boolean show)
The pull down can be configured with a button at the bottom to quickly select the current date. |
void |
setShowTodayButton(boolean show,
boolean close)
The pull down can be configured with a button at the bottom to quickly select the current date. |
void |
setText(String text)
This method does not do anything, the implementation is empty and it only present to make the component a JavaBean |
void |
setToolTipText(String text)
|
void |
setValue(Date newValue)
Sets the current value in the field, parsed using the current date formatter |
void |
updateUI()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected MDateField display
protected EventListenerList listenerList
| Constructor Detail |
|---|
public MDateEntryField()
public MDateEntryField(DateFormat df)
df - the date formatter to use in the display and for parsing the value
in the JFormattedTextFieldpublic MDateEntryField(int size)
size - the size of the display part of the component| Method Detail |
|---|
public MDateField getDisplay()
public void updateUI()
updateUI in class JComponentpublic int getFocusLostBehavior()
public void setFocusLostBehavior(int b)
b - focus lost behaviourprotected ComponentUI registerUIDelegate()
getUIClassID()public String getUIClassID()
getUIClassID in class JComponentpublic boolean getNullOnEmpty()
public void setNullOnEmpty(boolean nullOnEmpty)
nullOnEmpty - set to true if a null is required when the textfield is emptypublic String getText()
public void setText(String text)
public String getName()
getName in class Componentpublic void setName(String name)
setName in class Componentname - the name attribute
public Date getValue()
throws ParseException
ParseException - if it is not a valid datepublic void setValue(Date newValue)
newValue - the new valuepublic void setDateFormatter(MDateFormat df)
df - the date formatterpublic MDateFormat getDateFormatter()
public JFormattedTextField.AbstractFormatter getDateFormatter(Object x)
public void setMinimum(Date date)
date - the ealiest datepublic void setMaximum(Date date)
date - the latest datepublic Date getMinimum()
public Date getMaximum()
public boolean hasBorder()
public void drawBorder(boolean border)
border - true is a border is to be drawn (default=true)public Font getFont()
getFont in interface MenuContainergetFont in class Componentpublic void setFont(Font font)
setFont in class JComponentpublic boolean isEnabled()
isEnabled in class Componentpublic void setEditable(boolean editable)
editable - true if the field can be typed intopublic boolean isEditable()
public void setInputVerifier(InputVerifier inputVerifier)
setInputVerifier in class JComponentpublic InputVerifier getInputVerifier()
getInputVerifier in class JComponentpublic void setConstraints(MDateSelectorConstraints c)
c - the constraints objectgetConstraints()public MDateSelectorConstraints getConstraints()
getConstraints()public void setToolTipText(String text)
setToolTipText in class JComponentpublic String getToolTipText()
getToolTipText in class JComponentpublic void opened()
public void closed()
public void focusLost(FocusEvent e)
focusLost in interface FocusListenerpublic void requestFocus()
requestFocus in class JComponentpublic void focusGained(FocusEvent e)
focusGained in interface FocusListenerpublic void addMFieldListener(MFieldListener listener)
listener - - MFieldListenerremoveMFieldListener(mseries.Calendar.MFieldListener)public void removeMFieldListener(MFieldListener listener)
listener - - MFieldListenerpublic void notifyListeners(FocusEvent e)
public void addMChangeListener(MChangeListener listener)
listener - - MMonthListenerpublic void removeMChangeListener(MChangeListener listener)
listener - - MMonthListenerpublic void notifyListeners(int type)
public void setShowTodayButton(boolean show)
show - set this to true if the button is required.MDateSelectorConstraintspublic boolean getShowTodayButton()
setShowTodayButton(boolean)
public void setShowTodayButton(boolean show,
boolean close)
show - set this to true if the button is required.close - the popup closes when close is true (default)MDateSelectorConstraintspublic boolean getCloseOnToday()
|
MDateSelector | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||