JDatePicker v4.3

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

java.lang.Object
  extended byjavax.swing.plaf.ComponentUI
      extended bycom.standbysoft.component.date.swing.plaf.DateUI
          extended bycom.standbysoft.component.date.swing.plaf.basic.AbstractMonthViewUI
              extended bycom.standbysoft.component.date.swing.plaf.basic.BasicMonthViewUI
Direct Known Subclasses:
DefaultMonthViewUI

public class BasicMonthViewUI
extends AbstractMonthViewUI

Implements only what is strictly necessary for a JMonthView UI delegate. It does not contain the month scrolling buttons, the today button and the none button.

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

See Also:
DefaultMonthViewUI

Nested Class Summary
 
Nested classes inherited from class com.standbysoft.component.date.swing.plaf.basic.AbstractMonthViewUI
AbstractMonthViewUI.CalendarLayout
 
Field Summary
protected  java.util.List months
          List of months that are added to the JMonthView component.
protected  java.awt.event.MouseListener noneMouseListener
           
protected  java.awt.event.MouseListener todayMouseListener
           
 
Fields inherited from class com.standbysoft.component.date.swing.plaf.basic.AbstractMonthViewUI
monthView, nextMonthButton, nextYearButton, noneComponent, previousMonthButton, previousYearButton, todayComponent
 
Constructor Summary
BasicMonthViewUI()
           
 
Method Summary
protected  DateSelectionListener createDateSelectionListener()
          Creates a listener that controls what months get displayed when the date selection changes.
protected  JMonth createMonth()
          A JMonthView component is (for now) a one month calendar.
protected  MonthModelListener createMonthModelListener()
          Creates a listener that synchronizes the state of the calendar month model with the calendar components.
protected  javax.swing.JButton createNextMonthButton()
          Returns null to indicate the absence of the next month button.
protected  javax.swing.JButton createNextYearButton()
          Returns null to indicate the absence of the next year button.
protected  javax.swing.JComponent createNoneComponent()
          Returns null to indicate the absence of the none label.
protected  java.awt.event.MouseListener createNoneMouseListener()
          Creates a listener that defines what happens when the user clicks on the none button.
protected  javax.swing.JButton createPreviousMonthButton()
          Returns null to indicate the absence of the previous month button.
protected  javax.swing.JButton createPreviousYearButton()
          Returns null to indicate the absence of the previous year button.
protected  javax.swing.JComponent createTodayComponent()
          Returns null to indicate the absence of the today label.
protected  java.awt.event.MouseListener createTodayMouseListener()
          Creates a listener that defines what happens when the user clicks on the today button.
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
           
 java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
           
protected  void installComponents()
          Installs all the components needed by JMonthView to implement its behavior.
protected  void installListeners()
          Installs all useful listeners on the JMonthView component.
protected  void uninstallComponents()
           
protected  void uninstallListeners()
          Uninstalls all registered listeners.
protected  void updateDateSelectionModel()
          Updates the selection model for the components of the calendar.
protected  void updateDatesOrientation()
          Updates how the dates of the month are displayed.
protected  void updateDisplayToday()
          Specifies whether the calendar displays the today button or not.
protected  void updateEnabled()
          Updates the enabled state of the children components based on the enabled state of the JMonthView.
protected  void updateFont()
          Updates the font for the JMonthView components.
protected  void updateForeground()
          Updates the foreground color of the calendar.
protected  void updateGridColor()
          Updates the grid color of the calendar.
protected  void updateHorizontalLinesVisible()
          Specifies whether the calendar horizontal grid lines are visible or not.
protected  void updateLocale()
          Updates the locale for the JMonthView components.
protected  void updateMonthBackground()
          Updates the background color of the calendar.
protected  void updateMonthModel()
          Keeps the calendar months ordered.
protected  void updateMonthUI()
          Updates the UI delegate used by all the JMonth objects from the JMonthView.
