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 in. It should do the same action as one ctrl+mouse-scroll.
23 * @author Alexandre Montplaisir
25 class ZoomInButton
extends Button
{
27 private static final String ZOOM_IN_ICON_PATH
= "/icons/toolbar/zoom_in.gif"; //$NON-NLS-1$
29 public ZoomInButton(TimeGraphWidget viewer
) {
30 Image icon
= JfxImageFactory
.instance().getImageFromResource(ZOOM_IN_ICON_PATH
);
31 setGraphic(new ImageView(icon
));
32 setTooltip(new Tooltip(Messages
.sfZoomInActionDescription
));
34 viewer
.getZoomActions().zoom(true, false, null);