www.sdmetrics.com

sdmetrics.app
Class TreeViewCycles

java.lang.Object
  |
  +--sdmetrics.app.TreeViewCycles

public class TreeViewCycles
extends java.lang.Object

Class to provide the tree representations of cycles.


Nested Class Summary
 class TreeViewCycles.Node
          Class to represent a node in a "cycle" tree.
 
Constructor Summary
TreeViewCycles(sdmetrics.metrics.MetricsEngine me)
          Constructor.
 
Method Summary
 java.lang.String[] getCycleRuleList()
          Get the descriptions of the available cycle rules.
 TreeViewCycles.Node getCycleTree(int rule, boolean reverseDirection)
          Get the cycle tree for a rule.
 java.lang.String getRuleName(int index)
          Get the name of a cycle rule.
 int getRuleType(int index)
          Get the model element type for which a cycle rule is defined.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeViewCycles

public TreeViewCycles(sdmetrics.metrics.MetricsEngine me)
Constructor.

Parameters:
me - Metrics engine on which this tree is based.
Method Detail

getCycleRuleList

public java.lang.String[] getCycleRuleList()
Get the descriptions of the available cycle rules.

Returns:
A string array with descriptions for each available cycle" rule.

getRuleName

public java.lang.String getRuleName(int index)
Get the name of a cycle rule.

Parameters:
index - Index of the cycle rule. The index corresponds to the index of the rule in the list returned by getCycleRuleList().
Returns:
Name of the cycle rule.

getRuleType

public int getRuleType(int index)
Get the model element type for which a cycle rule is defined.

Parameters:
index - Index of the cycle rule. The index corresponds to the index of the rule in the list returned by getCycleRuleList().
Returns:
Model element type for which the cycle rule is defined.

getCycleTree

public TreeViewCycles.Node getCycleTree(int rule,
                                        boolean reverseDirection)
Get the cycle tree for a rule.

Parameters:
rule - Index of the rule. The index corresponds to the entry of the rule in the list returned by getCycleRuleList().
reverseDirection - If this is set to false, the children of a node are the nodes that the parent node depends on. If reverseDirection is true, the direction of the dependencies will be reversed: the children of a node are the nodes that depend on the parent node.
Returns:
Root node of the tree.

www.sdmetrics.com