Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.visualization.batikutil
Class RunWhenReadyAndVisible

java.lang.Object
  extended by org.apache.batik.bridge.UpdateManagerAdapter
      extended by de.lmu.ifi.dbs.elki.visualization.batikutil.RunWhenReadyAndVisible
All Implemented Interfaces:
Runnable, org.apache.batik.bridge.UpdateManagerListener
Direct Known Subclasses:
NodeReplacer

public abstract class RunWhenReadyAndVisible
extends org.apache.batik.bridge.UpdateManagerAdapter
implements Runnable

Wait for the object to get an updateManager, then run. If the updateManager already exists, schedule a run via the runnable queue.

Author:
Erich Schubert

Field Summary
private  org.apache.batik.swing.svg.AbstractJSVGComponent component
          The component we are attached to, and that we might need to unregister with.
 
Constructor Summary
RunWhenReadyAndVisible()
          Try to either hook into the UpdateRunnableQueue, or wait for an updateManager to become available.
 
Method Summary
 void hook(org.apache.batik.swing.svg.AbstractJSVGComponent component)
          Hook to the given component, schedule update.
 void managerStarted(org.apache.batik.bridge.UpdateManagerEvent e)
          React to an update manager becoming available.
abstract  void run()
          Run method invoked from the updateManager.
 
Methods inherited from class org.apache.batik.bridge.UpdateManagerAdapter
managerResumed, managerStopped, managerSuspended, updateCompleted, updateFailed, updateStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

component

private org.apache.batik.swing.svg.AbstractJSVGComponent component
The component we are attached to, and that we might need to unregister with.

Constructor Detail

RunWhenReadyAndVisible

public RunWhenReadyAndVisible()
Try to either hook into the UpdateRunnableQueue, or wait for an updateManager to become available.

Method Detail

hook

public final void hook(org.apache.batik.swing.svg.AbstractJSVGComponent component)
Hook to the given component, schedule update.

Parameters:
component - The component to hook to.

managerStarted

public void managerStarted(org.apache.batik.bridge.UpdateManagerEvent e)
React to an update manager becoming available.

Specified by:
managerStarted in interface org.apache.batik.bridge.UpdateManagerListener
Overrides:
managerStarted in class org.apache.batik.bridge.UpdateManagerAdapter

run

public abstract void run()
Run method invoked from the updateManager.

Specified by:
run in interface Runnable

Release 0.2 (2009-07-06_1820)