de.cau.cs.kieler.kiml.grana.analyses
Class EdgeDirectionAnalysis

java.lang.Object
  extended by de.cau.cs.kieler.kiml.grana.analyses.EdgeDirectionAnalysis
All Implemented Interfaces:
IAnalysis

public class EdgeDirectionAnalysis
extends Object
implements IAnalysis

A drawing analysis that counts the number of edges going in each of the four directions. (top, left, bottom, right) An edge can go in two directions. Returns a four-component result (int top, int left, int bottom, int right).

Rating red

Field Summary
static int INDEX_BOTTOM
          Index of the number of edges going bottomwards in the result array.
static int INDEX_LEFT
          Index of the number of edges going leftwards in the result array.
static int INDEX_RIGHT
          Index of the number of edges going rightwards in the result array.
static int INDEX_TOP
          Index of the number of edges going topwards in the result array.
 
Constructor Summary
EdgeDirectionAnalysis()
           
 
Method Summary
 Object doAnalysis(KNode parentNode, Map<String,Object> results, IKielerProgressMonitor progressMonitor)
          Performs the actual analysis process and returns the results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INDEX_TOP

public static final int INDEX_TOP
Index of the number of edges going topwards in the result array.

See Also:
Constant Field Values

INDEX_LEFT

public static final int INDEX_LEFT
Index of the number of edges going leftwards in the result array.

See Also:
Constant Field Values

INDEX_BOTTOM

public static final int INDEX_BOTTOM
Index of the number of edges going bottomwards in the result array.

See Also:
Constant Field Values

INDEX_RIGHT

public static final int INDEX_RIGHT
Index of the number of edges going rightwards in the result array.

See Also:
Constant Field Values
Constructor Detail

EdgeDirectionAnalysis

public EdgeDirectionAnalysis()
Method Detail

doAnalysis

public Object doAnalysis(KNode parentNode,
                         Map<String,Object> results,
                         IKielerProgressMonitor progressMonitor)
Performs the actual analysis process and returns the results. If more than one component have been specified for the analysis in the extension the method is expected to return an array.

Specified by:
doAnalysis in interface IAnalysis
Parameters:
parentNode - the parent node which the analysis is performed on
results - the result of analyses that were performed before this one (it should include the results of all dependency analyses)
progressMonitor - progress monitor used to keep track of progress
Returns:
the analysis results