com.miginfocom.beans
Class CategoryHeaderBean

java.lang.Object
  extended by com.miginfocom.beans.AbstractBean
      extended by com.miginfocom.beans.AbstractHeaderBean
          extended by com.miginfocom.beans.CategoryHeaderBean
All Implemented Interfaces:
InteractionListener, java.io.Serializable, java.util.EventListener
Direct Known Subclasses:
NorthCategoryHeaderBean, WestCategoryHeaderBean

public abstract class CategoryHeaderBean
extends AbstractHeaderBean
implements InteractionListener

A header object that wraps (aggregates) a real Header implementation.

This bean is for simplifying the usage of a header and to make the header a visual JavaBean.

Note! The category header will end up on the si

See Also:
Serialized Form

Field Summary
protected  javax.swing.border.Border cellBorder
           
protected  java.awt.Cursor cellCursor
           
protected  java.lang.Boolean folderOverlapChildren
           
protected  java.lang.Integer forcedHeaderSize
           
protected  DefaultSubRowLevel[] headerLevels
           
protected  java.awt.Cursor knobCursor
           
protected  XtdImage knobExpandedImage
           
protected  XtdImage knobFoldedImage
           
protected  AtRefRangeNumber knobImageAlignX
           
protected  AtRefRangeNumber knobImageAlignY
           
protected  java.awt.Cursor labelCursor
           
protected  XtdImage rowFolderImage
           
protected  AtRefRangeNumber rowImageAlignX
           
protected  AtRefRangeNumber rowImageAlignY
           
protected  XtdImage rowLeafImage
           
protected  java.lang.Integer textAntiAlias
           
 
Fields inherited from class com.miginfocom.beans.AbstractHeaderBean
bgPaint
 
Constructor Summary
CategoryHeaderBean()
           
 
Method Summary
 void addInteractionListener(InteractionListener l)
          Adds a listener that listens to InteractionEvents.
 void addInteractionListener(InteractionListener l, boolean asWeakRef)
          Adds a listener that listens to InteractionEvents.
