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
,org.eclipse.swt.internal.SWTEventListener
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
ConstructorDescriptionHistogramZoom
(Histogram histogram, long start, long end) Standard constructor. -
Method Summary
Modifier and TypeMethodDescriptionlong
Get the duration of the zoom window.long
Get the end time of the zoom window.long
Get start time of the zoom window.void
keyPressed
(org.eclipse.swt.events.KeyEvent e) void
keyReleased
(org.eclipse.swt.events.KeyEvent e) void
mouseScrolled
(org.eclipse.swt.events.MouseEvent event) void
setFullRange
(long startTime, long endTime) The the full time range of the histogramvoid
setNewRange
(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:
mouseScrolled
in interfaceorg.eclipse.swt.events.MouseWheelListener
-
keyPressed
public void keyPressed(org.eclipse.swt.events.KeyEvent e) - Specified by:
keyPressed
in interfaceorg.eclipse.swt.events.KeyListener
-
keyReleased
public void keyReleased(org.eclipse.swt.events.KeyEvent e) - Specified by:
keyReleased
in interfaceorg.eclipse.swt.events.KeyListener
-