de.cau.cs.kieler.kwebs.client.layout
Class RemoteGraphLayoutEngine

java.lang.Object
  extended by de.cau.cs.kieler.kwebs.client.layout.RemoteGraphLayoutEngine
All Implemented Interfaces:
IGraphLayoutEngine, EventListener, IPropertyChangeListener

public class RemoteGraphLayoutEngine
extends Object
implements IGraphLayoutEngine, IPropertyChangeListener

This class is used to calculate the layout of a graph using a remote layout service.

Rating proposed yellow
(2011-08-02) reviewed by ckru, mri, msp

Constructor Summary
RemoteGraphLayoutEngine()
          Creates a layout engine for remote layout.
 
Method Summary
protected  void finalize()
          
 boolean isActive()
          Determine whether the layout engine is active.
 void layout(KNode layoutGraph, IKielerProgressMonitor progressMonitor)
          Performs remote layout on the given layout graph.
 void propertyChange(PropertyChangeEvent event)
          Listen to preference changes and update service client on change of service address.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteGraphLayoutEngine

public RemoteGraphLayoutEngine()
Creates a layout engine for remote layout.

Method Detail

finalize

protected final void finalize()
                       throws Throwable

Overrides:
finalize in class Object
Throws:
Throwable

layout

public final void layout(KNode layoutGraph,
                         IKielerProgressMonitor progressMonitor)
Performs remote layout on the given layout graph.

Specified by:
layout in interface IGraphLayoutEngine
Parameters:
layoutGraph - instance of a layout graph
progressMonitor - monitor to which progress of the layout algorithms is reported

propertyChange

public final void propertyChange(PropertyChangeEvent event)
Listen to preference changes and update service client on change of service address.

Specified by:
propertyChange in interface IPropertyChangeListener
Parameters:
event - the property change event

isActive

public boolean isActive()
Determine whether the layout engine is active.

Specified by:
isActive in interface IGraphLayoutEngine
Returns:
true if the engine is active