edu.rice.cs.hpc.viewer.util.Utilities Class Reference

Class providing auxiliary utilities methods. More...

Collaboration diagram for edu.rice.cs.hpc.viewer.util.Utilities:
Collaboration graph
[legend]

List of all members.

Static Public Member Functions

static void setFontMetric (Display display)
 Set the font for the metric columns (it may be different to other columns) This method has to be called first before others.
static void setFontMetric (IWorkbenchWindow window, FontData objFontMetric[], FontData objFontGeneric[])
 Set a new font for metric and generic view.
static boolean isDifferentFontData (FontData fontTarget[], FontData fontSource[])
static void dispose ()
static void resetView (TreeViewer tree)
static void listenerToResetRowHeight (TreeViewer tree)
 activate a listener to reset Row Height for Windows only
static void resetViewRowHeight (TreeViewer tree)
 refresh size of rows for a particular view - non Windows
static void increaseFont (IWorkbenchWindow window)
 Increment font size.
static void DecreaseFont (IWorkbenchWindow window)
 Decrement font size.
static void insertTopRow (TreeViewer treeViewer, Image imgScope, String[]arrText)
 Insert an item on the top on the tree/table with additional image if not null.
static String[] getTopRowItems (TreeViewer treeViewer)
 Retrieve the top row items into a list of string.
static Image getScopeNavButton (Scope scope)
 Return an image depending on the scope of the node.
static Image getInlineNavButton (ProcedureScope proc)
static boolean isFileReadable (Scope scope)
 Verify if the file exist or not.
static Experiment getActiveExperiment (IWorkbenchWindow window)

Static Public Attributes

static Font fontMetric
static Font fontGeneral
static Color COLOR_TOP
static String NEW_LINE = System.getProperty("line.separator")

Static Package Functions

static ArrayList< BaseScopeViewgetTopView (IWorkbenchWindow window)

Static Private Member Functions

static void storePreferenceFonts ()
static void resetAllViews (IWorkbenchWindow window)
 Refresh all the views.
static void resetView (TreeItemManager objItemManager, TreeViewer tree)
 refresh a particular view To save memory allocation, we ask an instance of TreeItemManager
static void setFontMetric (IWorkbenchWindow window, int iFontSize)
 Update the font for metric pane with one single font (just take the size).

Detailed Description

Class providing auxiliary utilities methods.

Remark: it is useless to instantiate this class since all its methods are static !

Author:
laksono

Definition at line 54 of file Utilities.java.


Member Function Documentation

static void edu.rice.cs.hpc.viewer.util.Utilities.DecreaseFont ( IWorkbenchWindow  window  )  [static]

Decrement font size.

Parameters:
window 

Definition at line 363 of file Utilities.java.

static void edu.rice.cs.hpc.viewer.util.Utilities.dispose (  )  [static]

Definition at line 185 of file Utilities.java.

References edu.rice.cs.hpc.viewer.util.Utilities.COLOR_TOP.

static Experiment edu.rice.cs.hpc.viewer.util.Utilities.getActiveExperiment ( IWorkbenchWindow  window  )  [static]
static Image edu.rice.cs.hpc.viewer.util.Utilities.getInlineNavButton ( ProcedureScope  proc  )  [static]
static Image edu.rice.cs.hpc.viewer.util.Utilities.getScopeNavButton ( Scope  scope  )  [static]

Return an image depending on the scope of the node.

The criteria is based on ScopeTreeCellRenderer.getScopeNavButton()

Parameters:
scope 
Returns:

Definition at line 420 of file Utilities.java.

static String [] edu.rice.cs.hpc.viewer.util.Utilities.getTopRowItems ( TreeViewer  treeViewer  )  [static]

Retrieve the top row items into a list of string.

Parameters:
treeViewer 
Returns:

Definition at line 397 of file Utilities.java.

static ArrayList<BaseScopeView> edu.rice.cs.hpc.viewer.util.Utilities.getTopView ( IWorkbenchWindow  window  )  [static, package]

Definition at line 259 of file Utilities.java.

static void edu.rice.cs.hpc.viewer.util.Utilities.increaseFont ( IWorkbenchWindow  window  )  [static]

Increment font size.

Parameters:
window 

Definition at line 354 of file Utilities.java.

static void edu.rice.cs.hpc.viewer.util.Utilities.insertTopRow ( TreeViewer  treeViewer,
Image  imgScope,
String[]  arrText 
) [static]

Insert an item on the top on the tree/table with additional image if not null.

Parameters:
treeViewer : the tree viewer
imgScope : the icon for the tree node
arrText : the label of the items (started from col 0..n-1)

Definition at line 373 of file Utilities.java.

static boolean edu.rice.cs.hpc.viewer.util.Utilities.isDifferentFontData ( FontData  fontTarget[],
FontData  fontSource[] 
) [static]

