uk.ac.starlink.util.gui
Class WeakItemListener

java.lang.Object
  extended by uk.ac.starlink.util.gui.WeakItemListener
All Implemented Interfaces:
ItemListener, EventListener

public class WeakItemListener
extends Object
implements ItemListener

Item listener which delegates to another one as long as it is reachable, but only retains a weak reference to it. Adding a listener to an object in this way will not prevent the listener (and any of its references) from being garbage collected.

Since:
20 Jan 2005
Author:
Mark Taylor

Constructor Summary
WeakItemListener(ItemListener base)
          Constructs a new listener based on an existing one.
 
Method Summary
 void itemStateChanged(ItemEvent evt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeakItemListener

public WeakItemListener(ItemListener base)
Constructs a new listener based on an existing one.

Parameters:
base - listener
Method Detail

itemStateChanged

public void itemStateChanged(ItemEvent evt)
Specified by:
itemStateChanged in interface ItemListener


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.