|
JDatePicker v4.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
com.standbysoft.component.date.swing.plaf.DateUI
com.standbysoft.component.date.swing.plaf.basic.AbstractMonthViewUI
Defines the general structure that is used by subclasses to implement the
actual UI delegate for JMonthView.
Such a delegate uses a month, a
today button, a
none button, two month scrolling buttons
(next,
previous)
and two year scrolling buttons (next,
previous). Of all these components,
only the month is required, the other are optional.
This UI delegate can be configured using two client properties:
JMonthView.monthUI specifies what UI delegate will be used by the JMonth components of the JMonthView. This UI delegate builds the JMonthView from several JMonth components and this property is useful to reach those hidden JMonth components.
To change the UI delegate for the JMonth components just do the following:
JMonthView monthView = new JMonthView();
monthView.putClientProperty("JMonthView.monthUI", MyMonthUI.class.getName());
JMonth.isWeekLabelsHighlighted specifies whether selected weeks or week days will be highlighted. By default, this property is not set.
JMonthView monthView = new JMonthView();
monthView.putClientProperty("JMonth.isWeekLabelsHighlighted", Boolean.TRUE);
BasicMonthUI| Nested Class Summary | |
static class |
AbstractMonthViewUI.CalendarLayout
This layout manager is used to arrange components of a JMonthView. |
| Field Summary | |
protected JMonthView |
monthView
JMonthView component for which this UI delegate is installed. |
protected javax.swing.JButton |
nextMonthButton
Button that scroll to the next month. |
protected javax.swing.JButton |
nextYearButton
Button that scrolls to the next year. |
protected javax.swing.JComponent |
noneComponent
Component that controls the selection of no date. |
protected javax.swing.JButton |
previousMonthButton
Button that scroll to the previous month. |
protected javax.swing.JButton |
previousYearButton
Button that scrolls to the previous year. |
protected javax.swing.JComponent |
todayComponent
Component that displays the today date. |
| Constructor Summary | |
AbstractMonthViewUI()
|
|
| Method Summary | |
protected java.lang.Object[] |
createDefaults()
Creates a list of default values for some of the properties of JMonthView. |
protected java.awt.LayoutManager |
createLayout()
Creates a LayoutManager that manages the month and
year scrolling buttons, the actual months of the
monthView, the today and none labels. |
protected abstract JMonth |
createMonth()
Creates the component that represents the calendar month. |
protected abstract javax.swing.JButton |
createNextMonthButton()
Creates the button that scrolls the month in view to the next one. |
protected abstract javax.swing.JButton |
createNextYearButton()
Creates the button that scrolls the month in view to the next year. |
protected abstract javax.swing.JComponent |
createNoneComponent()
Creates the component that is used to reset all selected dates. |
protected abstract javax.swing.JButton |
createPreviousMonthButton()
Creates the button that scrolls the month in view to the previous one. |
protected abstract javax.swing.JButton |
createPreviousYearButton()
Creates the button that scrolls the month in view to the previous year. |
protected abstract javax.swing.JComponent |
createTodayComponent()
Creates the component that represents the today date. |
protected void |
initializeDefaults()
Registers the default values created for some of the properties of JMonthView with the UIManager. |
protected void |
installComponents()
Installs all the components needed by JMonthView to implement its
behavior. |
protected void |
installDefaults()
Installs the default font and colors on the JMonthView component. |
protected void |
installKeyboardActions()
Installs the keyboard actions available for the JMonthView. |
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()
|
protected void |
uninstallKeyboardActions()
|
protected void |
uninstallListeners()
Uninstalls all registered listeners. |
void |
uninstallUI(javax.swing.JComponent c)
|
protected abstract void |
updateDateSelectionModel()
Updates the selection model for the components of the calendar. |
protected abstract void |
updateDatesOrientation()
Updates how the dates of the month are displayed. |
protected abstract void |
updateDisplayToday()
Specifies whether the calendar displays the today button or not. |
protected abstract void |
updateEnabled()
Updates the enabled state of the children components based on the enabled state of the JMonthView. |
protected abstract void |
updateFont()
Updates the font for the JMonthView components. |
protected abstract void |
updateForeground()
Updates the foreground color of the calendar. |
protected abstract void |
updateGridColor()
Updates the grid color of the calendar. |
protected abstract void |
updateHorizontalLinesVisible()
Specifies whether the calendar horizontal grid lines are visible or not. |
protected abstract void |
updateLocale()
Updates the locale for the JMonthView components. |
protected abstract void |
updateMonthBackground()
Updates the background color of the calendar. |
protected abstract void |
updateMonthModel()
Updates the month model for the components of the calendar. |
protected abstract void |
updateMonthUI()
Updates the UI delegate used by all the JMonth objects from
the JMonthView. |
protected abstract void |
updateNoneButtonVisible()
Specifies whether the calendar displays the none button or not. |
protected abstract void |
updateRenderer()
Updates the date renderer for the JMonthView components. |
protected abstract void |
updateRowsColumns()
Updates the row/column arrangement of the months of the calendar. |
protected abstract void |
updateTimeZone()
Updates the time zone for the months of the calendar. |
protected abstract void |
updateTitleBackground()
Updates the title background color of the calendar. |
protected abstract void |
updateTitleForeground()
Updates the title foreground color of the calendar. |
protected abstract void |
updateToggleDateSelectionEnabled()
Updates the toggle date selection flag for the components of the calendar. |
protected abstract void |
updateTrailingForeground()
Updates the trailing foreground color of the calendar. |
protected abstract void |
updateTrailingNextEnabled()
Updates the state of the trailing dates for the last month |
protected abstract void |
updateTrailingPreviousEnabled()
Updates the state of the trailing dates for the first month |
protected abstract void |
updateVerticalLinesVisible()
Specifies whether the calendar vertical grid lines are visible or not. |
protected abstract void |
updateWeekLabelsHighlight()
Updates the client property that enables the highlighting of the selected days of week or weeks. |
protected abstract void |
updateWeekModel()
Updates the week model for the components of the calendar. |
protected abstract void |
updateWeekNamesVisible()
Specifies whether the calendar displays the week names or not. |
protected abstract void |
updateWeekNumbersVisible()
Specifies whether the calendar displays the week numbers or not. |
| 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 |
protected JMonthView monthView
JMonthView component for which this UI delegate is installed.
protected javax.swing.JButton previousYearButton
createPreviousYearButton()protected javax.swing.JButton nextYearButton
createNextYearButton()protected javax.swing.JButton previousMonthButton
createPreviousMonthButton()protected javax.swing.JButton nextMonthButton
createNextMonthButton()protected javax.swing.JComponent todayComponent
createTodayComponent()protected javax.swing.JComponent noneComponent
createNoneComponent()| Constructor Detail |
public AbstractMonthViewUI()
| Method Detail |
protected java.lang.Object[] createDefaults()
Creates a list of default values for some of the properties of
JMonthView. These values are instances of objects that
implement the UIResource interface. For instance, default
fonts are created using the FontUIResource class while
colors using the ColorUIResource class.
The list is structured as follows: [key1, value1, key2, value2, ...] where the keys identify the properties and the values indicate the default values for these properties.
The keys returned in the list by this method are:
JMonthViewinitializeDefaults(),
installDefaults()protected void initializeDefaults()
Registers the default values created for some of the properties of
JMonthView with the UIManager.
installDefaults()public void installUI(javax.swing.JComponent c)
installDefaults(),
installComponents(),
installListeners(),
installKeyboardActions()protected void installDefaults()
JMonthView component.
protected void installComponents()
JMonthView to implement its
behavior. This implementation uses a title and an actual month for this.
createLayout(),
createPreviousMonthButton(),
createNextMonthButton(),
createTodayComponent(),
createNoneComponent(),
createMonth()protected java.awt.LayoutManager createLayout()
LayoutManager that manages the month and
year scrolling buttons, the actual months of the
monthView, the today and none labels.
These children must be added with a constraint that identifies their
role: "Previous", "Next", "Previous_Year", "Next_Year", "Today", "None"
and "Month". The default layout manager can handle the absence of any of
these children.
JMonthView components.installComponents()protected abstract javax.swing.JButton createPreviousMonthButton()
Creates the button that scrolls the month in view to the previous one.
You can override it to create a different button. If null
is returned, then this component is ignored and it is not added to JMonthView.
protected abstract javax.swing.JButton createNextMonthButton()
Creates the button that scrolls the month in view to the next one.
You can override it to create a different button. If null
is returned, then this component is ignored and it is not added to JMonthView.
protected abstract javax.swing.JButton createPreviousYearButton()
Creates the button that scrolls the month in view to the previous year.
You can override it to create a different button. If null
is returned, then this component is ignored and it is not added to JMonthView.
protected abstract javax.swing.JButton createNextYearButton()
Creates the button that scrolls the month in view to the next year.
You can override it to create a different button. If null
is returned, then this component is ignored and it is not added to JMonthView.
protected abstract javax.swing.JComponent createTodayComponent()
Creates the component that represents the today date.
You can override it to create a different component. If null
is returned, then this component is ignored and it is not added to JMonthView.
protected abstract javax.swing.JComponent createNoneComponent()
Creates the component that is used to reset all selected dates.
You can override it to create a different component. If null
is returned, then this component is ignored and it is not added to JMonthView.
protected abstract JMonth createMonth()
Creates the component that represents the calendar month.
protected void installListeners()
JMonth component.
protected void installKeyboardActions()
JMonthView.
public void uninstallUI(javax.swing.JComponent c)
protected void uninstallListeners()
protected void uninstallComponents()
protected void uninstallKeyboardActions()
protected abstract void updateFont()
JMonthView components.
protected abstract void updateLocale()
JMonthView components.
protected abstract void updateEnabled()
JMonthView.
protected abstract void updateRenderer()
JMonthView components.
protected abstract void updateMonthBackground()
protected abstract void updateForeground()
protected abstract void updateTitleBackground()
protected abstract void updateTitleForeground()
protected abstract void updateTrailingForeground()
protected abstract void updateTrailingNextEnabled()
protected abstract void updateTrailingPreviousEnabled()
protected abstract void updateGridColor()
protected abstract void updateWeekNumbersVisible()
protected abstract void updateWeekNamesVisible()
protected abstract void updateHorizontalLinesVisible()
protected abstract void updateVerticalLinesVisible()
protected abstract void updateDisplayToday()
protected abstract void updateNoneButtonVisible()
protected abstract void updateDateSelectionModel()
protected abstract void updateToggleDateSelectionEnabled()
protected abstract void updateMonthModel()
protected abstract void updateWeekModel()
protected abstract void updateRowsColumns()
protected abstract void updateTimeZone()
protected abstract void updateWeekLabelsHighlight()
protected abstract void updateMonthUI()
JMonth objects from
the JMonthView.
protected abstract void updateDatesOrientation()
|
JDatePicker v4.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Visit www.jdatepicker.com for further information or send us your suggestions.
Copyright © 2003-2007 Stand By Soft Ltd. All Rights Reserved.