www.sdmetrics.com

sdmetrics.app
Class TreeViewCC

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

public class TreeViewCC
extends java.lang.Object

Class to provide the tree representations of connected components.


Constructor Summary
TreeViewCC(sdmetrics.metrics.MetricsEngine me)
          Constructor.
 
Method Summary
 DataTable getCCDataTable()
          Obtain a data table with the values of the connected component metrics for all model elements.
 java.lang.String[] getCCMetricsList()
          Get the descriptions of the available connected component metrics.
 javax.swing.tree.DefaultMutableTreeNode getConnectedComponents(int metric, int element)
          Obtain a tree showing the connected components for a particual metric and element.
 java.lang.String getMetricName(int index)
          Get the name of a connected component metric.
 int getMetricType(int index)
          Get the model element type for which a connected component metric is defined.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeViewCC

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

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

getCCMetricsList

public java.lang.String[] getCCMetricsList()
Get the descriptions of the available connected component metrics.

Returns:
A string array with descriptions for each available "connectedcomponent" metric.

getMetricName

public java.lang.String getMetricName(int index)
Get the name of a connected component metric.

Parameters:
index - Index of the connected component metric. The index corresponds to the index of the metrics in the list returned by getCCMetricsList().
Returns:
Name of the connected component metric.

getMetricType

public int getMetricType(int index)
Get the model element type for which a connected component metric is defined.

Parameters:
index - Index of the connected component metric. The index corresponds to the index of the metrics in the list returned by getCCMetricsList().
Returns:
Model element type for which the the connected component metric is defined.

getCCDataTable

public DataTable getCCDataTable()
Obtain a data table with the values of the connected component metrics for all model elements. There is one table for each metric, each table has one column with the metric values.

Returns:
DataTable with the values of the connected component metrics.

getConnectedComponents

public javax.swing.tree.DefaultMutableTreeNode getConnectedComponents(int metric,
                                                                      int element)
Obtain a tree showing the connected components for a particual metric and element.

Parameters:
metric - Index of the connected component metric to show. The index corresponds to the index of the metrics in the list returned by getCCMetricsList().
element - Index of the element for which to display the connected components. The index corresponds to the element's index in the ElementPool.
Returns:
Root node of the tree.

www.sdmetrics.com