JDatePicker v4.3

com.standbysoft.component.date.swing.plaf.basic
Class BasicDatePickerUI

java.lang.Object
  extended byjavax.swing.plaf.ComponentUI
      extended bycom.standbysoft.component.date.swing.plaf.DateUI
          extended bycom.standbysoft.component.date.swing.plaf.basic.AbstractDatePickerUI
              extended bycom.standbysoft.component.date.swing.plaf.basic.BasicDatePickerUI

public class BasicDatePickerUI
extends AbstractDatePickerUI

Implements only what is strictly necessary for a JDatePicker UI delegate. A modified combo box is used to select/edit the date.

If you want to create a custom UI delegate for JDatePicker, then the best solution is to extend this class.


Field Summary
 
Fields inherited from class com.standbysoft.component.date.swing.plaf.basic.AbstractDatePickerUI
comboBox, datePicker, monthView
 
Constructor Summary
BasicDatePickerUI()
           
 
Method Summary
protected  JComboBoxExt createComboBox()
          Creates the combo box that is used by the date picker to select a date.
protected  java.awt.LayoutManager createLayout()
          Creates a LayoutManager that manages the combo box used to select/edit the date.
protected  JMonthView createMonthView()
          Creates a JMonthView with no UI delegate.
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
           
protected  void installListeners()
          Creates and installs the listeners for the date picker.
protected  void uninstallComponents()
           
protected  void uninstallListeners()
          Uninstalls the listeners from the date field.
protected  void updateBackground()
          Updates the background color for the supporting combo box.
protected  void updateDateFormat()
           
protected  void updateDateSelectionModel()
          Updates the selection model for the components of the date picker
protected  void updateEditable()
          Updates the editable state of the date picker components.
protected  void updateEnabled()
          Updates the enabled state of the children Components based on the enabled state of the JDatePicker.
protected  void updateFont()
          Updates the font for the date picker components.
protected  void updateForeground()
          Updates the foreground color for the supporting combo box.
protected  void updateLocale()
          Updates the locale for the date picker components.
protected  void updateTimeZone()
          Updates the time zone of the date picker component.
protected  void updateToolTipText()
          Updates the tooltip text for the date picker component.
 
Methods inherited from class com.standbysoft.component.date.swing.plaf.basic.AbstractDatePickerUI
createDefaults, createPropertyChangeListener, initializeDefaults, installComponents, installDefaults, installKeyboardActions, installUI, isPopupVisible, registerDateComboBoxUI, setPopupVisible, uninstallDefaults, uninstallKeyboardActions, uninstallUI, unregisterDateComboBoxUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicDatePickerUI

public BasicDatePickerUI()
Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)

createLayout

protected java.awt.LayoutManager createLayout()
Description copied from class: AbstractDatePickerUI
Creates a LayoutManager that manages the combo box used to select/edit the date.

Specified by:
createLayout in class AbstractDatePickerUI
Returns:
a LayoutManager for the date picker.

createMonthView

protected JMonthView createMonthView()
Creates a JMonthView with no UI delegate. The UI delegate is associated with the JMonthView when the user opens the popup for the first time. This trick makes the creation time for a JDatePicker shorter and is useful especially in forms that have many (tens) of date pickers.

Specified by:
createMonthView in class AbstractDatePickerUI
Returns:
popup calendar with no UI delegate

createComboBox

protected JComboBoxExt createComboBox()
Description copied from class: AbstractDatePickerUI
Creates the combo box that is used by the date picker to select a date.

Specified by:
createComboBox in class AbstractDatePickerUI
Returns:
actual combo box.

uninstallComponents

protected void uninstallComponents()
Overrides:
uninstallComponents in class AbstractDatePickerUI

installListeners

protected void installListeners()
Description copied from class: AbstractDatePickerUI
Creates and installs the listeners for the date picker. This method is called when the UI is installed.

Overrides:
installListeners in class AbstractDatePickerUI

uninstallListeners

protected void uninstallListeners()
Description copied from class: AbstractDatePickerUI
Uninstalls the listeners from the date field. This method is called when the UI is uninstalled.

Overrides:
uninstallListeners in class AbstractDatePickerUI

updateEnabled

protected void updateEnabled()
Description copied from class: AbstractDatePickerUI
Updates the enabled state of the children Components based on the enabled state of the JDatePicker.

Specified by:
updateEnabled in class AbstractDatePickerUI

updateFont

protected void updateFont()
Description copied from class: AbstractDatePickerUI
Updates the font for the date picker components.

Specified by:
updateFont in class AbstractDatePickerUI

updateDateSelectionModel

protected void updateDateSelectionModel()
Description copied from class: AbstractDatePickerUI
Updates the selection model for the components of the date picker

Specified by:
updateDateSelectionModel in class AbstractDatePickerUI

updateLocale

protected void updateLocale()
Description copied from class: AbstractDatePickerUI
Updates the locale for the date picker components.

Specified by:
updateLocale in class AbstractDatePickerUI

updateEditable

protected void updateEditable()
Description copied from class: AbstractDatePickerUI
Updates the editable state of the date picker components.

Specified by:
updateEditable in class AbstractDatePickerUI

updateToolTipText

protected void updateToolTipText()
Description copied from class: AbstractDatePickerUI
Updates the tooltip text for the date picker component.

Specified by:
updateToolTipText in class AbstractDatePickerUI

updateForeground

protected void updateForeground()
Description copied from class: AbstractDatePickerUI
Updates the foreground color for the supporting combo box.

Specified by:
updateForeground in class AbstractDatePickerUI

updateBackground

protected void updateBackground()
Description copied from class: AbstractDatePickerUI
Updates the background color for the supporting combo box.

Specified by:
updateBackground in class AbstractDatePickerUI

updateTimeZone

protected void updateTimeZone()
Description copied from class: AbstractDatePickerUI
Updates the time zone of the date picker component.

Specified by:
updateTimeZone in class AbstractDatePickerUI

updateDateFormat

protected void updateDateFormat()
Specified by:
updateDateFormat in class AbstractDatePickerUI

JDatePicker v4.3

Visit www.jdatepicker.com for further information or send us your suggestions.

Copyright © 2003-2007 Stand By Soft Ltd. All Rights Reserved.