JDatePicker v4.3

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

java.lang.Object
  extended byjavax.swing.plaf.ComponentUI
      extended bycom.standbysoft.component.date.swing.plaf.DateUI
          extended bycom.standbysoft.component.date.swing.plaf.basic.AbstractMonthUI
              extended bycom.standbysoft.component.date.swing.plaf.basic.BasicMonthUI
Direct Known Subclasses:
DefaultMonthUI

public class BasicMonthUI
extends AbstractMonthUI

Implements only what is strictly necessary for a JMonth UI delegate. Although it creates the body component that shows the calendar month, its title does not display any information about it.

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

See Also:
DefaultMonthUI

Field Summary
protected  javax.swing.JComponent titleMonth
          Title component that is used to display/select the month.
protected  javax.swing.JComponent titleYear
          Title component that is used to display/select the year.
 
Fields inherited from class com.standbysoft.component.date.swing.plaf.basic.AbstractMonthUI
body, month, title
 
Constructor Summary
BasicMonthUI()
           
 
Method Summary
protected  javax.swing.JComponent createBody()
          Creates the component that displays the actual date of the month.
protected  javax.swing.JComponent createTitle()
          Creates a panel with two components (month and year) to represent the current month.
protected  java.awt.LayoutManager createTitleLayout()
          Creates a LayoutManager that manages the title, children of JMonth.
protected  javax.swing.JComponent createTitleMonth()
          Returns null because the title month section is not mandatory.
protected  javax.swing.JComponent createTitleYear()
          Returns null because the title year section is not mandatory.
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
          Creates a new instance of this class.
protected  void installListeners()
          Attaches listeners to the JMonth component.
protected  void uninstallComponents()
          Uninstalls all registered components.
protected  void uninstallListeners()
          Detaches listeners from the JMonth component.
protected  void updateDatesOrientation()
          Updates the settings when the orientation of the dates changes.
protected  void updateEnabled()
          Updates the enabled state of the children components based on the enabled state of the JMonth.
protected  void updateFont()
          Updates the font for the JMonth components.
protected  void updateForeground()
          Updates the foreground color for the dates.
protected  void updateGridColor()
          Updates the month grid.
protected  void updateHorizontalLinesVisible()
          Updates the visibility of the horizontal lines.
protected  void updateLocale()
          Updates the locale for the month components.
protected  void updateMonthBackground()
          Updates the background color for the month.
protected  void updateMonthModel()
          Updates the settings when the month model changes.
protected  void updateTimeZone()
          Updates the settings when the time zone changes.
protected  void updateTitle()
          Does nothing because this implementation does not have a title.
protected  void updateTitleBackground()
          Updates the color for the title background.
protected  void updateTitleForeground()
          Updates the color for the title foreground.
protected  void updateTrailingForeground()
          Updates the foreground color for the trailing dates.
protected  void updateVerticalLinesVisible()
          Updates the visibility of the vertical lines.
protected  void updateWeekModel()
          Updates the settings when the week model changes.
protected  void updateWeekNamesVisible()
          Updates the visibility of the week days names.
protected  void updateWeekNumbersVisible()
          Specifies whether the month displays the week numbers or not.
 
Methods inherited from class com.standbysoft.component.date.swing.plaf.basic.AbstractMonthUI
createDefaults, createLayout, initializeDefaults, installComponents, installDefaults, installKeyboardActions, installUI, uninstallKeyboardActions, uninstallUI
 
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
 

Field Detail

titleMonth

protected javax.swing.JComponent titleMonth
Title component that is used to display/select the month.

See Also:
createTitleMonth()

titleYear

protected javax.swing.JComponent titleYear
Title component that is used to display/select the year.

See Also:
createTitleYear()
Constructor Detail

BasicMonthUI

public BasicMonthUI()
Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
Creates a new instance of this class.

Returns:
a new instance of this class.

createTitle

protected javax.swing.JComponent createTitle()
Creates a panel with two components (month and year) to represent the current month. The components are arranged using a certain layout.

Specified by:
createTitle in class AbstractMonthUI
Returns:
title panel.
See Also:
createTitleLayout(), createTitleMonth(), createTitleYear()

createTitleLayout

protected java.awt.LayoutManager createTitleLayout()
Creates a LayoutManager that manages the title, children of JMonth. These children must be added with a constraint that identifies their role: "TitleMonth", "TitleYear", "TitleLeft" and "TitleRight". The default layout manager can handle the absence of any of these children.

Returns:
a LayoutManager for the title and actual month components.
See Also:
createTitle()

createTitleYear