Definition at line 160 of file Utilities.java.

Referenced by edu.rice.cs.hpc.viewer.util.Utilities.setFontMetric().

static boolean edu.rice.cs.hpc.viewer.util.Utilities.isFileReadable ( Scope  scope  )  [static]

Verify if the file exist or not.

Remark: we will update the flag that indicates the availability of the source code in the scope level. The reason is that it is less time consuming (apparently) to access to the scope level instead of converting and checking into FileSystemSourceFile level.

Parameters:
scope 
Returns:
true if the source is available. false otherwise

Definition at line 461 of file Utilities.java.

References edu.rice.cs.hpc.data.experiment.scope.Scope.getSourceFile(), edu.rice.cs.hpc.data.experiment.source.FileSystemSourceFile.isAvailable(), edu.rice.cs.hpc.data.experiment.source.SourceFile.isAvailable(), edu.rice.cs.hpc.data.experiment.scope.Scope.iSourceCodeAvailability, and edu.rice.cs.hpc.data.experiment.source.SourceFile.NONE.

static void edu.rice.cs.hpc.viewer.util.Utilities.listenerToResetRowHeight ( TreeViewer  tree  )  [static]

activate a listener to reset Row Height for Windows only

Parameters:
tree 

Definition at line 302 of file Utilities.java.

static void edu.rice.cs.hpc.viewer.util.Utilities.resetAllViews ( IWorkbenchWindow  window  )  [static, private]

Refresh all the views.

Parameters:
window,: the target window

Definition at line 209 of file Utilities.java.

References edu.rice.cs.hpc.viewer.window.ViewerWindow.getDatabases().

Referenced by edu.rice.cs.hpc.viewer.util.Utilities.setFontMetric().

static void edu.rice.cs.hpc.viewer.util.Utilities.resetView ( TreeItemManager  objItemManager,
TreeViewer  tree 
) [static, private]

refresh a particular view To save memory allocation, we ask an instance of TreeItemManager

Parameters:
objItemManager 
tree 

Definition at line 288 of file Utilities.java.

References edu.rice.cs.hpc.viewer.util.Utilities.resetViewRowHeight(), edu.rice.cs.hpc.viewer.util.TreeItemManager.restoreContext(), and edu.rice.cs.hpc.viewer.util.TreeItemManager.saveContext().

static void edu.rice.cs.hpc.viewer.util.Utilities.resetView ( TreeViewer  tree  )  [static]

Definition at line 276 of file Utilities.java.

static void edu.rice.cs.hpc.viewer.util.Utilities.resetViewRowHeight ( TreeViewer  tree  )  [static]

refresh size of rows for a particular view - non Windows

Parameters:
tree 

Definition at line 325 of file Utilities.java.

Referenced by edu.rice.cs.hpc.viewer.util.Utilities.resetView().

static void edu.rice.cs.hpc.viewer.util.Utilities.setFontMetric ( IWorkbenchWindow  window,
int  iFontSize 
) [static, private]

Update the font for metric pane with one single font (just take the size).

Parameters:
objFontData 

Definition at line 337 of file Utilities.java.

References edu.rice.cs.hpc.viewer.util.Utilities.setFontMetric().

static void edu.rice.cs.hpc.viewer.util.Utilities.setFontMetric ( IWorkbenchWindow  window,
FontData  objFontMetric[],
FontData  objFontGeneric[] 
) [static]

Set a new font for metric and generic view.

Parameters:
window 
objFontMetric 
objFontGeneric 

Definition at line 114 of file Utilities.java.

References edu.rice.cs.hpc.viewer.window.ViewerWindow.getWinObj(), edu.rice.cs.hpc.viewer.util.Utilities.isDifferentFontData(), and edu.rice.cs.hpc.viewer.util.Utilities.resetAllViews().

static void edu.rice.cs.hpc.viewer.util.Utilities.setFontMetric ( Display  display  )  [static]

Set the font for the metric columns (it may be different to other columns) This method has to be called first before others.

Parameters:
display 

Definition at line 70 of file Utilities.java.

References edu.rice.cs.hpc.viewer.util.Utilities.COLOR_TOP.

Referenced by edu.rice.cs.hpc.viewer.util.Utilities.setFontMetric().

static void edu.rice.cs.hpc.viewer.util.Utilities.storePreferenceFonts (  )  [static, private]

Definition at line 199 of file Utilities.java.


Member Data Documentation

Definition at line 58 of file Utilities.java.

Definition at line 56 of file Utilities.java.

String edu.rice.cs.hpc.viewer.util.Utilities.NEW_LINE = System.getProperty("line.separator") [static]

Definition at line 63 of file Utilities.java.


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

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1