protected  void fireInteractionOccured(InteractionEvent e)
          Notifies all listeners of the the event but stops as soon as the event get's consumed.
 int getCategoryDepth()
           
 javax.swing.border.Border getCellBorder()
          Property: The Border used to draw around the cells in the header.
 java.awt.Cursor getCellCursor()
          Property: The Cursor that the mouse pointer should change to when over a cell (and not label).
 java.lang.Integer getForcedHeaderSize()
          Property: The size (height if top/bottom and width if left/right) of the header.
 Header getHeader()
           
 DefaultSubRowLevel[] getHeaderLevels()
          Property: The specification for the levels that correspond to the category level.
 java.awt.Cursor getKnobCursor()
          Property: The Cursor that the mouse pointer should change to when over +- knob.
 XtdImage getKnobExpandedImage()
          Property: A XtdImage (which is a very flexible Image/Icon) that should decorate the knob (handle, e.g.
 XtdImage getKnobFoldedImage()
          Property: A XtdImage (which is a very flexible Image/Icon) that should decorate the knob (handle, e.g.
 boolean getKnobFoldOnPress()
          Property: If the corresponding sub row should be folded when the user press the knob image in the category header.
 AtRefRangeNumber getKnobImageAlignX()
          Property: How the knob image should be aligned horizontally.
 AtRefRangeNumber getKnobImageAlignY()
          Property: How the knob image should be aligned vertically.
 java.awt.Cursor getLabelCursor()
          Property: The Cursor that the mouse pointer should change to when over a category label.
 boolean getLabelFoldOnPress()
          Property: If the corresponding sub row should be folded when the user press the label in the category header.
 boolean getNoExpandedFolderGridLine()
          Deprecated. Use DateAreaBean#getNoExpandedFolderGridLine instead.
 XtdImage getRowFolderImage()
          Property: A XtdImage (which is a very flexible Image/Icon) that should represent a folder and are shown for sub rows that aren't leaves.
 AtRefRangeNumber getRowImageAlignX()
          Property: How the row image should be aligned horizontally.
 AtRefRangeNumber getRowImageAlignY()
          Property: How the row image should be aligned vertically.
 XtdImage getRowLeafImage()
          Property: A XtdImage (which is a very flexible Image/Icon) that should represent a folder and are shown for sub rows that doesn't have sub rows.
 int getTextAntiAlias()
          Property: The anti aliasing hint used when drawing the text for the shape.
 void interactionOccured(InteractionEvent e)
          Called when an interaction has occurred-
 boolean isFolderOverlapChildren()
          Property: If the folder category rows, which contains other rows, should get it's secondary dimension's (along the header) size stretched over all its sub rows bounds.
protected  void recreateHeader()
          Set the header to null and revalidate the container
 void removeInteractionListener(InteractionListener l)
          Removes the listener.
 void setCellBorder(javax.swing.border.Border border)
          Property: The Border used to draw around the cells in the header.
 void setCellCursor(java.awt.Cursor cur)
          Property: The Cursor that the mouse pointer should change to when over a cell (and not label).
 boolean setDateAreaContainer(DateAreaBean container)
          Sets the DateAreaContainer that this header should decorate.
 void setFolderOverlapChildren(boolean b)
          Property: If the folder category rows, which contains other rows, should get it's secondary dimension's (along the header) size stretched over all its sub rows bounds.
 void setForcedHeaderSize(java.lang.Integer size)
          Property: The size (height if top/bottom and width if left/right) of the header.
 void setHeaderLevels(DefaultSubRowLevel[] rows)
          Property: The specification for the levels that correspond to the category level.
 void setKnobCursor(java.awt.Cursor cur)
          Property: The Cursor that the mouse pointer should change to when over +- knob.
 void setKnobExpandedImage(XtdImage image)
          Property: A XtdImage (which is a very flexible Image/Icon) that should decorate the knob (handle, e.g.
 void setKnobFoldedImage(XtdImage image)
          Property: A XtdImage (which is a very flexible Image/Icon) that should decorate the knob (handle, e.g.
 void setKnobFoldOnPress(boolean b)
          Property: If the corresponding sub row should be folded when the user press the knob image in the category header.
 void setKnobImageAlignX(AtRefRangeNumber align)
          Property: How the knob image should be aligned horizontally.
 void setKnobImageAlignY(AtRefRangeNumber align)
          Property: How the knob image should be aligned vertically.
 void setLabelCursor(java.awt.Cursor cur)
          Property: The Cursor that the mouse pointer should change to when over a category label.
 void setLabelFoldOnPress(boolean b)
          Property: If the corresponding sub row should be folded when the user press the label in the category header.
 void setNoExpandedFolderGridLine(boolean b)
          Deprecated. Use DateAreaBean#setNoExpandedFolderGridLine instead.
 void setRowFolderImage(XtdImage image)
          Property: A XtdImage (which is a very flexible Image/Icon) that should represent a folder and are shown for sub rows that aren't leaves.
 void setRowImageAlignX(AtRefRangeNumber align)
          Property: How the row image should be aligned horizontally.
 void setRowImageAlignY(AtRefRangeNumber align)
          Property: How the row image should be aligned vertically.
 void setRowLeafImage(XtdImage image)
          Property: A XtdImage (which is a very flexible Image/Icon) that should represent a folder and are shown for sub rows that doesn't have sub rows.
 void setTextAntiAlias(int hint)
          Property: The anti aliasing hint used when drawing the text for the shape.
protected  void transferPropertiesToHeadersLevels()
           
 
Methods inherited from class com.miginfocom.beans.AbstractHeaderBean
getBackgroundPaint, getContainer, getEdge, getExpandToCorner, isVisible, revalidateRepaintContainer, setBackgroundPaint, setEdge, setExpandToCorner, setVisible
 
Methods inherited from class com.miginfocom.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChangeEvent, removePropertyChangeListener, setIgnorePropertyChangeEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

folderOverlapChildren

protected transient java.lang.Boolean folderOverlapChildren

forcedHeaderSize

protected transient java.lang.Integer forcedHeaderSize

headerLevels

protected transient DefaultSubRowLevel[] headerLevels

cellBorder

protected transient javax.swing.border.Border cellBorder

knobExpandedImage

protected transient XtdImage knobExpandedImage

knobFoldedImage

protected transient XtdImage knobFoldedImage

knobImageAlignX

protected transient AtRefRangeNumber knobImageAlignX

knobImageAlignY

protected transient AtRefRangeNumber knobImageAlignY

rowImageAlignX

protected transient AtRefRangeNumber rowImageAlignX

rowImageAlignY

protected transient AtRefRangeNumber rowImageAlignY

textAntiAlias

protected transient java.lang.Integer textAntiAlias

labelCursor

protected transient java.awt.Cursor labelCursor

cellCursor

protected transient java.awt.Cursor cellCursor

knobCursor

protected transient java.awt.Cursor knobCursor

rowFolderImage

protected transient XtdImage rowFolderImage

rowLeafImage

protected transient XtdImage rowLeafImage
Constructor Detail

CategoryHeaderBean

public CategoryHeaderBean()
Method Detail

setDateAreaContainer

public boolean setDateAreaContainer(DateAreaBean container)
Description copied from class: AbstractHeaderBean
Sets the DateAreaContainer that this header should decorate. This will be called by the controller that handles them both and the header will not work unless this property has been set.

Overrides:
setDateAreaContainer in class AbstractHeaderBean
Parameters:
container - The container that this header should decorate. null resets the header.
Returns:
If the container was changed. false if the same container was set again.

getHeader

public Header getHeader()

getCategoryDepth

public int getCategoryDepth()

recreateHeader

protected void recreateHeader()
Set the header to null and revalidate the container

Specified by:
recreateHeader in class AbstractHeaderBean

transferPropertiesToHeadersLevels

protected void transferPropertiesToHeadersLevels()

interactionOccured

public void interactionOccured(InteractionEvent e)
Description copied from interface: InteractionListener
Called when an interaction has occurred-

Yes, embarrassing as it is, we are aware that occurred it is spelled wrong.

Specified by:
interactionOccured in interface InteractionListener
Parameters:
e - The event

getNoExpandedFolderGridLine

public boolean getNoExpandedFolderGridLine()
Deprecated. Use DateAreaBean#getNoExpandedFolderGridLine instead.

Property: If the grid lines around a folded (collapsed) folder sub row should be merged to one. This is to avoid the double grid lines that would be visible around rows with size 0 otherwise. It is purely a visual setting and won't affect any data or functionality.

Returns:
Always false.

setNoExpandedFolderGridLine

public void setNoExpandedFolderGridLine(boolean b)
Deprecated. Use DateAreaBean#setNoExpandedFolderGridLine instead.

Deprecated because of duplication.


getLabelFoldOnPress

public boolean getLabelFoldOnPress()
Property: If the corresponding sub row should be folded when the user press the label in the category header. This is done by catching the InteractionEvent and fold the corresponding row. This can also be done manually, to get more control, by adding a listener with addInteractionListener(com.miginfocom.ashape.interaction.InteractionListener) and there perform code like:


 Object interacted = e.getInteractor().getInteracted();
 if (interacted instanceof GridRow) {
    GridRow row = (GridRow) interacted;
    row.setFolded(!row.isFolded());

    revalidateRepaintContainer();
 }
 

Returns:
The current value.
See Also:
getKnobFoldOnPress()

setLabelFoldOnPress

public void setLabelFoldOnPress(boolean b)
Property: If the corresponding sub row should be folded when the user press the label in the category header. This is done by catching the InteractionEvent and fold the corresponding row. This can also be done manually, to get more control, by adding a listener with addInteractionListener(com.miginfocom.ashape.interaction.InteractionListener) and there perform code like:


 Object interacted = e.getInteractor().getInteracted();
 if (interacted instanceof GridRow) {
    GridRow row = (GridRow) interacted;
    row.setFolded(!row.isFolded());

    revalidateRepaintContainer();
 }
 

Parameters:
b - The new value.
See Also:
setKnobFoldOnPress(boolean)

getLabelCursor

public java.awt.Cursor getLabelCursor()
Property: The Cursor that the mouse pointer should change to when over a category label.

Returns:
The current Cursor. May be null which means no change.

setLabelCursor

public void setLabelCursor(java.awt.Cursor cur)
Property: The Cursor that the mouse pointer should change to when over a category label.

Parameters:
cur - The new Cursor. May be null which means no change.

getCellCursor

public java.awt.Cursor getCellCursor()
Property: The Cursor that the mouse pointer should change to when over a cell (and not label).

Returns:
The current Cursor. May be null which means no change.

setCellCursor

public void setCellCursor(java.awt.Cursor cur)
Property: The Cursor that the mouse pointer should change to when over a cell (and not label).

Parameters:
cur - The new Cursor. May be null which means no change.

getKnobFoldOnPress

public boolean getKnobFoldOnPress()
Property: If the corresponding sub row should be folded when the user press the knob image in the category header. This is done by catching the InteractionEvent and fold the corresponding row. This can also be done manually, to get more control, by adding a listener with addInteractionListener(com.miginfocom.ashape.interaction.InteractionListener) and there perform code like:


 Object interacted = e.getInteractor().getInteracted();
 if (interacted instanceof GridRow) {
    GridRow row = (GridRow) interacted;
    row.setFolded(!row.isFolded());

    revalidateRepaintContainer();
 }
 

Returns:
The current value.
See Also:
getLabelFoldOnPress()

setKnobFoldOnPress

public void setKnobFoldOnPress(boolean b)
Property: If the corresponding sub row should be folded when the user press the knob image in the category header. This is done by catching the InteractionEvent and fold the corresponding row. This can also be done manually, to get more control, by adding a listener with addInteractionListener(com.miginfocom.ashape.interaction.InteractionListener) and there perform code like:


 Object interacted = e.getInteractor().getInteracted();
 if (interacted instanceof GridRow) {
    GridRow row = (GridRow) interacted;
    row.setFolded(!row.isFolded());

    revalidateRepaintContainer();
 }
 

Parameters:
b - The new value.
See Also:
setLabelFoldOnPress(boolean)

getKnobCursor

public java.awt.Cursor getKnobCursor()
Property: The Cursor that the mouse pointer should change to when over +- knob.

Returns:
The current Cursor. May be null which means no change.

setKnobCursor

public void setKnobCursor(java.awt.Cursor cur)
Property: The Cursor that the mouse pointer should change to when over +- knob.

Parameters:
cur - The new Cursor. May be null which means no change.

getRowFolderImage

public XtdImage getRowFolderImage()
Property: A XtdImage (which is a very flexible Image/Icon) that should represent a folder and are shown for sub rows that aren't leaves.

Returns:
The current image or null if no image should be shown/used.

setRowFolderImage

public void setRowFolderImage(XtdImage image)
Property: A XtdImage (which is a very flexible Image/Icon) that should represent a folder and are shown for sub rows that aren't leaves.

Parameters:
image - The new image or null if no image should be shown/used.

getRowLeafImage

public XtdImage getRowLeafImage()
Property: A XtdImage (which is a very flexible Image/Icon) that should represent a folder and are shown for sub rows that doesn't have sub rows.

Returns:
The current image or null if no image should be shown/used.

setRowLeafImage

public void setRowLeafImage(XtdImage image)
Property: A XtdImage (which is a very flexible Image/Icon) that should represent a folder and are shown for sub rows that doesn't have sub rows.

Parameters:
image - The new image or null if no image should be shown/used.

getForcedHeaderSize

public java.lang.Integer getForcedHeaderSize()
Property: The size (height if top/bottom and width if left/right) of the header. Normally this value is calculated from the setted HeaderLevels (see setHeaderLevels(com.miginfocom.calendar.header.DefaultSubRowLevel[])) but sometimes a specific size is needed or is simpler to set.

Depending on the setted HeaderLevels those will span this size, but they don't have to.

Returns:
The current size or null which means that the header should use the HeaderLevels to caclulate the preferred size.

setForcedHeaderSize

public void setForcedHeaderSize(java.lang.Integer size)
Property: The size (height if top/bottom and width if left/right) of the header. Normally this value is calculated from the setted HeaderLevels (see setHeaderLevels(com.miginfocom.calendar.header.DefaultSubRowLevel[])) but sometimes a specific size is needed or is simpler to set.

Depending on the setted HeaderLevels those will span this size, but they don't have to.

Parameters:
size - The new size or null which means that the header should use the HeaderLevels to caclulate the preferred size.

getHeaderLevels

public DefaultSubRowLevel[] getHeaderLevels()
Property: The specification for the levels that correspond to the category level. The main row, which doesn't represent a category but actually the collection of subrows that represents the categories, is level 0. The root category is level 1 and it's direct children level 2 and so on.

This means that a level will get the same attributes normally. It may be background, foreground, color and such things and is outlined in the DefaultSubRowLevel instances in the array. This also includes mouse over and mouse pressed effects.

Returns:
The current row specs. Never null.
See Also:
setHeaderLevels(com.miginfocom.calendar.header.DefaultSubRowLevel[])

setHeaderLevels

public void setHeaderLevels(DefaultSubRowLevel[] rows)
Property: The specification for the levels that correspond to the category level. The main row, which doesn't represent a category but actually the collection of subrows that represents the categories, is level 0. The root category is level 1 and it's direct children level 2 and so on.

Example 1:

 Level 0 (main row)
   People (Level 1)
     Chris (Level 2)
     Susan (Level 2)
   Aircraft (Level 1)
     SE001 (Level 2)
     SE002 (Level 2)
     SE002 (Level 2)
 
 

Example 2:

                 |   Other, top header...
 ________________|_________________
 |   |   |       |
 | P | L | Work  |
 | e | i |       |
 | r | s |=======|
 | s | a | Home  |
 | o |   |       |
 | n |===|=======|   The date area
 | n |   |       |
 | e | M | Work  |
 | l | a |=======|
 |   | r |       |
 |   | k | Home  |
 ________________|_________________
 

When the columns is level 1, 2 and 3. The whole row is level 0.

This means that a level will get the same attributes normally. It may be background, foreground, color and such things and is outlined in the DefaultSubRowLevel instances in the array. This also includes mouse over and mouse pressed effects.

Parameters:
rows - The new rows. null is same as empty array.

isFolderOverlapChildren

public boolean isFolderOverlapChildren()
Property: If the folder category rows, which contains other rows, should get it's secondary dimension's (along the header) size stretched over all its sub rows bounds. Example 2 in setHeaderLevels(com.miginfocom.calendar.header.DefaultSubRowLevel[]) shows how this might look. Note that this is only in the secondary dimension.

Returns:
The folder rows' size should include its childrens bounds in the secondary dimension.

setFolderOverlapChildren

public void setFolderOverlapChildren(boolean b)
Property: If the folder category rows, which contains other rows, should get it's secondary dimension's (along the header) size stretched over all its sub rows bounds. Example 2 in setHeaderLevels(com.miginfocom.calendar.header.DefaultSubRowLevel[]) shows how this might look. Note that this is only in the secondary dimension.

Parameters:
b - Whether folder rows' size should include its childrens bounds in the secondary dimension.

getCellBorder

public javax.swing.border.Border getCellBorder()
Property: The Border used to draw around the cells in the header.

Returns:
The current border or null if no border should be painted.

setCellBorder

public void setCellBorder(javax.swing.border.Border border)
Property: The Border used to draw around the cells in the header.

Parameters:
border - The new border or null if no border should be painted.

getKnobExpandedImage

public XtdImage getKnobExpandedImage()
Property: A XtdImage (which is a very flexible Image/Icon) that should decorate the knob (handle, e.g. +-) that you press th expand/fold the folder rows. This is for folder rows that are in their expanded state.

Returns:
The current image or null for none.

setKnobExpandedImage

public void setKnobExpandedImage(XtdImage image)
Property: A XtdImage (which is a very flexible Image/Icon) that should decorate the knob (handle, e.g. +-) that you press th expand/fold the folder rows. This is for folder rows that are in their expanded state.

Parameters:
image - The new image or null for none.

getKnobFoldedImage

public XtdImage getKnobFoldedImage()
Property: A XtdImage (which is a very flexible Image/Icon) that should decorate the knob (handle, e.g. +-) that you press th expand/fold the folder rows. This is for folder rows that are in their folded state.

Returns:
The current image or null for none.

setKnobFoldedImage

public void setKnobFoldedImage(XtdImage image)
Property: A XtdImage (which is a very flexible Image/Icon) that should decorate the knob (handle, e.g. +-) that you press th expand/fold the folder rows. This is for folder rows that are in their folded state.

Parameters:
image - The new image or null for none.

getKnobImageAlignX

public AtRefRangeNumber getKnobImageAlignX()
Property: How the knob image should be aligned horizontally. E.g.: new AtFraction(0.5f) for centered or new AtStart(2f) for two pixels from the left edge.

Returns:
The current alignment or null for which the behaviour is undefined.
See Also:
AtFraction, AtStart, AtEnd

setKnobImageAlignX

public void setKnobImageAlignX(AtRefRangeNumber align)
Property: How the knob image should be aligned horizontally. E.g.: new AtFraction(0.5f) for centered or new AtStart(2f) for two pixels from the left edge.

Parameters:
align - The new alignment. Not null.
See Also:
AtFraction, AtStart, AtEnd

getKnobImageAlignY

public AtRefRangeNumber getKnobImageAlignY()
Property: How the knob image should be aligned vertically. E.g.: new AtFraction(0.5f) for centered or new AtStart(2f) for two pixels from the left edge.

Returns:
The current alignment. Not null.
See Also:
AtFraction, AtStart, AtEnd

setKnobImageAlignY

public void setKnobImageAlignY(AtRefRangeNumber align)
Property: How the knob image should be aligned vertically. E.g.: new AtFraction(0.5f) for centered or new AtEnd(-2f) for two pixels from the bottom edge.

Parameters:
align - The new alignment Not null.
See Also:
AtFraction, AtStart, AtEnd

getRowImageAlignX

public AtRefRangeNumber getRowImageAlignX()
Property: How the row image should be aligned horizontally. E.g.: new AtFraction(0.5f) for centered or new AtStart(2f) for two pixels from the left edge.

Returns:
The current alignment. Not null.
See Also:
AtFraction, AtStart, AtEnd

setRowImageAlignX

public void setRowImageAlignX(AtRefRangeNumber align)
Property: How the row image should be aligned horizontally. E.g.: new AtFraction(0.5f) for centered or new AtStart(2f) for two pixels from the left edge.

Parameters:
align - The new alignment. Not null.
See Also:
AtFraction, AtStart, AtEnd

getRowImageAlignY

public AtRefRangeNumber getRowImageAlignY()
Property: How the row image should be aligned vertically. E.g.: new AtFraction(0.5f) for centered or new AtStart(2f) for two pixels from the left edge.

Returns:
The current alignment. Not null.
See Also:
AtFraction, AtStart, AtEnd

setRowImageAlignY

public void setRowImageAlignY(AtRefRangeNumber align)
Property: How the row image should be aligned vertically. E.g.: new AtFraction(0.5f) for centered or new AtEnd(-2f) for two pixels from the bottom edge.

Parameters:
align - The new alignment. Not null.
See Also:
AtFraction, AtStart, AtEnd

getTextAntiAlias

public int getTextAntiAlias()
Property: The anti aliasing hint used when drawing the text for the shape. For instance GfxUtil.AA_HINT_ON.

Returns:
The current hint. May be null.
See Also:
GfxUtil.confAntiAliasingHint(java.awt.Graphics2D, boolean, int)

setTextAntiAlias

public void setTextAntiAlias(int hint)
Property: The anti aliasing hint used when drawing the text for the shape. For instance GfxUtil.AA_HINT_PLATFORM.

Parameters:
hint - The new hint.
See Also:
GfxUtil.confAntiAliasingHint(java.awt.Graphics2D, boolean, int)

addInteractionListener

public void addInteractionListener(InteractionListener l)
Adds a listener that listens to InteractionEvents. Interaction events are normally fired by the Interaction/Interactor/AbstractInteractionBroker framework, used for instance by the AShape framework.

The interaction events that is fired is when the user presses the knob or the label in the header.

This class is actually a re-dispatcher of these events. It is itself an InteractionListener and registers itself on the interaction observable objects it creates. For instance ActivityViews.

Parameters:
l - The listener to add

addInteractionListener

public void addInteractionListener(InteractionListener l,
                                   boolean asWeakRef)
Adds a listener that listens to InteractionEvents. Interaction events are normally fired by the Interaction/Interactor/AbstractInteractionBroker framework, used for instance by the AShape framework.

The interaction events that is fired is when the user presses the knob or the label in the header.

This class is actually a re-dispatcher of these events. It is itself an InteractionListener and registers itself on the interaction observable objects it creates. For instance ActivityViews.

Parameters:
l - The listener to add
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.


removeInteractionListener

public void removeInteractionListener(InteractionListener l)
Removes the listener.

Parameters:
l - The listener to remove.

fireInteractionOccured

protected void fireInteractionOccured(InteractionEvent e)
Notifies all listeners of the the event but stops as soon as the event get's consumed.



Copyright © 2009 MiG InfoCom AB. All Rights Reserved.