market.swing
Class JCTimeRangeBoxes
java.lang.Object
|
+--market.swing.JCTimeRangeBoxes
- All Implemented Interfaces:
- Serializable
- public class JCTimeRangeBoxes
- extends Object
- implements Serializable
A set of JComboBoxes
for specifying a range of time for which statistics should
be displayed.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JCTimeRangeBoxes
public JCTimeRangeBoxes()
init
public void init()
- Initializes the ComboBoxes' models according to the range of time from which
statistics can be displayed.
getFromMonth
public int getFromMonth()
- Returns:
- the index of the month displayed by
#jcbFromMonth
.
getToMonth
public int getToMonth()
- Returns:
- the index of the month displayed by
#jcbToMonth
.
getFromYear
public int getFromYear()
- Returns:
- the index of the month displayed by
#jcbFromYear
.
getToYear
public int getToYear()
- Returns:
- the index of the month displayed by
#jcbToYear
.
getMonth
public int getMonth(String s)
- Parameters:
s
- the name of a month (e.g. Januar or März).
- Returns:
- the index of the searched month according to the
months array.
isValidTimeRange
public boolean isValidTimeRange()
- Checks if the start of the desired range of time is not after the end of the time range.
- Returns:
true
if a valid time range was selected, otherwise false
.
getFromMonthBox
public JComboBox getFromMonthBox()
- Returns:
#jcbFromMonth
.
getFromYearBox
public JComboBox getFromYearBox()
- Returns:
#jcbFromYear
.
getToMonthBox
public JComboBox getToMonthBox()
- Returns:
#jcbToMonth
.
getToYearBox
public JComboBox getToYearBox()
- Returns:
#jcbToYear
.