com.miginfocom.calendar
Class DatePicker

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.miginfocom.calendar.DatePicker
All Implemented Interfaces:
DateChangeListener, java.awt.event.ActionListener, java.awt.event.FocusListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.PopupMenuListener
Direct Known Subclasses:
DatePickerBean, ThemeDatePicker

public class DatePicker
extends javax.swing.JPanel
implements java.awt.event.ActionListener, java.awt.event.FocusListener, javax.swing.event.PopupMenuListener, java.awt.event.MouseListener, DateChangeListener, java.awt.event.KeyListener

A JPanel that looks like a regular combo box but contains more features and types of buttons.

Configure how the popup date area looks like the same way that a normal DefaultDateArea is configured. It is retrieved with datePicker.getDateAreaContainer().getDateArea().

The date selected, mouse over, pressed, visible range and such are handled by the contained date container's DateArea.
Use: datePicker.addDateChangeListener(listener); to listen for date changes.

See Also:
getDateAreaContainer(), DateAreaContainer.getDateArea()., Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, 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
DatePicker()
          Constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void addActivityDragResizeListener(ActivityDragResizeListener l)
          This call is transmitted to the DefaultDateArea.addActivityDragResizeListener(com.miginfocom.calendar.datearea.ActivityDragResizeListener)
 void addActivityDragResizeListener(ActivityDragResizeListener l, boolean asWeakRef)
          This call is transmitted to the DefaultDateArea.addActivityDragResizeListener(com.miginfocom.calendar.datearea.ActivityDragResizeListener, boolean)
 void addActivityMoveListener(ActivityMoveListener l)
          This call is transmitted to the DefaultDateArea.addActivityMoveListener(com.miginfocom.calendar.datearea.ActivityMoveListener)
 void addActivityMoveListener(ActivityMoveListener l, boolean asWeakRef)
          This call is transmitted to the DefaultDateArea.addActivityMoveListener(com.miginfocom.calendar.datearea.ActivityMoveListener, boolean)
 void addDate(int amount)
          Adds amount to the selected date range.
 void addDateChangeListener(DateChangeListener l)
          This call is transmitted to the DefaultDateArea.addDateChangeListener(com.miginfocom.util.dates.DateChangeListener)
 void addDateChangeListener(DateChangeListener l, boolean asWeakRef)
          This call is transmitted to the DefaultDateArea.addDateChangeListener(com.miginfocom.util.dates.DateChangeListener, boolean)
 void addInteractionListener(InteractionListener l)
          This call is transmitted to the DefaultDateArea.addInteractionListener(com.miginfocom.ashape.interaction.InteractionListener)
 void addInteractionListener(InteractionListener l, boolean asWeakRef)
          This call is transmitted to the DefaultDateArea.addInteractionListener(com.miginfocom.ashape.interaction.InteractionListener, boolean)
protected  DateAreaContainer createDateAreaContainer()
          Creates a container with a date area inside.
protected  ComboFormattedTextField createEditor()
          Creates an editor for displaying and possibly editing a date or date range.
If not editable (setEditable(b) overridden) it should call togglePopup() when pressed on.
protected  void createPopup()
          Creates the popup.
 void dateRangeChanged(DateChangeEvent e)
          Called when a date range changed.
protected  void destroyPopup()
          Destroys the current popup and disposes of it's resources.
 void focusGained(java.awt.event.FocusEvent e)
           
 void focusLost(java.awt.event.FocusEvent e)
           
 java.awt.Color getArrowColor()
          Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.
protected  java.awt.Color getArrowColorUI()
          Returns the preferred arrow color
 java.lang.String getArrowLeftTooltipText()
          Returns the tooltip for the arrow left button.
 java.lang.String getArrowRightTooltipText()
          Returns the tooltip for the arrow right button.
 java.awt.Color getArrowShadowColor()
          Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.
protected  java.awt.Color getArrowShadowColorUI()
          Returns the preferred arrow color
 java.awt.Color getBackground()
           
 java.awt.Insets getBigButtonsInsets()
          Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.
protected  javax.swing.border.Border getButtonBorderUI()
          Returns the border to use for the buttons in the combo
 java.lang.Boolean getButtonContentAreaFilled()
          Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.
protected  javax.swing.JComponent getButtonDividerUI()
          Returns the border to use for the buttons in the combo
protected  java.awt.Insets getButtonInsetsUI()
          Returns the button insets for the right+left arrow buttons
 javax.swing.border.Border getButtonsBorder()
          Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.
protected  boolean getButtonsContentAreaFilledUI()
          Returns if the button should be paint their background or not
 java.awt.Color getButtonsDividerColor()
          Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.
 java.lang.Integer getButtonsDividerWidth()
          Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.
 java.lang.Boolean getButtonsOpaque()
          Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.
 javax.swing.border.Border getComboBorder()
          Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.
protected  javax.swing.border.Border getComboBorderUI()
          Returns the border to use for the the combo
 int getCustomRangeAddField()
          Returns the field used for adding when the selected date range isn't at a recognizable boundary.
 java.lang.String getCustomRangeEndPrefix()
          Returns the text to append before end date/time string shown in combo if custom date range.
 int getCustomRangeMinType()
          Returns the minimum range span that a custom date range (which means it is not exactly a second, minute, hour, day, week, month or year(week/month)) should be rounded to.
 java.lang.String getCustomRangeStartPrefix()
          Returns the text to append before start date/time string shown in combo if custom date range.
 DefaultDateArea getDateArea()
          Returns the date area in the date area container.
 DateAreaContainer getDateAreaContainer()
          Returns the container that is (or will be) displayed in the popup.
 java.lang.Integer getDefaultDateStyle()
          Returns the default style for a date.
 java.lang.Integer getDefaultTimeStyle()
          Returns the default style for time.
 java.lang.Integer getDropDownArrowSize()
          Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.
protected  int getDropDownArrowSizeUI()
          Returns the arrow size for the drow down button
 javax.swing.JTextField getEditor()
          Returns the editor used for editing the date.
 javax.swing.border.Border getEditorBorder()
          Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.
