Addmouseinteractionlistener – MiG InfoCom MiG Calendar JavaBeans User Manual

Page 25

Advertising
background image

(continued from last page)

Parameters:

radius

- The new radius.

See Also:

setRoundRect(double, double, double, double, double, double)

addMouseInteractionListener

public void addMouseInteractionListener(MouseInteractionListener l)

Adds a listener that listens to all mouse events on this shape and all sub shapes that has a hit area report set to true.

Note that the listener will be installed on the default AShape which can be used for many date areas. To only handle events
originating from a single date area you can do this:

if (event.getOriginalEvent().getComponent() == myDateAreaBean.getDateArea()) {

// Put code to handle the event here...

}

Parameters:

l

- The listener

See Also:

A_REPORT_HIT_AREA

addMouseInteractionListener(MouseInteractionListener, boolean)

Since:

6.0

addMouseInteractionListener

public void addMouseInteractionListener(MouseInteractionListener l,
boolean asWeakRef)

Adds a listener that listens to all mouse events on this shape and all sub shapes that has a hit area report set to true.

Parameters:

l

- The listener

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.

See Also:

A_REPORT_HIT_AREA

Since:

6.0

Page 25 of 196

com.miginfocom.beans.ActivityAShapeBean

Advertising