edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas Class Reference

Inheritance diagram for edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas:
Inheritance graph
[legend]
Collaboration diagram for edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SpaceTimeMiniCanvas (Composite _composite)
 Creates a SpaceTimeMiniCanvas with the given parameters.
void dispose ()
void updateView (SpaceTimeDataController _stData)
void updateView ()
void paintControl (PaintEvent event)
 The painting of the miniMap.
double getScalePixelsPerTime ()
 Gets the scale in the X-direction (pixels per time unit).
double getScalePixelsPerRank ()
 Gets the scale in the Y-direction (pixels per process).
void mouseDown (MouseEvent e)
void mouseUp (MouseEvent e)
void mouseMove (MouseEvent e)
void mouseDoubleClick (MouseEvent e)
void historyNotification (final OperationHistoryEvent event)
void setSpaceTimeData (SpaceTimeDataController dataTraces)
void widgetDisposed (DisposeEvent e)

Protected Member Functions

void initBuffer ()
void setBuffer (Image buffer)
Image getBuffer ()

Protected Attributes

SpaceTimeDataController stData
 The SpaceTimeData corresponding to this canvas.
Image imageBuffer

Package Types

enum  MouseState { ST_MOUSE_INIT, ST_MOUSE_NONE, ST_MOUSE_DOWN }

Private Member Functions

Pattern createStripePattern ()
void setBox (Frame frame)
 The painting of the miniMap.
void moveBox (Point mouseCurrent)
 Moves white box to correspond to where mouse has moved to.
void confirmNewRegion ()
 Scales coordinates and sends them to detailCanvas.
void notifyRegionChangeOperation (Frame frame)
int getHighestY ()
int getLowestY ()
void adjustSelection (Point p1, Point p2)
 Updates the selectionBox on the MiniMap to have corners at p1 and p2.
void checkRegion (Rectangle region)

Private Attributes

MouseState mouseState
 Relates to the condition that the mouse is in.
Point mouseDown
 The point at which the mouse was clicked.
Point mousePrevious
 The point at which the mouse was on.
Point mouseUp
 The point at which the mouse was released.
boolean insideBox
 Determines whether the first mouse click was inside the box or not.
Rectangle view
final Color COMPLETELY_FILTERED_OUT_COLOR
final Color NOT_FILTERED_OUT_COLOR
final Color COLOR_BLACK
final Color COLOR_GRAY
final Pattern PARTIALLY_FILTERED_PATTERN
 The pattern that we draw when we want to show that some ranks in the region aren't shown because of filtering.

Detailed Description

Definition at line 41 of file SpaceTimeMiniCanvas.java.


Member Enumeration Documentation

Enumerator:
ST_MOUSE_INIT 
ST_MOUSE_NONE 
ST_MOUSE_DOWN 

Definition at line 9 of file ITraceCanvas.java.


Constructor & Destructor Documentation

edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.SpaceTimeMiniCanvas ( Composite  _composite  ) 

Member Function Documentation

void edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.adjustSelection ( Point  p1,
Point  p2 
) [private]
void edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.checkRegion ( Rectangle  region  )  [private]
void edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.confirmNewRegion (  )  [private]
Pattern edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.createStripePattern (  )  [private]
void edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.dispose (  ) 
Image edu.rice.cs.hpc.traceviewer.painter.BufferedCanvas.getBuffer (  )  [protected, inherited]
int edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.getHighestY (  )  [private]
int edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.getLowestY (  )  [private]
double edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.getScalePixelsPerRank (  )  [virtual]
double edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.getScalePixelsPerTime (  )  [virtual]
void edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.historyNotification ( final OperationHistoryEvent  event  ) 
void edu.rice.cs.hpc.traceviewer.painter.BufferedCanvas.initBuffer (  )  [protected, inherited]
void edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.mouseDoubleClick ( MouseEvent  e  ) 

Definition at line 566 of file SpaceTimeMiniCanvas.java.

void edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.mouseMove ( MouseEvent  e  ) 
void edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.moveBox ( Point  mouseCurrent  )  [private]
void edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.notifyRegionChangeOperation ( Frame  frame  )  [private]
void edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.paintControl ( PaintEvent  event  ) 
void edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.setBox ( Frame  frame  )  [private]

The painting of the miniMap.

this is the original paintControl with Rectangles and labels