protected  javax.swing.border.Border getEditorBorderUI()
          Returns the border to use for the the combo
 java.lang.Boolean getEditorTextAntiAlias()
          Deprecated. Use getEditorTextAntiAliasHint()
 int getEditorTextAntiAliasHint()
          Priperty: How the editor should be anti aliased, if at all.
 java.lang.Integer getHomeArrowGap()
          Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.
protected  int getHomeArrowsGapUI()
          Returns the arrow gap for the home button
 java.lang.Integer getHomeArrowSize()
          Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.
protected  int getHomeArrowsSizeUI()
          Returns the arrow size for the home button
 java.lang.String getHomeButtonTooltipText()
          Returns the tooltip for the today button.
 java.lang.Integer getLeftRightArrowSize()
          Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.
protected  int getLeftRightArrowSizeUI()
          Returns the arrow size for the left/right buttons
 java.awt.Insets getLeftRightButtonInsets()
          Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.
 java.awt.Dimension getMaximumPopupSize()
          Returns the maximum size of the popup.
 java.awt.Dimension getMinimumPopupSize()
          Returns the minimum size of the popup.
 java.lang.String getNoDateSelectedText()
          Returns the text to display if there are no date/time selected.
 javax.swing.border.Border getPopupBorder()
          Returns the border used for the popup or null for the default (UI) one.
 java.awt.Dimension getPreferredPopupSize()
          Returns the preferred size of the popup.
 int getRangeAddAmount()
          Returns the amount that is added or subtracted from the selected date range when the left or right button in the date picker is pressed.
 java.lang.Integer getRangeAddField()
          Returns the forced Calendar field that is added/subtracted when the left/right buttons are pressed in the date picker.
 DateFormatList getRangeFormat(int rangeType)
          Returns the DateFormat used for displaying a certain range type.
 DateRangeI getSelectedRange()
          Returns the selected date range.
 boolean getShowOneStringForRangeType(int rangeType)
          Returns if one string (E.g.
protected  java.awt.Insets getSmallButtonInsetsUI()
          Returns the button insets for the right+left arrow buttons
 java.lang.String getVisibleDateRangeString()
          Property: A string representing the visual date range of the exact form: "yyyyMMdd'T'HHmmssSSS'-'yyyyMMdd'T'HHmmssSSS" without the ' of course.
 void gotoHomeDate()
          Goes to the "today" date
protected  boolean isButtonsOpaqueUI()
          Returns if the button should be ipaque depending on the cuurent installed UI
 boolean isDropDownButtonVisible()
          Returns if the popup drop down button is visible.
 boolean isEditable()
          Returns whether the combo is editable or not
 boolean isEditorParsingLenient()
          Returns if the parsing in the editor should be lenient.
 boolean isFocusable()
           
 boolean isHideEndDate()
          Returns if the end date should be hidden, and thus uneditable, if a start and end date should be shown such as for a custom date range or a recognized range (e.g.
 boolean isHomeButtonVisible()
          Returns if the "goto home" (today) button should be shown.
 boolean isLeftRightButtonsVisible()
          Returns if the spinner (up/down) arrows should be shown.
 boolean isPopupVisible()
          Returnerar om popupen syns just nu
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void popupMenuCanceled(javax.swing.event.PopupMenuEvent e)
           
 void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent e)
           
 void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent e)
           
protected  java.lang.String preParseEditorValue(java.lang.String editorValue)
          This method gives a subclass the option to filter the editor value before it is parsed.
 void removeActivityDragResizeListener(ActivityDragResizeListener l)
          This call is transmitted to the DefaultDateArea.removeActivityDragResizeListener(com.miginfocom.calendar.datearea.ActivityDragResizeListener)
 void removeActivityMoveListener(ActivityMoveListener l)
          This call is transmitted to the DefaultDateArea.removeActivityMoveListener(com.miginfocom.calendar.datearea.ActivityMoveListener)
 void removeDateChangeListener(DateChangeListener l)
          This call is transmitted to the DefaultDateArea.removeDateChangeListener(com.miginfocom.util.dates.DateChangeListener)
 void removeInteractionListener(InteractionListener l)
          This call is transmitted to the DefaultDateArea.removeInteractionListener(com.miginfocom.ashape.interaction.InteractionListener)
 void scrollToShowRange(DateRangeI range, float xAlign, float yAlign)
          Scrolls the scroll pane so that the smalles bounds that cover all dates/times in range will be shown.
 void setArrowColor(java.awt.Color arrowColor)
          Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.
 void setArrowLeftTooltipText(java.lang.String s)
          Sets the tooltip for the arrow left button.
 void setArrowRightTooltipText(java.lang.String s)
          Sets the tooltip for the arrow right button.
 void setArrowShadowColor(java.awt.Color arrowShadowColor)
          Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.
 void setBigButtonsInsets(java.awt.Insets bigButtonsInsets)
          Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.
 void setButtonsBorder(javax.swing.border.Border buttonsBorder)
          Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.
 void setButtonsContentAreaFilled(java.lang.Boolean buttonsContentAreaFilled)
          Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.
 void setButtonsDividerColor(java.awt.Color buttonsDividerColor)
          Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.
 void setButtonsDividerWidth(java.lang.Integer buttonsDividerWidth)
          Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.
 void setButtonsOpaque(java.lang.Boolean buttonsOpaque)
          Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.
 void setComboBorder(javax.swing.border.Border comboBorder)
          Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.
 void setCustomRangeAddField(int field)
          Set the field used for adding when the selected date range isn't at a recognizable boundary.