protected javax.swing.JComponent createTitleYear()
Returns null because the title year section is not mandatory.

Returns:
null because the title year section is not mandatory.
See Also:
createTitle()

createTitleMonth

protected javax.swing.JComponent createTitleMonth()
Returns null because the title month section is not mandatory.

Returns:
null because the title month section is not mandatory.
See Also:
createTitle()

createBody

protected javax.swing.JComponent createBody()
Creates the component that displays the actual date of the month.

Specified by:
createBody in class AbstractMonthUI
Returns:
title component with JMonth status information.

installListeners

protected void installListeners()
Attaches listeners to the JMonth component.

Overrides:
installListeners in class AbstractMonthUI

uninstallComponents

protected void uninstallComponents()
Uninstalls all registered components. You should override this method if you extend this class and provide your own components.

Overrides:
uninstallComponents in class AbstractMonthUI
See Also:
AbstractMonthUI.uninstallUI(JComponent)

uninstallListeners

protected void uninstallListeners()
Detaches listeners from the JMonth component.

Overrides:
uninstallListeners in class AbstractMonthUI

updateHorizontalLinesVisible

protected void updateHorizontalLinesVisible()
Description copied from class: AbstractMonthUI
Updates the visibility of the horizontal lines.

Specified by:
updateHorizontalLinesVisible in class AbstractMonthUI

updateVerticalLinesVisible

protected void updateVerticalLinesVisible()
Description copied from class: AbstractMonthUI
Updates the visibility of the vertical lines.

Specified by:
updateVerticalLinesVisible in class AbstractMonthUI

updateGridColor

protected void updateGridColor()
Description copied from class: AbstractMonthUI
Updates the month grid.

Specified by:
updateGridColor in class AbstractMonthUI

updateWeekNumbersVisible

protected void updateWeekNumbersVisible()
Specifies whether the month displays the week numbers or not.

Specified by:
updateWeekNumbersVisible in class AbstractMonthUI

updateWeekNamesVisible

protected void updateWeekNamesVisible()
Description copied from class: AbstractMonthUI
Updates the visibility of the week days names.

Specified by:
updateWeekNamesVisible in class AbstractMonthUI

updateTitle

protected void updateTitle()
Does nothing because this implementation does not have a title.

Specified by:
updateTitle in class AbstractMonthUI

updateTitleForeground

protected void updateTitleForeground()
Description copied from class: AbstractMonthUI
Updates the color for the title foreground.

Specified by:
updateTitleForeground in class AbstractMonthUI

updateTitleBackground

protected void updateTitleBackground()
Description copied from class: AbstractMonthUI
Updates the color for the title background.

Specified by:
updateTitleBackground in class AbstractMonthUI

updateLocale

protected void updateLocale()
Updates the locale for the month components.

Specified by:
updateLocale in class AbstractMonthUI

updateFont

protected void updateFont()
Description copied from class: AbstractMonthUI
Updates the font for the JMonth components.

Specified by:
updateFont in class AbstractMonthUI

updateMonthModel

protected void updateMonthModel()
Description copied from class: AbstractMonthUI
Updates the settings when the month model changes.

Specified by:
updateMonthModel in class AbstractMonthUI

updateWeekModel

protected void updateWeekModel()
Description copied from class: AbstractMonthUI
Updates the settings when the week model changes.

Specified by:
updateWeekModel in class AbstractMonthUI

updateTimeZone

protected void updateTimeZone()
Description copied from class: AbstractMonthUI
Updates the settings when the time zone changes.

Specified by:
updateTimeZone in class AbstractMonthUI

updateMonthBackground

protected void updateMonthBackground()
Description copied from class: AbstractMonthUI
Updates the background color for the month.

Specified by:
updateMonthBackground in class AbstractMonthUI

updateTrailingForeground

protected void updateTrailingForeground()
Description copied from class: AbstractMonthUI
Updates the foreground color for the trailing dates.

Specified by:
updateTrailingForeground in class AbstractMonthUI

updateForeground

protected void updateForeground()
Description copied from class: AbstractMonthUI
Updates the foreground color for the dates.

Specified by:
updateForeground in class AbstractMonthUI

updateEnabled

protected void updateEnabled()
Description copied from class: AbstractMonthUI
Updates the enabled state of the children components based on the enabled state of the JMonth.

Specified by:
updateEnabled in class AbstractMonthUI

updateDatesOrientation

protected void updateDatesOrientation()
Description copied from class: AbstractMonthUI
Updates the settings when the orientation of the dates changes.

Specified by:
updateDatesOrientation in class AbstractMonthUI

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.