protected  void updateNoneButtonVisible()
          Specifies whether the calendar displays the none button or not.
protected  void updateRenderer()
          Updates the date renderer for the JMonthView components.
protected  void updateRowsColumns()
          Updates the row/column arrangement of the months of the calendar.
protected  void updateTimeZone()
          Updates the time zone for the months of the calendar.
protected  void updateTitleBackground()
          Updates the title background color of the calendar.
protected  void updateTitleForeground()
          Updates the title foreground color of the calendar.
protected  void updateToggleDateSelectionEnabled()
          Updates the toggle date selection flag for the components of the calendar.
protected  void updateTrailingForeground()
          Updates the trailing foreground color of the calendar.
protected  void updateTrailingNextEnabled()
          Updates the state of the trailing dates for the last month
protected  void updateTrailingPreviousEnabled()
          Updates the state of the trailing dates for the first month
protected  void updateVerticalLinesVisible()
          Specifies whether the calendar vertical grid lines are visible or not.
protected  void updateWeekLabelsHighlight()
          Updates the client property that enables the highlighting of the selected days of week or weeks.
protected  void updateWeekModel()
          Called whenever the week model for a JMonthView changes.
protected  void updateWeekNamesVisible()
          Specifies whether the calendar displays the week names or not.
protected  void updateWeekNumbersVisible()
          Specifies whether the calendar displays the week numbers or not.
 
Methods inherited from class com.standbysoft.component.date.swing.plaf.basic.AbstractMonthViewUI
createDefaults, createLayout, initializeDefaults, installDefaults, installKeyboardActions, installUI, uninstallKeyboardActions, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, paint, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

todayMouseListener

protected java.awt.event.MouseListener todayMouseListener

noneMouseListener

protected java.awt.event.MouseListener noneMouseListener

months

protected java.util.List months
List of months that are added to the JMonthView component.

Constructor Detail

BasicMonthViewUI

public BasicMonthViewUI()
Method Detail

createUI

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

installComponents

protected void installComponents()
Description copied from class: AbstractMonthViewUI
Installs all the components needed by JMonthView to implement its behavior. This implementation uses a title and an actual month for this.

Overrides:
installComponents in class AbstractMonthViewUI
See Also:
AbstractMonthViewUI.createLayout(), AbstractMonthViewUI.createPreviousMonthButton(), AbstractMonthViewUI.createNextMonthButton(), AbstractMonthViewUI.createTodayComponent(), AbstractMonthViewUI.createNoneComponent(), AbstractMonthViewUI.createMonth()

createPreviousYearButton

protected javax.swing.JButton createPreviousYearButton()
Returns null to indicate the absence of the previous year button.

Specified by:
createPreviousYearButton in class AbstractMonthViewUI
Returns:
null to indicate the absence of the previous year button.

createNextYearButton

protected javax.swing.JButton createNextYearButton()
Returns null to indicate the absence of the next year button.

Specified by:
createNextYearButton in class AbstractMonthViewUI
Returns:
null to indicate the absence of the next year button.

createPreviousMonthButton

protected javax.swing.JButton createPreviousMonthButton()
Returns null to indicate the absence of the previous month button.

Specified by:
createPreviousMonthButton in class AbstractMonthViewUI
Returns:
null to indicate the absence of the previous month button.

createNextMonthButton

protected javax.swing.JButton createNextMonthButton()
Returns null to indicate the absence of the next month button.

Specified by:
createNextMonthButton in class AbstractMonthViewUI
Returns:
null to indicate the absence of the next month button.

createTodayComponent

protected javax.swing.JComponent createTodayComponent()
Returns null to indicate the absence of the today label.

Specified by:
createTodayComponent in class AbstractMonthViewUI
Returns:
null to indicate the absence of the today label.

createNoneComponent

protected javax.swing.JComponent createNoneComponent()
Returns null to indicate the absence of the none label.

