com.miginfocom.calendar.decorators
Class StaticAShapeGridDecorator

java.lang.Object
  extended by com.miginfocom.calendar.decorators.AbstractGridDecorator
      extended by com.miginfocom.calendar.decorators.AShapeGridDecorator
          extended by com.miginfocom.calendar.decorators.StaticAShapeGridDecorator
All Implemented Interfaces:
Decorator, GridDecorator, java.lang.Comparable

public class StaticAShapeGridDecorator
extends AShapeGridDecorator

Paints a number of AShapes to paint as decoration in a layer. The reference bounds of the shapes will be set to span the grid's bounds.


Constructor Summary
StaticAShapeGridDecorator(GridContainer gridContainer, int layerIndex, RootAShape[] shapes)
          Constructor
 
Method Summary
 RootAShape[] getShapes()
          Return the shapes that is to be painted under or above the grid.
 void gridChanged(java.beans.PropertyChangeEvent e)
          Called when the grid changes.
 
Methods inherited from class com.miginfocom.calendar.decorators.AShapeGridDecorator
doPaint
 
Methods inherited from class com.miginfocom.calendar.decorators.AbstractGridDecorator
compareTo, dispose, 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

StaticAShapeGridDecorator

public StaticAShapeGridDecorator(GridContainer gridContainer,
                                 int layerIndex,
                                 RootAShape[] shapes)
Constructor

Parameters:
gridContainer - The grid container to decorate. Not null.
layerIndex - A number to indicate the order in which to paint something. Lower if painted before. I.e. under.
shapes - The shapes to paint. Not null.
Method Detail

getShapes

public RootAShape[] getShapes()
Description copied from class: AShapeGridDecorator
Return the shapes that is to be painted under or above the grid. The shapes shall be laid out before returned.

Specified by:
getShapes in class AShapeGridDecorator
Returns:
A number of shapes. Never null but can be of length 0. The array can be the live array used but the object so it should be considered read-only. This is to avoid creating a passive clone and thus, garbage.

gridChanged

public void gridChanged(java.beans.PropertyChangeEvent e)
Description copied from class: AbstractGridDecorator
Called when the grid changes.

Specified by:
gridChanged in class AbstractGridDecorator
Parameters:
e - The event.


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.