de.matthiasmann.twl
Class DatePicker

java.lang.Object
  extended by de.matthiasmann.twl.Widget
      extended by de.matthiasmann.twl.DialogLayout
          extended by de.matthiasmann.twl.DatePicker

public class DatePicker
extends DialogLayout

A date picker panel


Nested Class Summary
static interface DatePicker.Callback
           
static interface DatePicker.ParseHook
           
 
Nested classes/interfaces inherited from class de.matthiasmann.twl.DialogLayout
DialogLayout.Gap, DialogLayout.Group
 
Nested classes/interfaces inherited from class de.matthiasmann.twl.Widget
Widget.OffscreenMouseAdjustments, Widget.RenderOffscreen
 
Field Summary
static AnimationState.StateKey STATE_NEXT_MONTH
           
static AnimationState.StateKey STATE_PREV_MONTH
           
 
Fields inherited from class de.matthiasmann.twl.DialogLayout
addDefaultGaps, blockInvalidateLayoutTree, DEFAULT_GAP, defaultGap, includeInvisibleWidgets, isPrepared, LARGE_GAP, largeGap, MEDIUM_GAP, mediumGap, namedGaps, redoDefaultGaps, SMALL_GAP, smallGap, warnOnIncomplete
 
Fields inherited from class de.matthiasmann.twl.Widget
STATE_DISABLED, STATE_HAS_FOCUSED_CHILD, STATE_HAS_OPEN_POPUPS, STATE_KEYBOARD_FOCUS
 
Constructor Summary
DatePicker()
           
DatePicker(java.util.Locale locale, java.text.DateFormat dateFormat)
           
DatePicker(java.util.Locale locale, int style)
          Constructs a date picker panel using the specified locale and date format style
 
Method Summary
 void addCallback(DatePicker.Callback callback)
           
protected  void afterAddToGUI(GUI gui)
          Called after this widget has been added to a GUI tree.
protected  void beforeRemoveFromGUI(GUI gui)
          Called when this widget is removed from the GUI tree.
 java.lang.String formatDate()
           
 java.text.DateFormat getDateFormat()
           
 java.util.Locale getLocale()
           
 DateModel getModel()
           
 DatePicker.ParseHook getParseHook()
           
 void parseDate(java.lang.String date)
           
protected  void parseDateImpl(java.lang.String text, boolean update)
           
 void removeCallback(DatePicker.Callback callback)
           
 void setDateFormat(java.util.Locale locale, java.text.DateFormat dateFormat)
           
 void setModel(DateModel model)
           
 void setParseHook(DatePicker.ParseHook parseHook)
           
 
Methods inherited from class de.matthiasmann.twl.DialogLayout
addDefaultGaps, adjustSize, applyTheme, applyThemeDialogLayout, childVisibilityChanged, createParallelGroup, createParallelGroup, createParallelGroup, createSequentialGroup, createSequentialGroup, createSequentialGroup, doLayout, getDefaultGap, getHorizontalGroup, getLargeGap, getMediumGap, getMinHeight, getMinWidth, getPreferredInnerHeight, getPreferredInnerWidth, getSmallGap, getVerticalGroup, insertChild, invalidateLayout, isAddDefaultGaps, isIncludeInvisibleWidgets, layout, layoutGroupsChanged, maybeInvalidateLayoutTree, paintWidget, prepare, recheckWidgets, removeAllChildren, removeChild, removeDefaultGaps, setAddDefaultGaps, setDefaultGap, setHorizontalGroup, setIncludeInvisibleWidgets, setLargeGap, setMediumGap, setSmallGap, setVerticalGroup, setWidgetAlignment, sizeChanged
 