Specified by:
createNoneComponent in class AbstractMonthViewUI
Returns:
null to indicate the absence of the none label.

createMonth

protected JMonth createMonth()
A JMonthView component is (for now) a one month calendar. This method creates the component that represents the month.

Specified by:
createMonth in class AbstractMonthViewUI
Returns:
the component that represents the month.

updateMonthUI

protected void updateMonthUI()
Description copied from class: AbstractMonthViewUI
Updates the UI delegate used by all the JMonth objects from the JMonthView.

Specified by:
updateMonthUI in class AbstractMonthViewUI

installListeners

protected void installListeners()
Installs all useful listeners on the JMonthView component.

Overrides:
installListeners in class AbstractMonthViewUI

createDateSelectionListener

protected DateSelectionListener createDateSelectionListener()
Creates a listener that controls what months get displayed when the date selection changes. You can override this method if you want to provide your own handler.

Returns:
a listener that controls what months get displayed when the date selection changes.

createMonthModelListener

protected MonthModelListener createMonthModelListener()
Creates a listener that synchronizes the state of the calendar month model with the calendar components.

Returns:
a listener that synchronizes the state of the calendar month model with the calendar components.

createTodayMouseListener

protected java.awt.event.MouseListener createTodayMouseListener()
Creates a listener that defines what happens when the user clicks on the today button. You can override this method if you want to provide your own handler.

Returns:
a listener that defines what happens when the user clicks on the today button.

createNoneMouseListener

protected java.awt.event.MouseListener createNoneMouseListener()
Creates a listener that defines what happens when the user clicks on the none button. You can override this method if you want to provide your own handler.

Returns:
a listener that defines what happens when the user clicks on the none button.

uninstallComponents

protected void uninstallComponents()
Overrides:
uninstallComponents in class AbstractMonthViewUI

uninstallListeners

protected void uninstallListeners()
Uninstalls all registered listeners.

Overrides:
uninstallListeners in class AbstractMonthViewUI

getPreferredSize

public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)

updateFont

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

Specified by:
updateFont in class AbstractMonthViewUI

updateLocale

protected void updateLocale()
Description copied from class: AbstractMonthViewUI
Updates the locale for the JMonthView components.

Specified by:
updateLocale in class AbstractMonthViewUI

updateTimeZone

protected void updateTimeZone()
Description copied from class: AbstractMonthViewUI
Updates the time zone for the months of the calendar.

Specified by:
updateTimeZone in class AbstractMonthViewUI

updateEnabled

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

Specified by:
updateEnabled in class AbstractMonthViewUI

updateRenderer

protected void updateRenderer()
Description copied from class: AbstractMonthViewUI
Updates the date renderer for the JMonthView components.

Specified by:
updateRenderer in class AbstractMonthViewUI

updateMonthBackground

protected void updateMonthBackground()
Description copied from class: AbstractMonthViewUI
Updates the background color of the calendar.

Specified by:
updateMonthBackground in class AbstractMonthViewUI

updateForeground

protected void updateForeground()
Description copied from class: AbstractMonthViewUI
Updates the foreground color of the calendar.

Specified by:
updateForeground in class AbstractMonthViewUI

updateTitleBackground

protected void updateTitleBackground()
Description copied from class: AbstractMonthViewUI
Updates the title background color of the calendar.

Specified by:
updateTitleBackground in class AbstractMonthViewUI

updateTitleForeground

protected void updateTitleForeground()
Description copied from class: AbstractMonthViewUI
Updates the title foreground color of the calendar.

Specified by:
updateTitleForeground in class AbstractMonthViewUI

updateTrailingForeground

protected void updateTrailingForeground()
Description copied from class: AbstractMonthViewUI
Updates the trailing foreground color of the calendar.

Specified by:
updateTrailingForeground in class AbstractMonthViewUI

updateGridColor

protected void updateGridColor()
Description copied from class: AbstractMonthViewUI
Updates the grid color of the calendar.

