Java Date Picker v3.2

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

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
Direct Known Subclasses:
BasicMonthUI

public abstract class AbstractMonthUI
extends DateUI

Defines the general structure that is used by subclasses to implement the actual UI delegate for JMonth.

Such a delegate has a body section where the current month is displayed and an optional title to display month related information.

See Also:
BasicMonthUI

Field Summary
protected  javax.swing.JComponent body
          Component that represents the actual monthView month.
protected  JMonth month
          JMonth component for which this UI delegate is installed.
protected  javax.swing.JComponent title
          Component that groups the title month and title year components.
 
Constructor Summary
AbstractMonthUI()
           
 
Method Summary
protected abstract  javax.swing.JComponent createBody()
          Creates the component that represents the actual calendar month.
protected  java.awt.LayoutManager createLayout()
          Creates a LayoutManager that manages the title, and month children of JMonth.
protected abstract  javax.swing.JComponent createTitle()
          Creates the title component that displays information about the current month specified in JMonth.
protected  void installComponents()
          Installs all the components needed by JMonth to implement its behavior.
protected  void installDefaults()
          Installs the default font and colors on the JMonth component.
protected  void installKeyboardActions()
          Register all keyboard actions on the JMonth.
protected  void installListeners()
          Attaches listeners to the JMonth component.
 void installUI(javax.swing.JComponent c)
          Registers all the UI stuff needed to make the specified component work.
protected  void uninstallComponents()
          Uninstalls all registered components.
protected  void uninstallKeyboardActions()
          Uninstalls the keyboard actions associated with the JMonth component.
protected  void uninstallListeners()
          Detaches listeners from the JMonth component.
 void uninstallUI(javax.swing.JComponent c)
          Unregisters all the UI stuff needed to make the specified component work.
protected abstract  void updateEnabled()
          Updates the enabled state of the children components based on the enabled state of the JMonth.
protected abstract  void updateFont()
          Updates the font for the JMonth components.
protected abstract  void updateForeground()
          Updates the foreground color for the dates.
protected abstract  void updateGridColor()
          Updates the month grid.
protected abstract  void updateHorizontalLinesVisible()
          Updates the visibility of the horizontal lines.
protected abstract  void updateLocale()
          Updates the locale for the JMonth components.
protected abstract  void updateMonthBackground()
          Updates the background color for the month.
protected abstract  void updateTitle()
          Updates the title information that identifies the current month.
protected abstract  void updateTitleBackground()
          Updates the color for the title background.
protected abstract  void updateTitleForeground()
          Updates the color for the title foreground.
protected abstract  void updateTrailingForeground()
          Updates the foreground color for the trailing dates.
protected abstract  void updateVerticalLinesVisible()
          Updates the visibility of the vertical lines.
protected abstract  void updateWeekNamesVisible()
          Updates the visibility of the week days names.
protected abstract  void updateWeekNumbersVisible()
          Updates the visibility of the week numbers.
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, 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

month

protected JMonth month
JMonth component for which this UI delegate is installed.


title

protected javax.swing.JComponent title
Component that groups the title month and title year components.

See Also:
createTitle()

body

protected javax.swing.JComponent body
Component that represents the actual monthView month.

See Also:
createBody()
Constructor Detail

AbstractMonthUI

public AbstractMonthUI()
Method Detail

installUI

public void installUI(javax.swing.JComponent c)
Registers all the UI stuff needed to make the specified component work. In other words, this is the place where the component's look and feel is created.

See Also:
installDefaults(), installComponents(), installListeners(), installKeyboardActions()

installDefaults

protected void installDefaults()
Installs the default font and colors on the JMonth component.


installComponents

protected void installComponents()
Installs all the components needed by JMonth to implement its behavior. This implementation uses a title and an actual month for this.

See Also:
createLayout(), createTitle(), createBody()

createLayout

protected java.awt.LayoutManager createLayout()
Creates a LayoutManager that manages the title, and month children of JMonth. These two children must be added with a constraint that identifies their role: "Title" and "Month". 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:
createBody(), createTitle()

createTitle

protected abstract javax.swing.JComponent createTitle()

Creates the title component that displays information about the current month specified in JMonth. This information should refer to the current month and year.

You can override it to create whatever title you find fit. If null is returned, then this component is ignored and it is not added to JMonth.

Returns:
title component with JMonth status information or null to indicate a missing title.
See Also:
installComponents()

createBody

protected abstract javax.swing.JComponent createBody()

Creates the component that represents the actual calendar month.

Returns:
actual calendar month.

installListeners

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


installKeyboardActions

protected void installKeyboardActions()
Register all keyboard actions on the JMonth.


uninstallUI

public void uninstallUI(javax.swing.JComponent c)
Unregisters all the UI stuff needed to make the specified component work. In other words, this is the place where the component's look and feel is removed.

See Also:
uninstallKeyboardActions(), uninstallListeners(), uninstallComponents()

uninstallComponents

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

See Also:
uninstallUI(JComponent)

uninstallListeners

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


uninstallKeyboardActions

protected void uninstallKeyboardActions()
Uninstalls the keyboard actions associated with the JMonth component.


updateFont

protected abstract void updateFont()
Updates the font for the JMonth components.


updateLocale

protected abstract void updateLocale()
Updates the locale for the JMonth components.


updateEnabled

protected abstract void updateEnabled()
Updates the enabled state of the children components based on the enabled state of the JMonth.


updateGridColor

protected abstract void updateGridColor()
Updates the month grid.


updateHorizontalLinesVisible

protected abstract void updateHorizontalLinesVisible()
Updates the visibility of the horizontal lines.


updateVerticalLinesVisible

protected abstract void updateVerticalLinesVisible()
Updates the visibility of the vertical lines.


updateWeekNumbersVisible

protected abstract void updateWeekNumbersVisible()
Updates the visibility of the week numbers.


updateWeekNamesVisible

protected abstract void updateWeekNamesVisible()
Updates the visibility of the week days names.


updateTitle

protected abstract void updateTitle()
Updates the title information that identifies the current month. This is used when the current month is changed or the names of the months change.


updateTitleForeground

protected abstract void updateTitleForeground()
Updates the color for the title foreground.


updateTitleBackground

protected abstract void updateTitleBackground()
Updates the color for the title background.


updateForeground

protected abstract void updateForeground()
Updates the foreground color for the dates.


updateMonthBackground

protected abstract void updateMonthBackground()
Updates the background color for the month.


updateTrailingForeground

protected abstract void updateTrailingForeground()
Updates the foreground color for the trailing dates.


Java Date Picker v3.2

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

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