|
Holger's Java API |
|||||||||
| 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
com.antelmann.util.gui.JDateRangeChooser
@ThirdParty(value="com.toedter.calendar components") public class JDateRangeChooser
This class allows to easily select a range of dates. Selection changes are promoted to listening ActionListeners. This class implements ThirdParty for its use of
JTimeChooser,
Serialized Form| Nested Class Summary | |
|---|---|
static class |
JDateRangeChooser.Interval
|
| 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 |
|---|
| 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 |
| Method Summary | |
|---|---|
void |
addActionListener(ActionListener listener)
to be notified for selection changes |
Date |
getBegin()
returns the day begin of the visually selected date |
JDateRangeChooser.Interval |
getChosenInterval()
|
Date |
getEnd()
returns the day end of the visually selected date |
Range<Date> |
getFullRange()
ranges from the day begin until the end of the day at the end |
Range<Date> |
getRange()
|
Range<Date> |
getRelevantValue()
returns the relevant value for this instance at the time of calling |
void |
removeActionListener(ActionListener listener)
|
void |
setDateFormatPattern(String pattern)
|
void |
setDaysBeforeToday(int days)
sets an individual interval starting at today minus the given days and ending now |
void |
setEnabled(boolean flag)
|
void |
setInterval(Date begin,
Date end)
|
void |
setInterval(Date begin,
JDateRangeChooser.Interval interval)
the begin time will be set to the begin of the day of the given date while the end will be set after begin according to the given interval. |
void |
setInterval(JDateRangeChooser jic)
|
void |
setInterval(Range<Date> range)
|
void |
setIntervalFromSettings(String prefix)
|
void |
setIntervalFromSettings(String prefix,
Map<?,?> props)
|
void |
setIntervalFromSettings(String prefix,
Map<?,?> props,
DateFormat df)
supports [prefix]beginDate and either [prefix]interval or [prefix]endDate |
static Range<Date> |
showDialog(Component parent,
String title)
convenience method to quickly select a date range |
Range<Date> |
showSelectionDialog(Component parent,
String title)
convenience method to quickly select a date range based on this customized instance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JDateRangeChooser()
public JDateRangeChooser(LayoutOption layout)
public JDateRangeChooser(int padding)
public JDateRangeChooser(String dateFormatPattern)
public JDateRangeChooser(Date begin,
JDateRangeChooser.Interval interval)
public JDateRangeChooser(Date begin,
JDateRangeChooser.Interval interval,
LayoutOption layout)
public JDateRangeChooser(Date begin,
JDateRangeChooser.Interval interval,
LayoutOption layout,
int padding)
public JDateRangeChooser(Date begin,
JDateRangeChooser.Interval interval,
LayoutOption layout,
String dateFormatPattern)
public JDateRangeChooser(Date begin,
JDateRangeChooser.Interval interval,
LayoutOption layout,
int padding,
String dateFormatPattern)
public JDateRangeChooser(Date begin,
Date end)
public JDateRangeChooser(Date begin,
Date end,
LayoutOption layout)
public JDateRangeChooser(Date begin,
Date end,
LayoutOption layout,
String dateFormatPattern)
public JDateRangeChooser(Date begin,
Date end,
LayoutOption layout,
int padding)
public JDateRangeChooser(Date begin,
Date end,
LayoutOption layout,
int padding,
String dateFormatPattern)
| Method Detail |
|---|
public Range<Date> showSelectionDialog(Component parent,
String title)
public static Range<Date> showDialog(Component parent,
String title)
public void setEnabled(boolean flag)
setEnabled in class JComponentpublic void setDateFormatPattern(String pattern)
public Date getBegin()
public Date getEnd()
public Range<Date> getRange()
public Range<Date> getFullRange()
public Range<Date> getRelevantValue()
ValueRetriever
getRelevantValue in interface ValueRetriever<Range<Date>>public void addActionListener(ActionListener listener)
public void removeActionListener(ActionListener listener)
public void setIntervalFromSettings(String prefix)
throws IllegalArgumentException,
ParseException
IllegalArgumentException
ParseException
public void setIntervalFromSettings(String prefix,
Map<?,?> props)
throws IllegalArgumentException,
ParseException
IllegalArgumentException
ParseException
public void setIntervalFromSettings(String prefix,
Map<?,?> props,
DateFormat df)
throws IllegalArgumentException,
ParseException
IllegalArgumentException
ParseExceptionpublic void setInterval(JDateRangeChooser jic)
public void setInterval(Range<Date> range)
public void setInterval(Date begin,
Date end)
public void setDaysBeforeToday(int days)
public JDateRangeChooser.Interval getChosenInterval()
public void setInterval(Date begin,
JDateRangeChooser.Interval interval)
throws IllegalArgumentException
IllegalArgumentException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||