Calendar.DAY_OF_YEAR is default.
 void setCustomRangeEndPrefix(java.lang.String customRangeEndPrefix)
          Sets the text to append before end date/time string shown in combo if custom date range.
 void setCustomRangeMinType(int rangeType)
          Sets the minimum range span that a custom date range (not exactly a second, minute, hour, day, week, month or year(week/month)) should be rounded to.
 void setCustomRangeStartPrefix(java.lang.String customRangeStartPrefix)
          Sets the text to append before start date/time string shown in combo if custom date range.
 void setDateAreaContainer(DateAreaContainer container)
          Sets the container that will be displayed in the popup.
 void setDefaultDateStyle(java.lang.Integer defaultDateStyle)
          Sets the default style for a date.
 void setDefaultTimeStyle(java.lang.Integer defaultTimeStyle)
          Sets the default style for a time.
 void setDropDownArrowSize(java.lang.Integer dropDownArrowSize)
          Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.
 void setDropDownButtonVisible(boolean b)
          Sets if the popup drop down button should be visible.
 void setEditable(boolean b)
          Sets whether the combo should be editable or not
 void setEditorBorder(javax.swing.border.Border editorBorder)
          Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.
 void setEditorParsingLenient(boolean b)
          Sets if the parsing in the editor should be lenient.
 void setEditorTextAntiAlias(java.lang.Boolean antiAlias)
          Deprecated. Use setEditorTextAntiAliasHint(int)
 void setEditorTextAntiAliasHint(int aaHint)
          Priperty: How the editor should be anti aliased, if at all.
 void setEnabled(boolean b)
           
 void setFocusable(boolean b)
           
 void setFont(java.awt.Font font)
          Overridden to set the font of the editor (as well).
 void setHideEndDate(boolean b)
          Sets if the end date should be hidden, and thus uneditable, if a start and end date should be shown such as for a custom date range or a recognized range (e.g.
 void setHomeArrowGap(java.lang.Integer homeArrowGap)
          Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.
 void setHomeArrowSize(java.lang.Integer homeArrowSize)
          Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.
 void setHomeButtonTooltipText(java.lang.String s)
          Sets the tooltip for the today button.
 void setHomeButtonVisible(boolean b)
          Sets if the "goto home" (today) button should be shown.
 void setLeftRightArrowSize(java.lang.Integer leftRightArrowSize)
          Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.
 void setLeftRightButtonInsets(java.awt.Insets leftRightButtonInsets)
          Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.
 void setLeftRightButtonsVisible(boolean b)
          Sets if the spinner (up/down) arrows should be shown.
 void setMaximumPopupSize(java.awt.Dimension maxPopupSize)
          Sets the maximum size of the popup.
 void setMinimumPopupSize(java.awt.Dimension minPopupSize)
          Sets the minimum size of the popup.
 void setNoDateSelectedText(java.lang.String noDateText)
          Sets the text to display if there are no date/time selected.
 void setPopupBorder(javax.swing.border.Border popupBorder)
          Sets the border to use for the popup.
 boolean setPopupVisible(boolean b)
          Shows or hides the popup
 void setPreferredPopupSize(java.awt.Dimension prefPopupSize)
          Sets the preferred size of the popup.
 void setRangeAddAmount(int amount)
          Sets the amount that is added or subtracted from the selected date range when the left or right button in the date picker is pressed.
 void setRangeAddField(java.lang.Integer field)
          Set the forced Calendar field that is added/subtracted when the left/right buttons are pressed in the date picker.
 void setRangeFormat(int rangeType, DateFormatList dateFormatList)
          Maps a Integer(DateRangeI.RANGE_TYPE_xxx) to a SimpeDateFormat pattern used to display a different string for when a month is selected as opposed to when a day is selected for instance.
 void setSelectedRange(DateRangeI dateRange)
          Sets the selected date range.
 void setShowOneStringForRangeType(int rangeType, boolean b)
          Set if one string (E.g.
 void setVisibleDateRange(DateRangeI visibleDateRange)
          Sets the visible range of the date popup
 void setVisibleDateRangeString(java.lang.String dateStrings)
          Property: A string representing the visual date range of the exact form: "yyyyMMdd'T'HHmmssSSS'-'yyyyMMdd'T'HHmmssSSS" without the ' of course.
 void updateUI()
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, 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

DatePicker

public DatePicker()
Constructor.

Method Detail

getBackground

public java.awt.Color getBackground()
Overrides:
getBackground in class java.awt.Component

getEditor

public javax.swing.JTextField getEditor()
Returns the editor used for editing the date.

Returns:
The editor used for editing the date

isPopupVisible

public boolean isPopupVisible()
Returnerar om popupen syns just nu

Returns:
Om popupen syns just nu

setPopupVisible

public boolean setPopupVisible(boolean b)
Shows or hides the popup

Parameters:
b - true if the popup should be shown
Returns:
If the popup is showing.

scrollToShowRange

public void scrollToShowRange(DateRangeI range,
                              float xAlign,
                              float yAlign)
Scrolls the scroll pane so that the smalles bounds that cover all dates/times in range will be shown. If range does not overlap the date areas date range this method returns without doing anything.

Note that if the popup is not visible the scrolling will be delayed to when the popup is shown.

Parameters:
range - The range to scroll to.
xAlign - How to position the bound within the view port horizontally. 0.0f is left, 1.0f is right and 0.5f is center justified. Any values in between is also ok.
yAlign - How to position the bound within the view port vertically. 0.0f is top, 1.0f is bottom and 0.5f is center justified. Any values in between is also ok.

createPopup

protected void createPopup()
Creates the popup.


destroyPopup

protected void destroyPopup()
Destroys the current popup and disposes of it's resources.


preParseEditorValue

protected java.lang.String preParseEditorValue(java.lang.String editorValue)
This method gives a subclass the option to filter the editor value before it is parsed. Since the parsing is mostly done by SimpleDateFormat the parsing is quite lenient. Overrid this method and for instance check that time of day is correct. As an example SimpleDateFormat accepts "99.99" as time of day.

This default implementation will just return editorValue unchanged.

Parameters:
editorValue - The editor value that is read from the text field in the date picker.
Returns:
Another, filtered, value or editorValue if not filtered. null if the value should be thrown away.

getRangeAddField

public java.lang.Integer getRangeAddField()
Returns the forced Calendar field that is added/subtracted when the left/right buttons are pressed in the date picker. If null the range type the is selected at the time of the press is used (e.g. week or day). If null and no recognizable range type is found the value from getCustomRangeAddField() is used.

Returns:
The forced Calendar field that is added/subtracted. E.g. Calendar.HOUR_OF_DAY. May be null.

setRangeAddField

public void setRangeAddField(java.lang.Integer field)
Set the forced Calendar field that is added/subtracted when the left/right buttons are pressed in the date picker. If null the range type the is selected at the time of the press is used (e.g. week or day). If null and no recognizable range type is found the value from getCustomRangeAddField() is used.

Parameters:
field - The forced Calendar field that is added/subtracted. Set to null (default) to use the automatic range recognition. E.g. Calendar.DAY_OF_YEAR.

getRangeAddAmount

public int getRangeAddAmount()
Returns the amount that is added or subtracted from the selected date range when the left or right button in the date picker is pressed. The is what date range type is currently selected (e.g. a week or a day) if not the property forcedArrowButtonField is set to a specific calendar field to add.

Returns:
The amount that is added or subtracted from the selected date range. > 0. Default is 1.

setRangeAddAmount

public void setRangeAddAmount(int amount)
Sets the amount that is added or subtracted from the selected date range when the left or right button in the date picker is pressed. The is what date range type is currently selected (e.g. a week or a day) if not the property forcedArrowButtonField is set to a specific calendar field to add.

Parameters:
amount - The amount to add. Must be > 0. Default is 1.

getCustomRangeAddField

public int getCustomRangeAddField()
Returns the field used for adding when the selected date range isn't at a recognizable boundary.

Returns:
The field to add when addDate(int) is called. Happens when the plus/mins buttons are pressed for instance.

setCustomRangeAddField

public void setCustomRangeAddField(int field)
Set the field used for adding when the selected date range isn't at a recognizable boundary.
Calendar.DAY_OF_YEAR is default.

Parameters:
field - The field to add when addDate(int) is called. Happens when the plus/mins buttons are pressed for instance.

isHideEndDate

public boolean isHideEndDate()
Returns if the end date should be hidden, and thus uneditable, if a start and end date should be shown such as for a custom date range or a recognized range (e.g. week, day) that should show start and end date anyway using setShowOneStringForRangeType(int, boolean).

Returns:
If the end date should be hidden

setHideEndDate

public void setHideEndDate(boolean b)
Sets if the end date should be hidden, and thus uneditable, if a start and end date should be shown such as for a custom date range or a recognized range (e.g. week, day) that should show start and end date anyway using setShowOneStringForRangeType(int, boolean).

Parameters:
b - If the end date should be hidden

addDate

public void addDate(int amount)
Adds amount to the selected date range. If the date range is at a known boundsry, such as a week, that is the date type that is added. If not then the field set with setCustomRangeAddField(int) will be the field that is added.

If the property rangeAddField != null then that range type is always used and override both the CustomRangeAddField and the known boundary.

Parameters:
amount - The amount to add/substract

gotoHomeDate

public void gotoHomeDate()
Goes to the "today" date


setEditable

public void setEditable(boolean b)
Sets whether the combo should be editable or not

Parameters:
b - true means editable

isEditable

public boolean isEditable()
Returns whether the combo is editable or not

Returns:
true means editable

setFocusable

public void setFocusable(boolean b)
Overrides:
setFocusable in class java.awt.Component

isFocusable

public boolean isFocusable()
Overrides:
isFocusable in class java.awt.Component

setEnabled

public void setEnabled(boolean b)
Overrides:
setEnabled in class javax.swing.JComponent

isEditorParsingLenient

public boolean isEditorParsingLenient()
Returns if the parsing in the editor should be lenient.

Returns:
If the parsing in the editor should be lenient.

setEditorParsingLenient

public void setEditorParsingLenient(boolean b)
Sets if the parsing in the editor should be lenient.

Parameters:
b - If the parsing in the editor should be lenient.

setVisibleDateRange

public void setVisibleDateRange(DateRangeI visibleDateRange)
Sets the visible range of the date popup

Parameters:
visibleDateRange - The range to be shown. The whole week that the start and end date represents will be shown, respectively. Not changed, cloned locally.

createDateAreaContainer

protected DateAreaContainer createDateAreaContainer()
Creates a container with a date area inside. Default an ThemeDateAreaContainer with and DefaultDateArea inside.

Returns:
A container with a date area inside. Never null.

createEditor

protected ComboFormattedTextField createEditor()
Creates an editor for displaying and possibly editing a date or date range.
If not editable (setEditable(b) overridden) it should call togglePopup() when pressed on.

Returns:
The editor. Never null.

updateUI

public void updateUI()
Overrides:
updateUI in class javax.swing.JPanel

getDateAreaContainer

public DateAreaContainer getDateAreaContainer()
Returns the container that is (or will be) displayed in the popup.

Returns:
The container. Not null.

setDateAreaContainer

public void setDateAreaContainer(DateAreaContainer container)
Sets the container that will be displayed in the popup.

Parameters:
container - The container. Not null.

setHomeButtonTooltipText

public void setHomeButtonTooltipText(java.lang.String s)
Sets the tooltip for the today button. If button isn't displaying nothing is set.

Parameters:
s - The tooltip for the button.

getHomeButtonTooltipText

public java.lang.String getHomeButtonTooltipText()
Returns the tooltip for the today button.

Returns:
the tooltip for the today button. Never null.

setArrowRightTooltipText

public void setArrowRightTooltipText(java.lang.String s)
Sets the tooltip for the arrow right button. If button isn't displaying nothing is set.

Parameters:
s - The tooltip for the button.

getArrowRightTooltipText

public java.lang.String getArrowRightTooltipText()
Returns the tooltip for the arrow right button.

Returns:
the tooltip for the arrow right button. Never null.

setArrowLeftTooltipText

public void setArrowLeftTooltipText(java.lang.String s)
Sets the tooltip for the arrow left button. If button isn't displaying nothing is set.

Parameters:
s - The tooltip for the button.

getArrowLeftTooltipText

public java.lang.String getArrowLeftTooltipText()
Returns the tooltip for the arrow left button.

Returns:
the tooltip for the arrow left button. Never null.

setSelectedRange

public void setSelectedRange(DateRangeI dateRange)
Sets the selected date range.

Parameters:
dateRange - The selected date range or null if none selected.

getSelectedRange

public DateRangeI getSelectedRange()
Returns the selected date range.

Returns:
The selected date range or null if none selected.

getVisibleDateRangeString

public java.lang.String getVisibleDateRangeString()
Property: A string representing the visual date range of the exact form: "yyyyMMdd'T'HHmmssSSS'-'yyyyMMdd'T'HHmmssSSS" without the ' of course. Example: 20061030T164500000

Note that the dates will be rounded to even up to the cells defined by primaryDimensionCellType and primaryDimensionCellTypeCount as well as wrapType.

Note that this is a convenience that should only be used for tests since there is no time zone or locale information.

If there is a format error the property set will be silently ignored.

Returns:
The current visual date range. Not null.
See Also:
DefaultDateArea.setVisibleDateRange(com.miginfocom.util.dates.DateRangeI)

setVisibleDateRangeString

public void setVisibleDateRangeString(java.lang.String dateStrings)
Property: A string representing the visual date range of the exact form: "yyyyMMdd'T'HHmmssSSS'-'yyyyMMdd'T'HHmmssSSS" without the ' of course. Example: 20061030T164500000

Note that this is a convenience that should only be used for tests since there is no time zone or locale information.

If there is a format error the property set will be silently ignored.

Parameters:
dateStrings - The new visual date range. Not null.
See Also:
DefaultDateArea.getVisibleDateRange(), DefaultDateArea.getVisibleDateRangeCorrected()

getDateArea

public DefaultDateArea getDateArea()
Returns the date area in the date area container.

Returns:
The date area in the date area container.

isLeftRightButtonsVisible

public boolean isLeftRightButtonsVisible()
Returns if the spinner (up/down) arrows should be shown.

Returns:
If the spinner (up/down) arrows should be shown.

setLeftRightButtonsVisible

public void setLeftRightButtonsVisible(boolean b)
Sets if the spinner (up/down) arrows should be shown.

Parameters:
b - If the spinner (up/down) arrows should be shown.

isDropDownButtonVisible

public boolean isDropDownButtonVisible()
Returns if the popup drop down button is visible.

Returns:
If the popup drop down button is visible.

setDropDownButtonVisible

public void setDropDownButtonVisible(boolean b)
Sets if the popup drop down button should be visible.

Parameters:
b - If the popup drop down button should be visible.

isHomeButtonVisible

public boolean isHomeButtonVisible()
Returns if the "goto home" (today) button should be shown.

Returns:
If the "goto home" (today) button should be shown.

setHomeButtonVisible

public void setHomeButtonVisible(boolean b)
Sets if the "goto home" (today) button should be shown.

Parameters:
b - If the "goto home" (today) button should be shown.

getCustomRangeMinType

public int getCustomRangeMinType()
Returns the minimum range span that a custom date range (which means it is not exactly a second, minute, hour, day, week, month or year(week/month)) should be rounded to. Default is DateRangeI.RANGE_TYPE_DAY.

Returns:
The minimum range span that a custom date range.

setCustomRangeMinType

public void setCustomRangeMinType(int rangeType)
Sets the minimum range span that a custom date range (not exactly a second, minute, hour, day, week, month or year(week/month)) should be rounded to. Default is DateRangeI.RANGE_TYPE_DAY.

Parameters:
rangeType - The minimum range span that a custom date range.šE.g. DateRangeI.RANGE_TYPE_xxx.

setShowOneStringForRangeType

public void setShowOneStringForRangeType(int rangeType,
                                         boolean b)
Set if one string (E.g. "Week 51") should be used for range types that are recognized. If not then for instance "20 dec 2004 - 26 dec 2004" would be shown instead. I.e. even a range of type rangeType will be treated as "custom".

Parameters:
rangeType - The range type to change the value for. E.g. DateRangeI.RANGE_TYPE_xxx.
b - true means one string. i.e. shorter.

getShowOneStringForRangeType

public boolean getShowOneStringForRangeType(int rangeType)
Returns if one string (E.g. "Week 51") are used for range types that are recognized. If not then for instance "20 dec 2004 - 25 dec 2004" would be shown insted. I.e. even a range of type rangeType will be treated as "custom".

Parameters:
rangeType - The range type to change the value for. E.g. DateRangeI.RANGE_TYPE_xxx.
Returns:
true means one string. i.e. shorter.

getRangeFormat

public DateFormatList getRangeFormat(int rangeType)
Returns the DateFormat used for displaying a certain range type.

Parameters:
rangeType - The range type to return the date format for. E.g. new Integer(DateRangeI.RANGE_TYPE_xxx). If no prior mapping for the range null is returned.
Returns:
The date format.

setRangeFormat

public void setRangeFormat(int rangeType,
                           DateFormatList dateFormatList)
Maps a Integer(DateRangeI.RANGE_TYPE_xxx) to a SimpeDateFormat pattern used to display a different string for when a month is selected as opposed to when a day is selected for instance.

Parameters:
rangeType - The range type to set the date format for. E.g. new Integer(DateRangeI.RANGE_TYPE_xxx).
dateFormatList - The date format. If null the default format for the locale is used. Must only contain one entry (no "|" on the pattern).

The reason this is a DateFormatList and not a DateFormat is that the pattern string must be available to parse dates that, for instance, doesn't contain a year part. This would with the normal SimpleDateFormat always be set to year 1970, a behavior that isn't desireable. Therefore a format string of a complete date/time is inserted before foramtString for reading the text in the editor. The source (model) date/time is prepended to the editor's text before parsing as well.


getNoDateSelectedText

public java.lang.String getNoDateSelectedText()
Returns the text to display if there are no date/time selected.

Returns:
The text to display if there are no date/time selected. Not null.

setNoDateSelectedText

public void setNoDateSelectedText(java.lang.String noDateText)
Sets the text to display if there are no date/time selected.

Parameters:
noDateText - The text to display if there are no date/time selected. Not null.

getDefaultTimeStyle

public java.lang.Integer getDefaultTimeStyle()
Returns the default style for time. Default if null.

Returns:
The default style for time. E.g. DateFormat.MEDIUM or null.

setDefaultTimeStyle

public void setDefaultTimeStyle(java.lang.Integer defaultTimeStyle)
Sets the default style for a time. Default if null.

Parameters:
defaultTimeStyle - The default style for a time. E.g. DateFormat.MEDIUM or null.

getDefaultDateStyle

public java.lang.Integer getDefaultDateStyle()
Returns the default style for a date. Default from Locale if null.

Returns:
The default style for a date. E.g. DateFormat.MEDIUM or null.

setDefaultDateStyle

public void setDefaultDateStyle(java.lang.Integer defaultDateStyle)
Sets the default style for a date. Default from Locale if null.

Parameters:
defaultDateStyle - The default style for a date. E.g. DateFormat.MEDIUM or null.

getCustomRangeStartPrefix

public java.lang.String getCustomRangeStartPrefix()
Returns the text to append before start date/time string shown in combo if custom date range.

Returns:
The text to append before start date/time string. Not null.

setCustomRangeStartPrefix

public void setCustomRangeStartPrefix(java.lang.String customRangeStartPrefix)
Sets the text to append before start date/time string shown in combo if custom date range.

Parameters:
customRangeStartPrefix - The text to append before start date/time string. Not null.

getCustomRangeEndPrefix

public java.lang.String getCustomRangeEndPrefix()
Returns the text to append before end date/time string shown in combo if custom date range.

Returns:
The text to append before end date/time string. Not null.

setCustomRangeEndPrefix

public void setCustomRangeEndPrefix(java.lang.String customRangeEndPrefix)
Sets the text to append before end date/time string shown in combo if custom date range.

Parameters:
customRangeEndPrefix - The text to append before end date/time string. Not null.

getMinimumPopupSize

public java.awt.Dimension getMinimumPopupSize()
Returns the minimum size of the popup. A new object.

Returns:
The minimum size of the popup. Might be null.

setMinimumPopupSize

public void setMinimumPopupSize(java.awt.Dimension minPopupSize)
Sets the minimum size of the popup. Cloned for storage.

Parameters:
minPopupSize - The minimum size of the popup. May be null.

getPreferredPopupSize

public java.awt.Dimension getPreferredPopupSize()
Returns the preferred size of the popup. A new object.

Returns:
The preferred size of the popup. Might be null.

setPreferredPopupSize

public void setPreferredPopupSize(java.awt.Dimension prefPopupSize)
Sets the preferred size of the popup. Cloned for storage.

Parameters:
prefPopupSize - The preferred size of the popup. May be null.

getMaximumPopupSize

public java.awt.Dimension getMaximumPopupSize()
Returns the maximum size of the popup. A new object.

Returns:
The maximum size of the popup. Might be null.

setMaximumPopupSize

public void setMaximumPopupSize(java.awt.Dimension maxPopupSize)
Sets the maximum size of the popup. Cloned for storage.

Parameters:
maxPopupSize - The maximum size of the popup. May be null.

setFont

public void setFont(java.awt.Font font)
Overridden to set the font of the editor (as well).

Overrides:
setFont in class javax.swing.JComponent
Parameters:
font - The font to set on the editor.

getPopupBorder

public javax.swing.border.Border getPopupBorder()
Returns the border used for the popup or null for the default (UI) one.

Returns:
The border used for the popup. Might be null.

setPopupBorder

public void setPopupBorder(javax.swing.border.Border popupBorder)
Sets the border to use for the popup. If set to null the UI border will be used.

Parameters:
popupBorder - The border to use for the popup.

getButtonsOpaque

public java.lang.Boolean getButtonsOpaque()
Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes if the buttons should be set opaqe or not.

Returns:
The UI property override or null if there is no override.

setButtonsOpaque

public void setButtonsOpaque(java.lang.Boolean buttonsOpaque)
Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes if the buttons should be set opaqe or not.

Parameters:
buttonsOpaque - The UI property override or null if there should be no override.

getBigButtonsInsets

public java.awt.Insets getBigButtonsInsets()
Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the insets/margin around the arrow for the home and drop down buttons and affects the button's size.

Returns:
The UI property override or null if there is no override.

setBigButtonsInsets

public void setBigButtonsInsets(java.awt.Insets bigButtonsInsets)
Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the insets/margin around the arrow for the home and drop down buttons and affects the button's size.

Parameters:
bigButtonsInsets - The UI property override or null if there should be no override.

getLeftRightButtonInsets

public java.awt.Insets getLeftRightButtonInsets()
Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the insets/margin around the arrow for the left and right buttons and affects the button's size.

Returns:
The UI property override or null if there is no override.

setLeftRightButtonInsets

public void setLeftRightButtonInsets(java.awt.Insets leftRightButtonInsets)
Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the insets/margin around the arrow for the left and right buttons and affects the button's size.

Parameters:
leftRightButtonInsets - The UI property override or null if there should be no override.

getArrowColor

public java.awt.Color getArrowColor()
Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the color of the arrow in the arrow buttons.

Returns:
The UI property override or null if there is no override.

setArrowColor

public void setArrowColor(java.awt.Color arrowColor)
Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the color of the arrow in the arrow buttons.

Parameters:
arrowColor - The UI property override or null if there should be no override.

getArrowShadowColor

public java.awt.Color getArrowShadowColor()
Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the color of the arrow shadow in the arrow buttons.

Returns:
The UI property override or null if there is no override.

setArrowShadowColor

public void setArrowShadowColor(java.awt.Color arrowShadowColor)
Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the color of the arrow shadow in the arrow buttons.

Parameters:
arrowShadowColor - The UI property override or null if there should be no override.

getButtonsBorder

public javax.swing.border.Border getButtonsBorder()
Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the border for the buttons in the combo box.

Returns:
The UI property override or null if there is no override.

setButtonsBorder

public void setButtonsBorder(javax.swing.border.Border buttonsBorder)
Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the border for the buttons in the combo box.

Parameters:
buttonsBorder - The UI property override or null if there should be no override.

getButtonContentAreaFilled

public java.lang.Boolean getButtonContentAreaFilled()
Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes if the content/background should be painted in the buttons in the combo box.

Returns:
The UI property override or null if there is no override.

setButtonsContentAreaFilled

public void setButtonsContentAreaFilled(java.lang.Boolean buttonsContentAreaFilled)
Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes if the content/background should be painted in the buttons in the combo box.

Parameters:
buttonsContentAreaFilled - The UI property override or null if there should be no override.

getButtonsDividerColor

public java.awt.Color getButtonsDividerColor()
Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the paint for the optional divider between the buttons in the combo box.

Returns:
The UI property override or null if there is no override.

setButtonsDividerColor

public void setButtonsDividerColor(java.awt.Color buttonsDividerColor)
Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the paint for the optional divider between the buttons in the combo box.

Parameters:
buttonsDividerColor - The UI property override or null if there should be no override.

getButtonsDividerWidth

public java.lang.Integer getButtonsDividerWidth()
Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the width for the optional divider between the buttons in the combo box.

Returns:
The UI property override or null if there is no override.

setButtonsDividerWidth

public void setButtonsDividerWidth(java.lang.Integer buttonsDividerWidth)
Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the width for the optional divider between the buttons in the combo box. Set to new Integer(0) to not use a divider.

Parameters:
buttonsDividerWidth - The UI property override or null if there should be no override.

getComboBorder

public javax.swing.border.Border getComboBorder()
Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the border for the whole combo box.

Returns:
The UI property override or null if there is no override.

setComboBorder

public void setComboBorder(javax.swing.border.Border comboBorder)
Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the border for the whole combo box.

Parameters:
comboBorder - The UI property override or null if there should be no override.

getDropDownArrowSize

public java.lang.Integer getDropDownArrowSize()
Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the size of the downwards pointing arrow in the the drop down button.

Returns:
The UI property override or null if there is no override.

setDropDownArrowSize

public void setDropDownArrowSize(java.lang.Integer dropDownArrowSize)
Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the size of the downwards pointing arrow in the the drop down button.

Parameters:
dropDownArrowSize - The UI property override or null if there should be no override.

getHomeArrowSize

public java.lang.Integer getHomeArrowSize()
Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the size of the arrows in the the home button.

Returns:
The UI property override or null if there is no override.

setHomeArrowSize

public void setHomeArrowSize(java.lang.Integer homeArrowSize)
Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the size of the arrows in the the home button.

Parameters:
homeArrowSize - The UI property override or null if there should be no override.

getHomeArrowGap

public java.lang.Integer getHomeArrowGap()
Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the gap between the arrows in the the home button.

Returns:
The UI property override or null if there is no override.

setHomeArrowGap

public void setHomeArrowGap(java.lang.Integer homeArrowGap)
Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the gap between the arrows in the the home button.

Parameters:
homeArrowGap - The UI property override or null if there should be no override.

getLeftRightArrowSize

public java.lang.Integer getLeftRightArrowSize()
Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the size of the arrows pointing right and left in the increase and decrease buttons.

Returns:
The UI property override or null if there is no override.

setLeftRightArrowSize

public void setLeftRightArrowSize(java.lang.Integer leftRightArrowSize)
Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the size of the arrows pointing right and left in the increase and decrease buttons.

Parameters:
leftRightArrowSize - The UI property override or null if there should be no override.

getEditorBorder

public javax.swing.border.Border getEditorBorder()
Returns the UI property override or null if there is no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the border used for the editor text field.

Returns:
The UI property override or null if there is no override.

setEditorBorder

public void setEditorBorder(javax.swing.border.Border editorBorder)
Sets the UI property override set to null if there should be no override and the component should determine the best property to use to best match the current Look & Feel.

This property denotes the border used for the editor text field.

Parameters:
editorBorder - The UI property override or null if there should be no override.

getEditorTextAntiAlias

public java.lang.Boolean getEditorTextAntiAlias()
Deprecated. Use getEditorTextAntiAliasHint()

Returns if the text in the editor should be anti aliased or not.

Returns:
null.

setEditorTextAntiAlias

public void setEditorTextAntiAlias(java.lang.Boolean antiAlias)
Deprecated. Use setEditorTextAntiAliasHint(int)

No effect.

Parameters:
antiAlias - Not used.

getEditorTextAntiAliasHint

public int getEditorTextAntiAliasHint()
Priperty: How the editor should be anti aliased, if at all.

Returns:
If the text in the editor should be anti aliased or not. May be null.

setEditorTextAntiAliasHint

public void setEditorTextAntiAliasHint(int aaHint)
Priperty: How the editor should be anti aliased, if at all.

Parameters:
aaHint - The hint. E.g. GfxUtil.AA_HINT_PLATFORM

getLeftRightArrowSizeUI

protected int getLeftRightArrowSizeUI()
Returns the arrow size for the left/right buttons

Returns:
The arrow size for the left/right buttons

getHomeArrowsSizeUI

protected int getHomeArrowsSizeUI()
Returns the arrow size for the home button

Returns:
The arrow size for the home button

getHomeArrowsGapUI

protected int getHomeArrowsGapUI()
Returns the arrow gap for the home button

Returns:
The arrow gap for the home button

getDropDownArrowSizeUI

protected int getDropDownArrowSizeUI()
Returns the arrow size for the drow down button

Returns:
The arrow size for the drow down button.
See Also:
GfxUtil.getUIName()

getButtonsContentAreaFilledUI

protected boolean getButtonsContentAreaFilledUI()
Returns if the button should be paint their background or not

Returns:
f the button should be paint their background or not
See Also:
GfxUtil.getUIName()

isButtonsOpaqueUI

protected boolean isButtonsOpaqueUI()
Returns if the button should be ipaque depending on the cuurent installed UI

Returns:
The if the button should be ipaque depending on the cuurent installed UI
See Also:
GfxUtil.getUIName()

getArrowColorUI

protected java.awt.Color getArrowColorUI()
Returns the preferred arrow color

Returns:
The preferred arrow color
See Also:
GfxUtil.getUIName()

getArrowShadowColorUI

protected java.awt.Color getArrowShadowColorUI()
Returns the preferred arrow color

Returns:
The preferred arrow color
See Also:
GfxUtil.getUIName()

getSmallButtonInsetsUI

protected java.awt.Insets getSmallButtonInsetsUI()
Returns the button insets for the right+left arrow buttons

See Also:
GfxUtil.getUIName()

getButtonInsetsUI

protected java.awt.Insets getButtonInsetsUI()
Returns the button insets for the right+left arrow buttons

See Also:
GfxUtil.getUIName()

getButtonDividerUI

protected javax.swing.JComponent getButtonDividerUI()
Returns the border to use for the buttons in the combo

Returns:
The border to use for the buttons in the combo or null if none.
See Also:
GfxUtil.getUIName()

getButtonBorderUI

protected javax.swing.border.Border getButtonBorderUI()
Returns the border to use for the buttons in the combo

Returns:
The border to use for the buttons in the combo
See Also:
GfxUtil.getUIName()

getComboBorderUI

protected javax.swing.border.Border getComboBorderUI()
Returns the border to use for the the combo

Returns:
The border to use for the the combo
See Also:
GfxUtil.getUIName()

getEditorBorderUI

protected javax.swing.border.Border getEditorBorderUI()
Returns the border to use for the the combo

Returns:
The border to use for the the combo
See Also:
GfxUtil.getUIName()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener

dateRangeChanged

public void dateRangeChanged(DateChangeEvent e)
Description copied from interface: DateChangeListener
Called when a date range changed.

Specified by:
dateRangeChanged in interface DateChangeListener
Parameters:
e - The event that explains what happened

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Specified by:
focusLost in interface java.awt.event.FocusListener

popupMenuCanceled

public void popupMenuCanceled(javax.swing.event.PopupMenuEvent e)
Specified by:
popupMenuCanceled in interface javax.swing.event.PopupMenuListener

popupMenuWillBecomeInvisible

public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent e)
Specified by:
popupMenuWillBecomeInvisible in interface javax.swing.event.PopupMenuListener

popupMenuWillBecomeVisible

public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent e)
Specified by:
popupMenuWillBecomeVisible in interface javax.swing.event.PopupMenuListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

