1 /******************************************************************************
2 * Copyright (c) 2015 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
10 package org
.eclipse
.tracecompass
.analysis
.timing
.ui
.views
.segmentstore
.density
;
12 import org
.eclipse
.jface
.action
.Action
;
13 import org
.eclipse
.jface
.resource
.ImageDescriptor
;
14 import org
.eclipse
.tracecompass
.analysis
.timing
.ui
.views
.segmentstore
.AnalysisTimingImageConstants
;
15 import org
.eclipse
.tracecompass
.common
.core
.NonNullUtils
;
16 import org
.eclipse
.tracecompass
.internal
.analysis
.timing
.ui
.Activator
;
17 import org
.swtchart
.Range
;
20 * Zoom action for the density view
22 class ZoomOutAction
extends Action
{
24 private final AbstractSegmentStoreDensityView fView
;
27 * Constructors a ZoomOutAction.
29 * @param densityViewer
30 * The parent density viewer
32 public ZoomOutAction(AbstractSegmentStoreDensityView densityViewer
) {
33 fView
= densityViewer
;
38 final AbstractSegmentStoreDensityViewer chart
= fView
.getDensityViewer();
40 chart
.zoom(new Range(0, Long
.MAX_VALUE
));
45 public ImageDescriptor
getImageDescriptor() {
46 return NonNullUtils
.checkNotNull(Activator
.getDefault().getImageDescripterFromPath(AnalysisTimingImageConstants
.IMG_UI_ZOOM_OUT_MENU
));
50 public String
getToolTipText() {
51 return NonNullUtils
.checkNotNull(Messages
.AbstractSegmentStoreDensityViewer_ZoomOutActionToolTipText
);