Import views plugins
[deliverable/tracecompass.git] / tmf / org.lttng.scope.tmf2.views.ui / src / org / lttng / scope / tmf2 / views / ui / timeline / widgets / timegraph / toolbar / nav / NavigationModeFollowArrows.java
1 /*
2 * Copyright (C) 2017 EfficiOS Inc., Alexandre Montplaisir <alexmonthy@efficios.com>
3 *
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 */
9
10 package org.lttng.scope.tmf2.views.ui.timeline.widgets.timegraph.toolbar.nav;
11
12 import static java.util.Objects.requireNonNull;
13
14 import org.lttng.scope.tmf2.views.ui.timeline.widgets.timegraph.TimeGraphWidget;
15
16 /**
17 * Navigation mode using drawn arrows.
18 *
19 * If we are currently positioned at an arrow endpoint, it follow the arrow to
20 * its other endpoint, scrolling vertically if needed.
21 *
22 * If we are not at an arrow endpoint, following the current entry backwards or
23 * forwards until we find one. If we don't find any, do nothing.
24 *
25 * @author Alexandre Montplaisir
26 */
27 public class NavigationModeFollowArrows extends NavigationMode {
28
29 private static final String BACK_ICON_PATH = "/icons/toolbar/nav_arrow_back.gif"; //$NON-NLS-1$
30 private static final String FWD_ICON_PATH = "/icons/toolbar/nav_arrow_fwd.gif"; //$NON-NLS-1$
31
32 /**
33 * Constructor
34 */
35 public NavigationModeFollowArrows() {
36 super(requireNonNull(Messages.sfFollowArrowsNavModeName),
37 BACK_ICON_PATH,
38 FWD_ICON_PATH);
39 }
40
41 @Override
42 public boolean isEnabled() {
43 return false;
44 }
45
46 @Override
47 public void navigateBackwards(TimeGraphWidget viewer) {
48 // TODO NYI
49 System.out.println("Follow arrows backwards");
50 }
51
52 @Override
53 public void navigateForwards(TimeGraphWidget viewer) {
54 // TODO NYI
55 System.out.println("Follow arrows forwards");
56 }
57
58 }
This page took 0.032221 seconds and 5 git commands to generate.