public void paintControl(PaintEvent event) { if (this.stData == null) return;

view.width = getClientArea().width; view.height = getClientArea().height;

IBaseData baseData = stData.getBaseData(); ArrayList<MiniCanvasRectangle> rectangles = new ArrayList<MiniCanvasRectangle>(); if (baseData.getFirstIncluded() != 0) { Rectangle rect = new Rectangle(0, 0, getClientArea().width, (int) (baseData.getFirstIncluded()*getScaleY())); rectangles.add(new MiniCanvasRectangle(SampleHiddenReason.FILTERED, true, rect)); } if (baseData.getLastIncluded() + 1 != baseData.getNumberOfRanks()) { int topY = (int) ((baseData.getLastIncluded()+1)*getScaleY()); Rectangle rect = new Rectangle(0, topY , getClientArea().width, getClientArea().height-topY); rectangles.add(new MiniCanvasRectangle(SampleHiddenReason.FILTERED, true, rect)); } This is the region shown in the detail view EnumSet<SampleHiddenReason> mainRegionReasons = EnumSet.noneOf(SampleHiddenReason.class); if (attributes.getProcessInterval() < attributes.numPixelsV) mainRegionReasons.add(SampleHiddenReason.VERTICAL_RESOLUTION); if (!baseData.isDenseBetweenFirstAndLast()) mainRegionReasons.add(SampleHiddenReason.FILTERED); if (mainRegionReasons.size() == 0) mainRegionReasons.add(SampleHiddenReason.NONE);

TODO: THESE ARE APPROXIMATIONS. LOOKING UP THE ACTUAL VALUE WOULD BE BETTER. int topPx = (int) ((baseData.getFirstIncluded() + attributes.getProcessBegin()) * getScaleY()); int height = (int)(attributes.getProcessInterval() * getScaleY()); Rectangle rect = new Rectangle( (int)(attributes.getTimeBegin() * getScaleX()), topPx, (int)(attributes.getTimeInterval() * getScaleX()), height); rectangles.add(new MiniCanvasRectangle(mainRegionReasons, false, rect));

TODO: None of the code above this point belongs in the paint method. Control[] oldChildren = this.getChildren(); for (int i = 0; i < oldChildren.length; i++) { oldChildren[i].dispose(); } for (MiniCanvasRectangle miniCanvasRectangle : rectangles) { miniCanvasRectangle.getControl(this); }

}Sets the white box in miniCanvas to correlate to spaceTimeDetailCanvas proportionally.

Definition at line 310 of file SpaceTimeMiniCanvas.java.

References edu.rice.cs.hpc.traceviewer.spaceTimeData.Frame.begProcess, edu.rice.cs.hpc.traceviewer.spaceTimeData.Frame.begTime, edu.rice.cs.hpc.traceviewer.spaceTimeData.Frame.endProcess, edu.rice.cs.hpc.traceviewer.spaceTimeData.Frame.endTime, edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.getScalePixelsPerRank(), edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.getScalePixelsPerTime(), edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.insideBox, edu.rice.cs.hpc.traceviewer.painter.SpaceTimeCanvas.stData, and edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.view.

Referenced by edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.historyNotification(), edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.mouseUp(), and edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.SpaceTimeMiniCanvas().

void edu.rice.cs.hpc.traceviewer.painter.BufferedCanvas.setBuffer ( Image  buffer  )  [protected, inherited]
void edu.rice.cs.hpc.traceviewer.painter.SpaceTimeCanvas.setSpaceTimeData ( SpaceTimeDataController  dataTraces  )  [inherited]
void edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.updateView (  ) 
void edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.updateView ( SpaceTimeDataController  _stData  ) 
void edu.rice.cs.hpc.traceviewer.painter.BufferedCanvas.widgetDisposed ( DisposeEvent  e  )  [inherited]

Member Data Documentation

The point at which the mouse was released.

Definition at line 54 of file SpaceTimeMiniCanvas.java.

Referenced by edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.mouseUp().

The pattern that we draw when we want to show that some ranks in the region aren't shown because of filtering.

Definition at line 69 of file SpaceTimeMiniCanvas.java.

Referenced by edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.dispose(), edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.paintControl(), and edu.rice.cs.hpc.traceviewer.misc.SpaceTimeMiniCanvas.SpaceTimeMiniCanvas().


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

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1