edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg Class Reference

Inheritance diagram for edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg:
Inheritance graph
[legend]
Collaboration diagram for edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg:
Collaboration graph
[legend]

List of all members.

Public Types

enum  MetricDisplayFormat { Default, Percent, Custom }

Public Member Functions

 ExtDerivedMetricDlg (Shell parentShell, Experiment exp)
 Constructor to accept Metrics.
 ExtDerivedMetricDlg (Shell parent, Experiment exp, Scope s)
void setMetrics (BaseMetric[]listOfMetrics)
void setMetric (DerivedMetric metric)
DerivedMetric getMetric ()
void okPressed ()
 Call back method when the OK button is pressed.

Protected Member Functions

Control createContents (Composite parent)
 Creates the dialog's contents.
Control createDialogArea (Composite parent)

Private Member Functions

void insertMetricToFormula (String signToPrepend, int selection_index)
boolean checkExpression ()
 check if the expression is correct
boolean checkFormat ()
boolean evaluateExpression (Expression objExpression)
 Run the evaluation.
DerivedMetric doAction ()

Private Attributes

final String FORMAT_PERCENT = "%.2f %%"
Combo cbName
Combo cbExpression
Button btnPercent
Text txtFormat
Button btnCustomFormat
Button btnPercentFormat
Button btnDefaultFormat
String[] arrStrMetrics
Expression expFormula
final ExtFuncMap fctMap
final MetricVarMap varMap
DerivedMetric metric
Experiment experiment
Point expression_position
UserInputHistory objHistoryFormula
UserInputHistory objHistoryName

Static Private Attributes

static final String HISTORY_FORMULA = "formula"
static final String HISTORY_METRIC_NAME = "metric_name"

Detailed Description

Author:
la5 Dialog box to enter a math formula to define a derived metric

Definition at line 48 of file ExtDerivedMetricDlg.java.


Member Enumeration Documentation

Enumerator:
Default 
Percent 
Custom 

Definition at line 50 of file ExtDerivedMetricDlg.java.


Constructor & Destructor Documentation

edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.ExtDerivedMetricDlg ( Shell  parentShell,
Experiment  exp 
)

Constructor to accept Metrics.

Parameters:
parentShell 
listOfMetrics 

Definition at line 92 of file ExtDerivedMetricDlg.java.

edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.ExtDerivedMetricDlg ( Shell  parent,
Experiment  exp,
Scope  s 
)

Member Function Documentation

boolean edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.checkExpression (  )  [private]
boolean edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.checkFormat (  )  [private]
Control edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.createContents ( Composite  parent  )  [protected]

Creates the dialog's contents.

Parameters:
parent the parent composite
Returns:
Control

Definition at line 114 of file ExtDerivedMetricDlg.java.

Control edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.createDialogArea ( Composite  parent  )  [protected]

Definition at line 131 of file ExtDerivedMetricDlg.java.

References edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.arrStrMetrics, edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.btnCustomFormat, edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.btnDefaultFormat, edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.btnPercent, edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.btnPercentFormat, edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.cbExpression, edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.cbName, edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.expression_position, edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.fctMap, edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.FORMAT_PERCENT, edu.rice.cs.hpc.data.experiment.metric.BaseMetric.getAnnotationType(), edu.rice.cs.hpc.data.experiment.metric.BaseMetric.getDisplayFormat(), edu.rice.cs.hpc.data.experiment.metric.BaseMetric.getDisplayName(), edu.rice.cs.hpc.data.experiment.metric.DerivedMetric.getFormula(), com.graphbuilder.math.FuncMap.getFunctionNames(), com.graphbuilder.math.FuncMap.getFunctions(), edu.rice.cs.hpc.common.util.UserInputHistory.getHistory(), edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.HISTORY_FORMULA, edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.insertMetricToFormula(), com.graphbuilder.math.FuncMap.loadDefaultFunctions(), edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.metric, edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.objHistoryFormula, edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.objHistoryName, com.graphbuilder.math.Expression.toString(), and edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.txtFormat.

DerivedMetric edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.doAction (  )  [private]
boolean edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.evaluateExpression ( Expression  objExpression  )  [private]
DerivedMetric edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.getMetric (  ) 
void edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.insertMetricToFormula ( String  signToPrepend,
int  selection_index 
) [private]
void edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.okPressed (  ) 
void edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.setMetric ( DerivedMetric  metric  ) 
void edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.setMetrics ( BaseMetric[]  listOfMetrics  ) 

Member Data Documentation

final String edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.HISTORY_FORMULA = "formula" [static, private]
final String edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.HISTORY_METRIC_NAME = "metric_name" [static, private]

Definition at line 76 of file ExtDerivedMetricDlg.java.


The documentation for this class was generated from the following file:

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1