Public Member Functions | |
void | setMetric (BaseMetric newMetric) |
Update the metric for this column. | |
ColumnViewerSorter (TreeViewer viewer, TreeColumn column, BaseMetric newMetric, int colNum) | |
Class to sort a column. | |
void | setSorter (ColumnViewerSorter sorter, int direction) |
Sort the column according to the direction. | |
int | compare (Viewer viewer, Object e1, Object e2) |
general comparison for sorting | |
void | sort (Viewer viewer, Object[] elements) |
Static Public Attributes | |
static final int | ASC = 1 |
static final int | NONE = 0 |
static final int | DESC = -1 |
Protected Member Functions | |
int | doCompare (Viewer viewer, Object e1, Object e2) |
This method is to compare one object to another Please implement this method in the child class if necessary. | |
Private Member Functions | |
int | doCompare (Scope node1, Scope node2) |
Compare the names of node 1 and node 2. | |
Private Attributes | |
int | direction = 0 |
TreeColumn | column |
TreeViewer | viewer |
int | iColNumber |
BaseMetric | metric |
Definition at line 24 of file ColumnViewerSorter.java.
edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.ColumnViewerSorter | ( | TreeViewer | viewer, | |
TreeColumn | column, | |||
BaseMetric | newMetric, | |||
int | colNum | |||
) |
Class to sort a column.
viewer,: | the table tree | |
column,: | the column | |
newMetric,: | the metric | |
colNum,: | the position |
Definition at line 50 of file ColumnViewerSorter.java.
References edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.ASC, edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.DESC, edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.iColNumber, edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.metric, and edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.setSorter().
int edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.compare | ( | Viewer | viewer, | |
Object | e1, | |||
Object | e2 | |||
) |
general comparison for sorting
Definition at line 133 of file ColumnViewerSorter.java.
References edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.direction, and edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.doCompare().
int edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.doCompare | ( | Viewer | viewer, | |
Object | e1, | |||
Object | e2 | |||
) | [protected] |
This method is to compare one object to another Please implement this method in the child class if necessary.
Definition at line 164 of file ColumnViewerSorter.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValue.compareTo(), edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.doCompare(), edu.rice.cs.hpc.data.experiment.metric.BaseMetric.getValue(), edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.iColNumber, and edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.metric.
int edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.doCompare | ( | Scope | node1, | |
Scope | node2 | |||
) | [private] |
Compare the names of node 1 and node 2.
However, if both scopes are of type CallSiteScope, compare the line numbers of the nodes
node1 | ||
node2 |
Definition at line 145 of file ColumnViewerSorter.java.
References edu.rice.cs.hpc.data.experiment.scope.LineScope.getLineNumber(), edu.rice.cs.hpc.data.experiment.scope.CallSiteScope.getLineScope(), and edu.rice.cs.hpc.data.experiment.scope.Scope.getName().
Referenced by edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.compare(), and edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.doCompare().
void edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.setMetric | ( | BaseMetric | newMetric | ) |
Update the metric for this column.
newMetric |
Definition at line 40 of file ColumnViewerSorter.java.
References edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.metric.
Referenced by edu.rice.cs.hpc.viewer.scope.BaseScopeView.initTableColumns().
void edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.setSorter | ( | ColumnViewerSorter | sorter, | |
int | direction | |||
) |
Sort the column according to the direction.
sorter | ||
direction |
Definition at line 96 of file ColumnViewerSorter.java.
References edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.ASC, edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.column, edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.direction, edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.NONE, and edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.viewer.
Referenced by edu.rice.cs.hpc.viewer.scope.ScopeTreeViewer.addTreeColumn(), and edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.ColumnViewerSorter().
void edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.sort | ( | Viewer | viewer, | |
Object[] | elements | |||
) |
Definition at line 188 of file ColumnViewerSorter.java.
final int edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.ASC = 1 [static] |
Definition at line 26 of file ColumnViewerSorter.java.
Referenced by edu.rice.cs.hpc.viewer.scope.ScopeTreeViewer.addTreeColumn(), edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.ColumnViewerSorter(), and edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.setSorter().
TreeColumn edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.column [private] |
Definition at line 31 of file ColumnViewerSorter.java.
Referenced by edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.setSorter().
final int edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.DESC = -1 [static] |
Definition at line 28 of file ColumnViewerSorter.java.
Referenced by edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.ColumnViewerSorter().
int edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.direction = 0 [private] |
Definition at line 29 of file ColumnViewerSorter.java.
Referenced by edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.compare(), and edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.setSorter().
Definition at line 33 of file ColumnViewerSorter.java.
Referenced by edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.ColumnViewerSorter(), and edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.doCompare().
Definition at line 34 of file ColumnViewerSorter.java.
Referenced by edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.ColumnViewerSorter(), edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.doCompare(), and edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.setMetric().
final int edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.NONE = 0 [static] |
Definition at line 27 of file ColumnViewerSorter.java.
Referenced by edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.setSorter().
TreeViewer edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.viewer [private] |
Definition at line 32 of file ColumnViewerSorter.java.
Referenced by edu.rice.cs.hpc.viewer.scope.ColumnViewerSorter.setSorter().