addInteractionListener

public void addInteractionListener(InteractionListener l)
This call is transmitted to the DefaultDateArea.addInteractionListener(com.miginfocom.ashape.interaction.InteractionListener)


addInteractionListener

public void addInteractionListener(InteractionListener l,
                                   boolean asWeakRef)
This call is transmitted to the DefaultDateArea.addInteractionListener(com.miginfocom.ashape.interaction.InteractionListener, boolean)


removeInteractionListener

public void removeInteractionListener(InteractionListener l)
This call is transmitted to the DefaultDateArea.removeInteractionListener(com.miginfocom.ashape.interaction.InteractionListener)


addDateChangeListener

public void addDateChangeListener(DateChangeListener l)
This call is transmitted to the DefaultDateArea.addDateChangeListener(com.miginfocom.util.dates.DateChangeListener)


addDateChangeListener

public void addDateChangeListener(DateChangeListener l,
                                  boolean asWeakRef)
This call is transmitted to the DefaultDateArea.addDateChangeListener(com.miginfocom.util.dates.DateChangeListener, boolean)


removeDateChangeListener

public void removeDateChangeListener(DateChangeListener l)
This call is transmitted to the DefaultDateArea.removeDateChangeListener(com.miginfocom.util.dates.DateChangeListener)


addActivityDragResizeListener

