com.miginfocom.calendar.decorators
Class ThemeSelectionGridDecorator

java.lang.Object
  extended by com.miginfocom.calendar.decorators.AbstractGridDecorator
      extended by com.miginfocom.calendar.decorators.AbstractDateGridDecorator
          extended by com.miginfocom.calendar.decorators.SelectionGridDecorator
              extended by com.miginfocom.calendar.decorators.ThemeSelectionGridDecorator
All Implemented Interfaces:
Decorator, GridDecorator, DateChangeListener, java.beans.PropertyChangeListener, java.lang.Comparable, java.util.EventListener

public class ThemeSelectionGridDecorator
extends SelectionGridDecorator
implements java.beans.PropertyChangeListener

Extends SelectionGridDecorator by getting all properties from a CalendarTheme.
Adds itself as a property change listener to the com.miginfocom.theme and reloads values for property changes that concerns this decorator.


Constructor Summary
ThemeSelectionGridDecorator(DateArea dateArea, int layerIndex, java.lang.String themeContext)
          Constructor
 
Method Summary
 void dispose()
          Clean up and deregister listeners.
 void propertyChange(java.beans.PropertyChangeEvent e)
           
protected  void reloadFromTheme()
          Reloads values from the com.miginfocom.theme and issues a repaint.
 void setThemeContext(java.lang.String context)
          Set a new com.miginfocom.theme context.
 
Methods inherited from class com.miginfocom.calendar.decorators.SelectionGridDecorator
dateRangeChanged, doPaint, getCellOutlineMode, getCellOutlineModes, getDateArea, getPaint, getPaints, getStokePaint, getStroke, getStrokePaints, getStrokes, gridChanged, isHideWhenNotExactCellDateRange, isShowSelectionWhenSelecting, paintRange, paintRangePoly, repaintDateRange, setCellOutlineMode, setCellOutlineModes, setHideWhenNotExactCellDateRange, setPaint, setPaints, setShowSelectionWhenSelecting, setStokePaint, setStroke, setStrokePaints, setStrokes
 
Methods inherited from class com.miginfocom.calendar.decorators.AbstractDateGridDecorator
getDateGrid, getDateGridContainer
 
Methods inherited from class com.miginfocom.calendar.decorators.AbstractGridDecorator
compareTo, getGrid, getGridContainer, getInvalidEnd, getInvalidStart, getLayerIndex, hasInvalidCells, invalidateCells, processEvent, setCellsValid, setLayerIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThemeSelectionGridDecorator

public ThemeSelectionGridDecorator(DateArea dateArea,
                                   int layerIndex,
                                   java.lang.String themeContext)
Constructor

Parameters:
dateArea - The date area which grid to decorate. Uses the date area to listen for date range changes. Stored in a WeakReference
layerIndex - The index at which to paint this "layer".
themeContext - The context used to get a com.miginfocom.theme to get the properties from.
Method Detail

reloadFromTheme

protected void reloadFromTheme()
Reloads values from the com.miginfocom.theme and issues a repaint.


setThemeContext

public void setThemeContext(java.lang.String context)
Set a new com.miginfocom.theme context.

Parameters:
context - The com.miginfocom.theme context used for getting a com.miginfocom.theme.

dispose

public void dispose()
Description copied from interface: Decorator
Clean up and deregister listeners. Should be called when a Decorator isn't needed any more.

Specified by:
dispose in interface Decorator
Overrides:
dispose in class SelectionGridDecorator

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.