2 * Copyright (C) 2017 EfficiOS Inc., Alexandre Montplaisir <alexmonthy@efficios.com>
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
10 package org
.lttng
.scope
.tmf2
.views
.ui
.timeline
.widgets
.timegraph
.toolbar
;
12 import org
.lttng
.scope
.tmf2
.views
.ui
.jfx
.JfxImageFactory
;
13 import org
.lttng
.scope
.tmf2
.views
.ui
.timeline
.widgets
.timegraph
.TimeGraphWidget
;
15 import javafx
.scene
.control
.Button
;
16 import javafx
.scene
.control
.Tooltip
;
17 import javafx
.scene
.image
.Image
;
18 import javafx
.scene
.image
.ImageView
;
21 * Button for zooming out. It should do the same action as one
24 * @author Alexandre Montplaisir
26 class ZoomOutButton
extends Button
{
28 private static final String ZOOM_OUT_ICON_PATH
= "/icons/toolbar/zoom_out.gif"; //$NON-NLS-1$
30 public ZoomOutButton(TimeGraphWidget viewer
) {
31 Image icon
= JfxImageFactory
.instance().getImageFromResource(ZOOM_OUT_ICON_PATH
);
32 setGraphic(new ImageView(icon
));
33 setTooltip(new Tooltip(Messages
.sfZoomOutActionDescription
));
35 viewer
.getZoomActions().zoom(false, false, null);