public void addActivityDragResizeListener(ActivityDragResizeListener l)
This call is transmitted to the DefaultDateArea.addActivityDragResizeListener(com.miginfocom.calendar.datearea.ActivityDragResizeListener)


addActivityDragResizeListener

public void addActivityDragResizeListener(ActivityDragResizeListener l,
                                          boolean asWeakRef)
This call is transmitted to the DefaultDateArea.addActivityDragResizeListener(com.miginfocom.calendar.datearea.ActivityDragResizeListener, boolean)


removeActivityDragResizeListener

public void removeActivityDragResizeListener(ActivityDragResizeListener l)
This call is transmitted to the DefaultDateArea.removeActivityDragResizeListener(com.miginfocom.calendar.datearea.ActivityDragResizeListener)


addActivityMoveListener

public void addActivityMoveListener(ActivityMoveListener l)
This call is transmitted to the DefaultDateArea.addActivityMoveListener(com.miginfocom.calendar.datearea.ActivityMoveListener)


addActivityMoveListener

public void addActivityMoveListener(ActivityMoveListener l,
                                    boolean asWeakRef)
This call is transmitted to the DefaultDateArea.addActivityMoveListener(com.miginfocom.calendar.datearea.ActivityMoveListener, boolean)


removeActivityMoveListener

public void removeActivityMoveListener(ActivityMoveListener l)
This call is transmitted to the DefaultDateArea.removeActivityMoveListener(com.miginfocom.calendar.datearea.ActivityMoveListener)



Copyright © 2009 MiG InfoCom AB. All Rights Reserved.