Class HistogramZoom
java.lang.Object
org.eclipse.tracecompass.tmf.ui.views.histogram.HistogramZoom
- All Implemented Interfaces:
EventListener,org.eclipse.swt.events.KeyListener,org.eclipse.swt.events.MouseWheelListener
public class HistogramZoom
extends Object
implements org.eclipse.swt.events.MouseWheelListener, org.eclipse.swt.events.KeyListener
Class to handle zooming within histogram windows..
- Version:
- 1.0
- Author:
- Francois Chouinard
-
Constructor Summary
ConstructorsConstructorDescriptionHistogramZoom(Histogram histogram, long start, long end) Standard constructor. -
Method Summary
Modifier and TypeMethodDescriptionlongGet the duration of the zoom window.longGet the end time of the zoom window.longGet start time of the zoom window.voidkeyPressed(org.eclipse.swt.events.KeyEvent e) voidkeyReleased(org.eclipse.swt.events.KeyEvent e) voidmouseScrolled(org.eclipse.swt.events.MouseEvent event) voidsetFullRange(long startTime, long endTime) The the full time range of the histogramvoidsetNewRange(long startTime, long duration) Sets the new zoom window
-
Constructor Details
-
HistogramZoom
Standard constructor.- Parameters:
histogram- The parent histogram objectstart- The start time of the zoom areaend- The end time of the zoom area
-
-
Method Details
-
getStartTime
public long getStartTime()Get start time of the zoom window.- Returns:
- the start time.
-
getEndTime
public long getEndTime()Get the end time of the zoom window.- Returns:
- the end time
-
getDuration
public long getDuration()Get the duration of the zoom window.- Returns:
- the duration of the zoom window.
-
setFullRange
public void setFullRange(long startTime, long endTime) The the full time range of the histogram- Parameters:
startTime- the start time the histogramendTime- the end time of the histogram
-
setNewRange
public void setNewRange(long startTime, long duration) Sets the new zoom window- Parameters:
startTime- the start timeduration- the duration
-
mouseScrolled
public void mouseScrolled(org.eclipse.swt.events.MouseEvent event) - Specified by:
mouseScrolledin interfaceorg.eclipse.swt.events.MouseWheelListener
-
keyPressed
public void keyPressed(org.eclipse.swt.events.KeyEvent e) - Specified by:
keyPressedin interfaceorg.eclipse.swt.events.KeyListener
-
keyReleased
public void keyReleased(org.eclipse.swt.events.KeyEvent e) - Specified by:
keyReleasedin interfaceorg.eclipse.swt.events.KeyListener
-