public ModalityState getModalityState() { TimerListener delegate = myRef.get(); if (delegate != null) { return delegate.getModalityState(); } else{ myManager.removeTimerListener(this); return null; } }
public WeakTimerListener(ActionManagerEx manager, TimerListener delegate) { myManager = manager; myRef = new WeakReference<TimerListener>(delegate); }
public void run() { TimerListener delegate = myRef.get(); if (delegate != null) { delegate.run(); } }