|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent com.lavantech.gui.comp.DateTimePicker
DateTimePicker allows a user to select a date and time.
Nested Class Summary |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.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 |
Constructor Summary | |
DateTimePicker()
Constructs a DateTimePicker component. |
|
DateTimePicker(java.util.Date date,
java.lang.String format)
Constructs a DateTimePicker component. |
|
DateTimePicker(java.util.Date date,
java.lang.String format,
boolean dispCal,
boolean dispClock)
Constructs a DateTimePicker component. |
|
DateTimePicker(java.util.Date date,
java.lang.String format,
boolean dispCal,
boolean dispClock,
java.util.Locale locale)
Constructs a DateTimePicker component. |
|
DateTimePicker(java.util.GregorianCalendar cal,
java.lang.String format)
Constructs a DateTimePicker component. |
|
DateTimePicker(java.util.GregorianCalendar cal,
java.lang.String format,
boolean dispCal,
boolean dispClock)
Constructs a DateTimePicker component. |
|
DateTimePicker(java.util.GregorianCalendar cal,
java.lang.String format,
boolean dispCal,
boolean dispClock,
java.util.Locale locale)
Constructs a DateTimePicker component for the given locale. |
Method Summary | |
void |
addActionListener(java.awt.event.ActionListener ls)
Adds an ActionListener. |
void |
addEditorListener(com.lavantech.gui.comp.PickerEditorListener ls)
Adds an PickerEditorListener. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add a PropertyChangeListener for this Date Time Picker. |
protected javax.swing.JButton |
createDropDownButton()
Returns a arrow button used to activate/close the Date Time Popup. |
java.util.GregorianCalendar |
getCalendar()
Returns the current selected Date, Time and Timezone. |
CalendarPanel |
getCalendarPanel()
Returns the CalendarPanel used in the picker popup. |
java.util.Date |
getDate()
Returns the current selected Date. |
DateUnavailabilityModel |
getDateUnavailabilityModel()
Returns the DateUnavailabilityModel for the CalendarPanel in the Picker. |
boolean |
getDisplayCalendar()
Returns whether Calendar will be displayed for Date Modification. |
boolean |
getDisplayClock()
Returns whether Clock will be displayed for Time Modification. |
javax.swing.JButton |
getDropDownButton()
Returns the drop down button used in the picker |
javax.swing.JFormattedTextField |
getEditor()
Returns the Editor(Used in editable mode) that is used by the Picker. |
java.util.GregorianCalendar |
getMaxSelectableTime()
Returns the maximum time that can be selected in the date time picker. |
java.util.GregorianCalendar |
getMinSelectableTime()
Returns the minimum time that can be selected in the date time picker. |
java.lang.String |
getPattern()
Returns the pattern used for displaying in the selected date/time. |
boolean |
getPopupModal()
Returns whether the popup window for the DateTimePicker will be modal or not. |
javax.swing.JPanel |
getPopupPanel()
Returns the Panel that is used in the Popup Window. |
javax.swing.JButton |
getRenderer()
Returns the Renderer(Used in non editable mode) that is used by the Picker. |
TimePanel |
getTimePanel()
Returns the TimePanel used in the picker poup. |
boolean |
isDateRollOverByClockEnabled()
Returns whether the analog clock time change can affect the Date(Increment date when needle is moved past 23:59:59 in the clockwise direction and decrement date when needle is moved past 00:00:00 in the anti-clockwise direction. |
boolean |
isDateTimePopupAutoCancelEnabled()
Returns whether the Date and Time popup window will be automatically cancelled when the user clicks on some other component in the same window as the DateTimePicker. |
boolean |
isDisplayClearButton()
Returns whether a Clear button will be displayed to clear the date time selection. |
boolean |
isDisplayNowButton()
Returns whether a now button will be displayed to change calendar to current date and time. |
boolean |
isDisplayTodayButton()
Returns whether a today button will be displayed to change calendar to today's date. |
boolean |
isEditable()
Returns whether the DateTimePicker is editable through Keyboard |
void |
removeActionListener(java.awt.event.ActionListener ls)
Removes an ActionListener. |
void |
removeEditorListener(com.lavantech.gui.comp.PickerEditorListener ls)
Removes an PickerEditorListener. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove a PropertyChangeListener for this Date Time Picker. |
void |
setBackground(java.awt.Color bg)
Set the background color of this component. |
void |
setCalendar(java.util.GregorianCalendar cal)
Set the selected Date, Time and Timezone. |
void |
setDate(java.util.Date date)
Set the selected Date and Time. |
void |
setDateRollOverByClockEnabled(boolean roll)
Sets whether the analog clock time change can affect the Date(Increment date when needle is moved past 23:59:59 in the clockwise direction and decrement date when needle is moved past 00:00:00 in the anti-clockwise direction. |
void |
setDateTimePopupAutoCancelEnabled(boolean enable)
Sets whether the Date and Time popup window will be automatically cancelled when the user clicks on some other component in the same window as the DateTimePicker. |
void |
setDateUnavailabilityModel(DateUnavailabilityModel model)
Sets the DateUnavailabilityModel for the CalendarPanel in the Picker. |
void |
setDisplayCalendar(boolean disp)
Sets whether Calendar will be displayed for Date Modification. |
void |
setDisplayClearButton(boolean enable)
Sets whether a Clear button will be displayed to clear the date time selection. |
void |
setDisplayClock(boolean disp)
Sets whether Clock will be displayed for Time Modification. |
void |
setDisplayNowButton(boolean enable)
Sets whether a today button will be displayed to change calendar to current date and time. |
void |
setDisplayTodayButton(boolean enable)
Sets whether a today button will be displayed to change calendar to today's date. |
void |
setEditable(boolean editable)
Sets whether the DateTimePicker is editable through Keyboard |
void |
setEnabled(boolean enabled)
Sets whether or not this picker is enabled. |
void |
setFont(java.awt.Font font)
Set the font for this component. |
void |
setForeground(java.awt.Color fg)
Set the foreground color of this component. |
void |
setMaxSelectableTime(java.util.GregorianCalendar maxTime)
Set the maximum time that can be selected with the picker. |
void |
setMinSelectableTime(java.util.GregorianCalendar minTime)
Set the minimum date/time that can be selected with the picker. |
void |
setPattern(java.lang.String pattern)
Set the pattern for displaying in the selected date/time. |
void |
setPopupModal(boolean modal)
Sets whether the popup window for the DateTimePicker wll be modal or not. |
void |
setToolTipText(java.lang.String text)
Set the tooltip text for this component. |
void |
togglePopup()
Toggle the popup window. |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DateTimePicker()
public DateTimePicker(java.util.Date date, java.lang.String format)
date
- The initial date that will be selected.format
- The format string for displaying the selected date/time.
The format string is the one used in java.text.SimpleDateFormat.SimpleDateFormat
public DateTimePicker(java.util.Date date, java.lang.String format, boolean dispCal, boolean dispClock)
date
- The initial date that will be selected.format
- The format string for displaying the selected date/time.dispCal
- Boolean indicating whether to display Calendar for Date modification
if both dispCal and dispClock are false, then dispCal will be true.dispClock
- Boolean indicating whether to display Clock for Time modification.SimpleDateFormat
public DateTimePicker(java.util.Date date, java.lang.String format, boolean dispCal, boolean dispClock, java.util.Locale locale)
date
- The initial date that will be selected.format
- The format string for displaying the selected date/time.dispCal
- Boolean indicating whether to display Calendar for Date modification
if both dispCal and dispClock are false, then dispCal will be true.dispClock
- Boolean indicating whether to display Clock for Time modification.locale
- Locale to use for displaying calendar month and weekday names.SimpleDateFormat
public DateTimePicker(java.util.GregorianCalendar cal, java.lang.String format)
cal
- The Calendar that will be used to initialize the picker.format
- The format string for displaying the selected date/time.
The format string is the one used in java.text.SimpleDateFormat.SimpleDateFormat
public DateTimePicker(java.util.GregorianCalendar cal, java.lang.String format, boolean dispCal, boolean dispClock)
cal
- The Calendar that will be used to initialize the picker.format
- The format string for displaying the selected date/time.dispCal
- Boolean indicating whether to display Calendar for Date modification
if both dispCal and dispClock are false, then dispCal will be true.dispClock
- Boolean indicating whether to display Clock for Time modification.SimpleDateFormat
public DateTimePicker(java.util.GregorianCalendar cal, java.lang.String format, boolean dispCal, boolean dispClock, java.util.Locale locale)
cal
- The Calendar that will be used to initialize the picker.format
- The format string for displaying the selected date/time.dispCal
- Boolean indicating whether to display Calendar for Date modification
if both dispCal and dispClock are false, then dispCal will be true.dispClock
- Boolean indicating whether to display Clock for Time modification.locale
- Locale to use for displaying calendar month and weekday names.SimpleDateFormat
Method Detail |
protected javax.swing.JButton createDropDownButton()
public void togglePopup()
public java.util.GregorianCalendar getMinSelectableTime()
public void setMinSelectableTime(java.util.GregorianCalendar minTime) throws java.lang.IllegalArgumentException
minTime
- Minimum time that can be selected in DateTimePicker. null
can be passed to remove minimum limit.
java.lang.IllegalArgumentException
- If minTime is greater than maxSelectableTimesetDateUnavailabilityModel(com.lavantech.gui.comp.DateUnavailabilityModel)
public java.util.GregorianCalendar getMaxSelectableTime()
public void setMaxSelectableTime(java.util.GregorianCalendar maxTime) throws java.lang.IllegalArgumentException
maxTime
- Maximum time that can be selected in DateTimePicker. null
can be passed to remove maximum limit.
java.lang.IllegalArgumentException
- If maxTime is less than minSelectableTimesetDateUnavailabilityModel(com.lavantech.gui.comp.DateUnavailabilityModel)
public java.lang.String getPattern()
public void setPattern(java.lang.String pattern)
pattern
- The pattern string for displaying the selected date/time.
The pattern string should be in the syntax used in java.text.SimpleDateFormat.public void setFont(java.awt.Font font)
font
- the desired Font for this componentpublic void setForeground(java.awt.Color fg)
fg
- the desired foreground Color.public void setToolTipText(java.lang.String text)
text
- Tooltip text.public void setBackground(java.awt.Color bg)
bg
- the desired background Color.public void setEditable(boolean editable)
public boolean isEditable()
public void setEnabled(boolean enabled)
public boolean getDisplayCalendar()
public void setDisplayCalendar(boolean disp)
public boolean getDisplayClock()
public void setDisplayClock(boolean disp)
public boolean isDateRollOverByClockEnabled()
public void setDateRollOverByClockEnabled(boolean roll)
public boolean isDateTimePopupAutoCancelEnabled()
public void setDateTimePopupAutoCancelEnabled(boolean enable)
public boolean getPopupModal()
public void setPopupModal(boolean modal)
public boolean isDisplayTodayButton()
public void setDisplayTodayButton(boolean enable)
public boolean isDisplayNowButton()
public void setDisplayNowButton(boolean enable)
public boolean isDisplayClearButton()
public void setDisplayClearButton(boolean enable)
public DateUnavailabilityModel getDateUnavailabilityModel()
public void setDateUnavailabilityModel(DateUnavailabilityModel model)
public CalendarPanel getCalendarPanel()
public TimePanel getTimePanel()
public java.util.Date getDate()
public void setDate(java.util.Date date)
date
- Date to be selectedpublic java.util.GregorianCalendar getCalendar()
public void setCalendar(java.util.GregorianCalendar cal) throws java.lang.IllegalArgumentException
cal
- Calendar to use to set the selected Date, Time and Timezone.
java.lang.IllegalArgumentException
- If min or max time limit is set and
the given time is beyond the set limit.public javax.swing.JPanel getPopupPanel()
public javax.swing.JButton getDropDownButton()
public javax.swing.JButton getRenderer()
public javax.swing.JFormattedTextField getEditor()
public void addActionListener(java.awt.event.ActionListener ls)
public void removeActionListener(java.awt.event.ActionListener ls)
public void addEditorListener(com.lavantech.gui.comp.PickerEditorListener ls)
public void removeEditorListener(com.lavantech.gui.comp.PickerEditorListener ls)
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |