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

This class adds support for the MetricLabelProvider extension point in the viewer. More...

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

List of all members.

Classes

class  ExtensionSafeRunnable
 Runnable class to make sure that the execution of an extension doesn't perturb the current view. More...

Public Member Functions

 MetricLabelProvider (BaseMetric metricNew)
Font getFont (Object element)
String getText (Object element)
Color getBackground (final Object element)
 This method will check to see if anyone has extended this label provider.
Color getForeground (final Object element)
 This method will check to see if anyone has extended this label provider.
boolean isEnabled ()
void setScope (Object scope)
void setMetric (Object metric)
Color getBackground (Object element)
Color getForeground (Object element)

Protected Attributes

Scope scope = null
BaseMetric metric = null

Private Types

enum  MethodFlag { TEXT, FONT, FOREGROUND, BACKGROUND }

Private Member Functions

boolean runExtension (ExtensionSafeRunnable run, Object element, MethodFlag mf)

Private Attributes

IMetricLabelProvider extLabelProvider [] = null
ExtensionSafeRunnable runnable = null

Static Private Attributes

static final String METRIC_LABEL_PROVIDER_ID = "edu.rice.cs.hpc.viewer.metric.metricLabelProvider"

Detailed Description

This class adds support for the MetricLabelProvider extension point in the viewer.

Author:
mohrg

Definition at line 20 of file MetricLabelProvider.java.


Member Enumeration Documentation

Enumerator:
TEXT 
FONT 
FOREGROUND 
BACKGROUND 

Definition at line 21 of file MetricLabelProvider.java.


Constructor & Destructor Documentation

edu.rice.cs.hpc.viewer.metric.MetricLabelProvider.MetricLabelProvider ( BaseMetric  metricNew  ) 

Member Function Documentation

Color edu.rice.cs.hpc.viewer.metric.IMetricLabelProvider.getBackground ( Object  element  )  [inherited]
Color edu.rice.cs.hpc.viewer.metric.MetricLabelProvider.getBackground ( final Object  element  ) 

This method will check to see if anyone has extended this label provider.

If it finds an extension it will create an instance of the extending class and call its 0 argument constructor. Then it calls setters in that class to give it the scope, metric, and metric value for the tree viewer cell for which we are providing a label. Next it will call the getBackground method in the extending class to allow it to provide a background color that will be used in this cell. If an extension is not found this method just returns null to prevent the use of color in this tree viewer cell.

Parameters:
element (actually the program scope)
Returns:

Reimplemented from edu.rice.cs.hpc.viewer.metric.BaseMetricLabelProvider.

Definition at line 108 of file MetricLabelProvider.java.

References edu.rice.cs.hpc.viewer.metric.MetricLabelProvider.ExtensionSafeRunnable.getResult(), edu.rice.cs.hpc.viewer.metric.MetricLabelProvider.runExtension(), and edu.rice.cs.hpc.viewer.metric.MetricLabelProvider.runnable.

Font edu.rice.cs.hpc.viewer.metric.MetricLabelProvider.getFont ( Object  element  ) 
Color edu.rice.cs.hpc.viewer.metric.IMetricLabelProvider.getForeground ( Object  element  )  [inherited]
Color edu.rice.cs.hpc.viewer.metric.MetricLabelProvider.getForeground ( final Object  element  ) 

This method will check to see if anyone has extended this label provider.

If it finds an extension it will create an instance of the extending class and call its 0 argument constructor. Then it calls setters in that class to give it the scope, metric, and metric value for the tree viewer cell for which we are providing a label. Next it will call the getForeground method in the extending class to allow it to provide a foreground color that will be used in this cell. If an extension is not found this method just returns null to prevent the use of color in this tree viewer cell.

Parameters:
element (actually the program scope)
Returns:

Reimplemented from edu.rice.cs.hpc.viewer.metric.BaseMetricLabelProvider.

Definition at line 131 of file MetricLabelProvider.java.

References edu.rice.cs.hpc.viewer.metric.MetricLabelProvider.ExtensionSafeRunnable.getResult(), edu.rice.cs.hpc.viewer.metric.MetricLabelProvider.runExtension(), and edu.rice.cs.hpc.viewer.metric.MetricLabelProvider.runnable.

String edu.rice.cs.hpc.viewer.metric.MetricLabelProvider.getText ( Object  element  ) 
boolean edu.rice.cs.hpc.viewer.metric.BaseMetricLabelProvider.isEnabled (  )  [inherited]
boolean edu.rice.cs.hpc.viewer.metric.MetricLabelProvider.runExtension ( ExtensionSafeRunnable  run,
Object  element,
MethodFlag  mf 
) [private]
void edu.rice.cs.hpc.viewer.metric.BaseMetricLabelProvider.setMetric ( Object  metric  )  [inherited]
void edu.rice.cs.hpc.viewer.metric.BaseMetricLabelProvider.setScope ( Object  scope  )  [inherited]

Member Data Documentation

final String edu.rice.cs.hpc.viewer.metric.MetricLabelProvider.METRIC_LABEL_PROVIDER_ID = "edu.rice.cs.hpc.viewer.metric.metricLabelProvider" [static, private]

Definition at line 17 of file BaseMetricLabelProvider.java.


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

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1