Specified by:
updateGridColor in class AbstractMonthViewUI

updateWeekNumbersVisible

protected void updateWeekNumbersVisible()
Description copied from class: AbstractMonthViewUI
Specifies whether the calendar displays the week numbers or not.

Specified by:
updateWeekNumbersVisible in class AbstractMonthViewUI

updateWeekNamesVisible

protected void updateWeekNamesVisible()
Description copied from class: AbstractMonthViewUI
Specifies whether the calendar displays the week names or not.

Specified by:
updateWeekNamesVisible in class AbstractMonthViewUI

updateHorizontalLinesVisible

protected void updateHorizontalLinesVisible()
Description copied from class: AbstractMonthViewUI
Specifies whether the calendar horizontal grid lines are visible or not.

Specified by:
updateHorizontalLinesVisible in class AbstractMonthViewUI

updateVerticalLinesVisible

protected void updateVerticalLinesVisible()
Description copied from class: AbstractMonthViewUI
Specifies whether the calendar vertical grid lines are visible or not.

Specified by:
updateVerticalLinesVisible in class AbstractMonthViewUI

updateDatesOrientation

protected void updateDatesOrientation()
Description copied from class: AbstractMonthViewUI
Updates how the dates of the month are displayed.

Specified by:
updateDatesOrientation in class AbstractMonthViewUI

updateDisplayToday

protected void updateDisplayToday()
Description copied from class: AbstractMonthViewUI
Specifies whether the calendar displays the today button or not.

Specified by:
updateDisplayToday in class AbstractMonthViewUI

updateNoneButtonVisible

protected void updateNoneButtonVisible()
Description copied from class: AbstractMonthViewUI
Specifies whether the calendar displays the none button or not.

Specified by:
updateNoneButtonVisible in class AbstractMonthViewUI

updateDateSelectionModel

protected void updateDateSelectionModel()
Description copied from class: AbstractMonthViewUI
Updates the selection model for the components of the calendar.

Specified by:
updateDateSelectionModel in class AbstractMonthViewUI

updateToggleDateSelectionEnabled

protected void updateToggleDateSelectionEnabled()
Description copied from class: AbstractMonthViewUI
Updates the toggle date selection flag for the components of the calendar.

Specified by:
updateToggleDateSelectionEnabled in class AbstractMonthViewUI

updateTrailingNextEnabled

protected void updateTrailingNextEnabled()
Description copied from class: AbstractMonthViewUI
Updates the state of the trailing dates for the last month

Specified by:
updateTrailingNextEnabled in class AbstractMonthViewUI

updateTrailingPreviousEnabled

protected void updateTrailingPreviousEnabled()
Description copied from class: AbstractMonthViewUI
Updates the state of the trailing dates for the first month

Specified by:
updateTrailingPreviousEnabled in class AbstractMonthViewUI

updateWeekLabelsHighlight

protected void updateWeekLabelsHighlight()
Description copied from class: AbstractMonthViewUI
Updates the client property that enables the highlighting of the selected days of week or weeks.

Specified by:
updateWeekLabelsHighlight in class AbstractMonthViewUI

updateMonthModel

protected void updateMonthModel()
Keeps the calendar months ordered. The calendar contains one or more months and it is important for each month component to display the right month of the year.

Specified by:
updateMonthModel in class AbstractMonthViewUI

updateWeekModel

protected void updateWeekModel()
Called whenever the week model for a JMonthView changes. The new week model is shared by all the JMonth components. Unlike the MonthModel, the WeekModel can be shared by all the JMonth components.

Specified by:
updateWeekModel in class AbstractMonthViewUI

updateRowsColumns

protected void updateRowsColumns()
Description copied from class: AbstractMonthViewUI
Updates the row/column arrangement of the months of the calendar.

Specified by:
updateRowsColumns in class AbstractMonthViewUI

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.