Removeinteractionlistener(interactionlistener), Addinteractionlistener, Interactionlistener – MiG InfoCom MiG Calendar JavaBeans User Manual
Page 42: Removeinteractionlistener
![background image](https://www.manualsdir.com/files/798675/content/doc042.png)
(continued from last page)
addInteractionListener
public void addInteractionListener(InteractionListener l,
boolean asWeakRef)
Adds a listener that listens to
InteractionEvent
s. Interaction events are normally fired by the
Interaction/Interactor/AbstractInteractionBroker framework, used for instance by the
com.miginfocom.ashape.shapes.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
com.miginfocom.ashape.interaction.InteractionListener
and registers itself on the interaction observable
objects it creates. For instance
com.miginfocom.calendar.activity.view.ActivityView
s.
Parameters:
l
- The listener to add
asWeakRef
- If the listener should be added wrapped in a
java.lang.ref.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.
Page 42 of 196
com.miginfocom.beans.CategoryHeaderBean