Methods inherited from class de.matthiasmann.twl.Widget
add, addActionMapping, addPropertyChangeListener, addPropertyChangeListener, allChildrenRemoved, applyThemeBackground, applyThemeBorder, applyThemeInputMap, applyThemeMaxSize, applyThemeMinSize, applyThemeMouseCursor, applyThemeOffscreenExtra, applyThemeOverlay, applyThemeTooltip, borderChanged, canAcceptKeyboardFocus, childAdded, childInvalidateLayout, childRemoved, computeSize, destroy, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, focusFirstChild, focusLastChild, focusNextChild, focusPrevChild, getActionMap, getAnimationState, getBackground, getBorderBottom, getBorderHorizontal, getBorderLeft, getBorderRight, getBorderTop, getBorderVertical, getBottom, getChild, getChildAt, getChildIndex, getGUI, getHeight, getInnerBottom, getInnerHeight, getInnerRight, getInnerWidth, getInnerX, getInnerY, getInputMap, getKeyboardFocusOrder, getMaxHeight, getMaxWidth, getMouseCursor, getMouseCursor, getNumChildren, getOffscreenExtraBottom, getOffscreenExtraLeft, getOffscreenExtraRight, getOffscreenExtraTop, getOrCreateActionMap, getOverlay, getParent, getPreferredHeight, getPreferredWidth, getRenderOffscreen, getRight, getRootWidget, getTheme, getThemePath, getThemeTooltipContent, getTintAnimator, getTooltipContent, getTooltipContentAt, getWidgetAt, getWidth, getX, getY, giveupKeyboardFocus, handleEvent, handleKeyStrokeAction, hasKeyboardFocus, hasOpenPopups, hasSharedAnimationState, invalidateLayoutLocally, isAbsoluteTheme, isClip, isDepthFocusTraversal, isEnabled, isFocusKeyEnabled, isInside, isLocallyEnabled, isMouseInside, isVisible, keyboardFocusChildChanged, keyboardFocusGained, keyboardFocusGained, keyboardFocusLost, layoutChildFullInnerArea, layoutChildrenFullInnerArea, moveChild, paint, paintBackground, paintChild, paintChildren, paintDragOverlay, paintOverlay, positionChanged, reapplyTheme, removeChild, removePropertyChangeListener, removePropertyChangeListener, requestKeyboardFocus, requestKeyboardFocus, resetTooltip, setActionMap, setBackground, setBorderSize, setBorderSize, setBorderSize, setBorderSize, setCanAcceptKeyboardFocus, setClip, setDepthFocusTraversal, setEnabled, setFocusKeyEnabled, setInnerSize, setInputMap, setMaxSize, setMinSize, setMouseCursor, setOffscreenExtra, setOffscreenExtra, setOverlay, setPosition, setRenderOffscreen, setSize, setTheme, setTintAnimator, setTooltipContent, setVisible, updateTintAnimation, updateTooltip, validateLayout, widgetDisabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE_PREV_MONTH

public static final AnimationState.StateKey STATE_PREV_MONTH

STATE_NEXT_MONTH

public static final AnimationState.StateKey STATE_NEXT_MONTH
Constructor Detail

DatePicker

public DatePicker()

DatePicker

public DatePicker(java.util.Locale locale,
                  int style)
Constructs a date picker panel using the specified locale and date format style

Parameters:
locale - the locale
style - the date style
See Also:
DateFormat.getDateInstance(int, java.util.Locale)

DatePicker

public DatePicker(java.util.Locale locale,
                  java.text.DateFormat dateFormat)
Method Detail

getModel

public DateModel getModel()

setModel

public void setModel(DateModel model)

getDateFormat

public java.text.DateFormat getDateFormat()

getLocale

public java.util.Locale getLocale()

setDateFormat

public void setDateFormat(java.util.Locale locale,
                          java.text.DateFormat dateFormat)

getParseHook

public DatePicker.ParseHook getParseHook()

setParseHook

public void setParseHook(DatePicker.ParseHook parseHook)

addCallback

public void addCallback(DatePicker.Callback callback)

removeCallback

public void removeCallback(DatePicker.Callback callback)

formatDate

public java.lang.String formatDate()

parseDate

public void parseDate(java.lang.String date)
               throws java.text.ParseException
Throws:
java.text.ParseException

parseDateImpl

protected void parseDateImpl(java.lang.String text,
                             boolean update)
                      throws java.text.ParseException
Throws:
java.text.ParseException

afterAddToGUI

protected void afterAddToGUI(GUI gui)
Description copied from class: Widget
Called after this widget has been added to a GUI tree.

Overrides:
afterAddToGUI in class DialogLayout
Parameters:
gui - the GUI object - same as getGUI()
See Also:
Widget.getGUI()

beforeRemoveFromGUI

protected void beforeRemoveFromGUI(GUI gui)
Description copied from class: Widget
Called when this widget is removed from the GUI tree. After this call getGUI() will return null.

Overrides:
beforeRemoveFromGUI in class Widget
Parameters:
gui - the GUI object - same as getGUI()
See Also:
Widget.getGUI()