Package com.illumon.iris.console.events
Class DBDateTimeSpinner
java.lang.Object
com.illumon.iris.console.events.DBDateTimeSpinner
public class DBDateTimeSpinner extends Object
Wraps a JSpinner so that it is set up correctly to display and edit a DBDateTime
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DBDateTimeSpinner.DateTimeSelection
The sections of the date that can be selected. -
Field Summary
Fields Modifier and Type Field Description static String
MOVE_BACK
static String
NEXT_DATE_TIME_ACTION
static String
PREV_DATE_TIME_ACTION
-
Constructor Summary
Constructors Constructor Description DBDateTimeSpinner(JSpinner spinner)
DBDateTimeSpinner(JSpinner spinner, DBDateTime intialValue, DBTimeZone timeZone)
-
Method Summary
Modifier and Type Method Description void
clearSelection()
Clears the current selection and sets the caret to the appropriate position for typing.JSpinner
getSpinner()
JFormattedTextField
getTextField()
DBTimeZone
getTimeZone()
DBDateTime
getValue()
void
moveCursorBack()
Moves the cursor back one space.void
selectCurrent()
Re-selects the current selection.void
selectField(DBDateTimeSpinner.DateTimeSelection field)
Selects a certain field in the printed time.void
selectIndex(int index)
Selects a field based on an index.void
selectNext()
Selects the next field in the printed time.void
selectPrevious()
Selects the previous field in the printed time.void
setTimeZone(DBTimeZone timeZone)
void
setValue(DBDateTime value)
-
Field Details
-
NEXT_DATE_TIME_ACTION
- See Also:
- Constant Field Values
-
PREV_DATE_TIME_ACTION
- See Also:
- Constant Field Values
-
MOVE_BACK
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
getValue
-
setValue
-
getTimeZone
-
setTimeZone
-
getSpinner
-
getTextField
-
moveCursorBack
public void moveCursorBack()Moves the cursor back one space. -
clearSelection
public void clearSelection()Clears the current selection and sets the caret to the appropriate position for typing. -
selectField
Selects a certain field in the printed time.- Parameters:
field
- the field to select
-
selectCurrent
public void selectCurrent()Re-selects the current selection. -
selectNext
public void selectNext()Selects the next field in the printed time. Wraps around to the front. -
selectPrevious
public void selectPrevious()Selects the previous field in the printed time. Wraps around to the back. -
selectIndex
public void selectIndex(int index)Selects a field based on an index.- Parameters:
index
- the index to select from
-