com.miginfocom.calendar.grid
Interface GridContainer

All Known Subinterfaces:
DateArea, DateGridContainer
All Known Implementing Classes:
AbstractGridHeader, DateGridHeader, DefaultDateArea, SubRowGridHeader, ThemeDateArea

public interface GridContainer

An interface to implement if a class contains a Grid. This type will be used for object that contains a grid that can be exchanged and thus the container needs to be referenced rather than the DateGrid itself.


Method Summary
 void addGridListener(java.beans.PropertyChangeListener l)
          Adds a listener that gets notified when the grid is changed or any other "major" change occurs.
 void addGridListener(java.beans.PropertyChangeListener l, boolean asWeakRef)
          Adds a listener that gets notified when the grid is changed or any other "major" change occurs.
 Grid getGrid()
          Returns the grid.
 void removeGridListener(java.beans.PropertyChangeListener l)
          Removes the listener, if it is in the list.
 

Method Detail

getGrid

Grid getGrid()
Returns the grid. Should generally not return null.

Returns:
The grid.

addGridListener

void addGridListener(java.beans.PropertyChangeListener l)
Adds a listener that gets notified when the grid is changed or any other "major" change occurs.

Parameters:
l - The listener. Not null

addGridListener

void addGridListener(java.beans.PropertyChangeListener l,
                     boolean asWeakRef)
Adds a listener that gets notified when the grid is changed or any other "major" change occurs.

Parameters:
l - The listener. Not null
asWeakRef - If the listener should be added wrapped in a WeakReference. This defers memory leak problems since the garbage collector can collect the listener if it is only referenced from this list.
Note! This (weak reference) can not be used with listeners that doesn't have another real (a.k.a Strong) reference to it, as for instance an annonymous inner class. If one such listener is added it will be removed almost immediately by the garbage collector.

removeGridListener

void removeGridListener(java.beans.PropertyChangeListener l)
Removes the listener, if it is in the list.

Parameters:
l - The listener to remove, not null.


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.