ilog.views.util.swing.calendar.plaf
Class BasicMonthScrollerUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by ilog.views.util.swing.calendar.plaf.MonthScrollerUI
          extended by ilog.views.util.swing.calendar.plaf.BasicMonthScrollerUI

public class BasicMonthScrollerUI
extends MonthScrollerUI

This class is the basic UI delegate implementation for IlvJMonthScroller components.

Since:
JViews 5.5

Nested Class Summary
 class BasicMonthScrollerUI.CalendarModelHandler
          The CalendarModelListener that is added to the month scroller's model as needed.
 class BasicMonthScrollerUI.PropertyChangeHandler
          The PropertyChangeListener that is added to the month scroller at installUI(javax.swing.JComponent) time.
 
Field Summary
protected  CalendarModelListener modelListener
          The listener for changes to the calendar data model.
protected  JLabel monthLabel
          The central month label.
protected  IlvJMonthScroller monthScroller
          The IlvJMonthScroller that we're a UI delegate for.
protected  JButton nextButton
          The next month button.
protected  JButton prevButton
          The previous month button.
protected  PropertyChangeListener propertyChangeListener
          The listener for property changes to the month scroller.
 
Constructor Summary
BasicMonthScrollerUI()
          Creates a new BasicMonthScrollerUI delegate.
 
Method Summary
protected  CalendarModelListener createCalendarModelListener()
          Creates an instance of BasicMonthScrollerUI.CalendarModelHandler that is added to the month scroller's model as needed.
protected  PropertyChangeListener createPropertyChangeListener()
          Creates an instance of BasicMonthScrollerUI.PropertyChangeHandler that is added to the month scroller by installUI(javax.swing.JComponent).
static ComponentUI createUI(JComponent c)
          Returns a new instance of BasicMonthScrollerUI.
protected  void installComponents()
          Initializes the month scroller child components.
protected  void installDefaults()
          Initializes the month scroller properties.
protected  void installListeners()
          Creates and installs the listeners for the month scroller and its model.
 void installUI(JComponent c)
          Configures the specified month scroller for the look and feel.
protected  void repaintMonthLabel()
          Repaints the month label.
protected  void uninstallComponents()
          Removes the child components from the month scroller that were configured during installComponents().
protected  void uninstallDefaults()
          Reverses the configuration of the month scroller that was performed during installDefaults().
protected  void uninstallListeners()
          Removes the listeners for the month scroller and its model.
 void uninstallUI(JComponent c)
          Reverses the configuration that was done on the specified month scroller during installUI(javax.swing.JComponent).
 
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

monthScroller

protected IlvJMonthScroller monthScroller
The IlvJMonthScroller that we're a UI delegate for. Initialized by the installUI(javax.swing.JComponent) method, and reset to null by uninstallUI(javax.swing.JComponent).


prevButton

protected JButton prevButton
The previous month button.


nextButton

protected JButton nextButton
The next month button.


monthLabel

protected JLabel monthLabel
The central month label.


propertyChangeListener

protected PropertyChangeListener propertyChangeListener
The listener for property changes to the month scroller.


modelListener

protected CalendarModelListener modelListener
The listener for changes to the calendar data model.

Constructor Detail

BasicMonthScrollerUI

public BasicMonthScrollerUI()
Creates a new BasicMonthScrollerUI delegate.

Method Detail

createUI

public static ComponentUI createUI(JComponent c)
Returns a new instance of BasicMonthScrollerUI. UI delegates are allocated one per IlvJMonthScroller.

Parameters:
c - The IlvJMonthScroller.
Returns:
A new BasicMonthScrollerUI object.

installUI

public void installUI(JComponent c)
Configures the specified month scroller for the look and feel.

Overrides:
installUI in class ComponentUI
Parameters:
c - The IlvJMonthScroller where this UI delegate is being installed.
See Also:
uninstallUI(javax.swing.JComponent)

uninstallUI

public void uninstallUI(JComponent c)
Reverses the configuration that was done on the specified month scroller during installUI(javax.swing.JComponent).

Overrides:
uninstallUI in class ComponentUI
Parameters:
c - The IlvJMonthScroller from which this UI delegate is being removed.

installComponents

protected void installComponents()
Initializes the month scroller child components. This includes the arrow buttons and the central month label.

See Also:
uninstallComponents(), installUI(javax.swing.JComponent)

uninstallComponents

protected void uninstallComponents()
Removes the child components from the month scroller that were configured during installComponents().


installDefaults

protected void installDefaults()
Initializes the month scroller properties.

See Also:
uninstallDefaults(), installUI(javax.swing.JComponent)

uninstallDefaults

protected void uninstallDefaults()
Reverses the configuration of the month scroller that was performed during installDefaults().


installListeners

protected void installListeners()
Creates and installs the listeners for the month scroller and its model. This method is called at installUI(javax.swing.JComponent) time.

See Also:
uninstallListeners()

uninstallListeners

protected void uninstallListeners()
Removes the listeners for the month scroller and its model. This method is called at uninstallUI(javax.swing.JComponent) time.

See Also:
installListeners()

createCalendarModelListener

protected CalendarModelListener createCalendarModelListener()
Creates an instance of BasicMonthScrollerUI.CalendarModelHandler that is added to the month scroller's model as needed.


createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()
Creates an instance of BasicMonthScrollerUI.PropertyChangeHandler that is added to the month scroller by installUI(javax.swing.JComponent).


repaintMonthLabel

protected void repaintMonthLabel()
Repaints the month label.



Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.