Package docking.widgets.textfield
Class LocalDateTextField
- java.lang.Object
-
- docking.widgets.textfield.LocalDateTextField
-
public class LocalDateTextField extends java.lang.Object
Text field for entering dates. Optionally, a minimum and maximum date value can be set on this text field.
-
-
Constructor Summary
Constructors Constructor Description LocalDateTextField(java.lang.String dateFormatPattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addActionListener(java.awt.event.ActionListener listener)
void
addChangeListener(javax.swing.event.ChangeListener listener)
Adds a change listener that will be notified whenever the value changes.javax.swing.JComponent
getComponent()
java.time.LocalDate
getMaximum()
java.time.LocalDate
getMinimum()
javax.swing.JTextField
getTextField()
java.time.LocalDate
getValue()
boolean
isShowingFieldMode()
void
removeActionListener(java.awt.event.ActionListener listener)
void
removeChangeListener(javax.swing.event.ChangeListener listener)
Removes the changes listener.void
requestFocus()
void
selectAll()
void
setDayMode()
Sets the mode to Day.void
setEnabled(boolean enabled)
void
setMaximum(java.time.LocalDate maximum)
Sets the maximum allowed date.void
setMinimum(java.time.LocalDate minimum)
Sets the minimum allowed date.void
setMonthMode()
Sets the mode to Month.void
setShowFieldMode(boolean show)
Turns on or off the faded text that indicates if the field is in month or day modevoid
setValue(java.time.LocalDate newDate)
-
-
-
Method Detail
-
setMinimum
public void setMinimum(java.time.LocalDate minimum)
Sets the minimum allowed date. Can be null.- Parameters:
minimum
- the minimum allowed date.
-
setMaximum
public void setMaximum(java.time.LocalDate maximum)
Sets the maximum allowed date. Can be null.- Parameters:
maximum
- the minimum allowed date.
-
setValue
public void setValue(java.time.LocalDate newDate)
-
getValue
public java.time.LocalDate getValue()
-
getMinimum
public java.time.LocalDate getMinimum()
-
getMaximum
public java.time.LocalDate getMaximum()
-
setShowFieldMode
public void setShowFieldMode(boolean show)
Turns on or off the faded text that indicates if the field is in month or day mode- Parameters:
show
- true to show the mode.
-
isShowingFieldMode
public boolean isShowingFieldMode()
-
setMonthMode
public void setMonthMode()
Sets the mode to Month.
-
setDayMode
public void setDayMode()
Sets the mode to Day.
-
getTextField
public javax.swing.JTextField getTextField()
-
getComponent
public javax.swing.JComponent getComponent()
-
setEnabled
public void setEnabled(boolean enabled)
-
requestFocus
public void requestFocus()
-
selectAll
public void selectAll()
-
addActionListener
public void addActionListener(java.awt.event.ActionListener listener)
-
removeActionListener
public void removeActionListener(java.awt.event.ActionListener listener)
-
addChangeListener
public void addChangeListener(javax.swing.event.ChangeListener listener)
Adds a change listener that will be notified whenever the value changes.- Parameters:
listener
- the change listener to add.
-
removeChangeListener
public void removeChangeListener(javax.swing.event.ChangeListener listener)
Removes the changes listener.- Parameters:
listener
- the listener to be removed.
-
-