Java Date Picker v3.2

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.awt.event.MouseListener noneMouseListener
           
protected  java.awt.event.MouseListener todayMouseListener
           
 
Fields inherited from class com.standbysoft.component.date.swing.plaf.basic.AbstractMonthViewUI
month, monthView, nextMonthButton, noneLabel, previousMonthButton, todayLabel
 
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  javax.swing.JButton createNextMonthButton()
          Returns null to indicate the absence of the next month button.
protected  javax.swing.JLabel createNoneLabel()
          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.JLabel createTodayLabel()
          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 installListeners()
          Installs all useful listeners on the JMonthView component.
protected  void uninstallListeners()
          Uninstalls all registered listeners.
protected  void updateDateSelectionModel()
          Updates the selection model for the components of the monthView
protected  void updateDisplayToday()
          Specifies whether the monthView displays the today button or not.
protected  void updateEmptySelectionAllowed()
          Specifies whether the monthView displays the none 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 monthView
protected  void updateGridColor()
           
protected  void updateHorizontalLinesVisible()
           
protected  void updateLocale()
          Updates the locale for the JMonthView components.
protected  void updateMonthBackground()
          Updates the background color of the monthView
protected  void updateMonthModel()
           
protected  void updateRenderer()
           
protected  void updateTitleBackground()
          Updates the title background color of the monthView
protected  void updateTitleForeground()
          Updates the title foreground color of the monthView
protected  void updateTrailingForeground()
          Updates the trailing foreground color of the monthView
protected  void updateVerticalLinesVisible()
           
protected  void updateWeekNamesVisible()
          Specifies whether the monthView displays the week names or not.
protected  void updateWeekNumbersVisible()
          Specifies whether the monthView displays the week numbers or not.
 
Methods inherited from class com.standbysoft.component.date.swing.plaf.basic.AbstractMonthViewUI
createLayout, installComponents, installDefaults, installKeyboardActions, installUI, uninstallComponents, 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
Constructor Detail

BasicMonthViewUI

public BasicMonthViewUI()
Method Detail

createUI

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

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.

createTodayLabel

protected javax.swing.JLabel createTodayLabel()
Returns null to indicate the absence of the today label.

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

createNoneLabel

protected javax.swing.JLabel createNoneLabel()
Returns null to indicate the absence of the none label.

Specified by:
createNoneLabel 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.

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.

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.

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

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()
Specified by:
updateRenderer in class AbstractMonthViewUI

updateMonthBackground

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

Specified by:
updateMonthBackground in class AbstractMonthViewUI

updateForeground

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

Specified by:
updateForeground in class AbstractMonthViewUI

updateTitleBackground

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

Specified by:
updateTitleBackground in class AbstractMonthViewUI

updateTitleForeground

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

Specified by:
updateTitleForeground in class AbstractMonthViewUI

updateTrailingForeground

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

Specified by:
updateTrailingForeground in class AbstractMonthViewUI

updateGridColor

protected void updateGridColor()
Specified by:
updateGridColor in class AbstractMonthViewUI

updateWeekNumbersVisible

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

Specified by:
updateWeekNumbersVisible in class AbstractMonthViewUI

updateWeekNamesVisible

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

Specified by:
updateWeekNamesVisible in class AbstractMonthViewUI

updateHorizontalLinesVisible

protected void updateHorizontalLinesVisible()
Specified by:
updateHorizontalLinesVisible in class AbstractMonthViewUI

updateVerticalLinesVisible

protected void updateVerticalLinesVisible()
Specified by:
updateVerticalLinesVisible in class AbstractMonthViewUI

updateDisplayToday

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

Specified by:
updateDisplayToday in class AbstractMonthViewUI

updateEmptySelectionAllowed

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

Specified by:
updateEmptySelectionAllowed in class AbstractMonthViewUI

updateDateSelectionModel

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

Specified by:
updateDateSelectionModel in class AbstractMonthViewUI

updateMonthModel

protected void updateMonthModel()
Specified by:
updateMonthModel in class AbstractMonthViewUI

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.