analysis: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / tmf / ui / views / uml2sd / handlers / MoveSDUp.java
1 /**********************************************************************
2 * Copyright (c) 2005, 2014 IBM Corporation, Ericsson
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM - Initial API and implementation
10 * Bernd Hufmann - Updated for TMF
11 **********************************************************************/
12
13 package org.eclipse.tracecompass.tmf.ui.views.uml2sd.handlers;
14
15 import org.eclipse.tracecompass.tmf.ui.views.uml2sd.SDView;
16 import org.eclipse.tracecompass.tmf.ui.views.uml2sd.SDWidget;
17
18 /**
19 * Action class implementation to move up in the sequence diagram view within a
20 * page.
21 *
22 * @version 1.0
23 * @author sveyrier
24 */
25 public class MoveSDUp extends BaseSDAction {
26
27 // ------------------------------------------------------------------------
28 // Constants
29 // ------------------------------------------------------------------------
30 /**
31 * The action ID.
32 */
33 public static final String ID = "org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.MoveSDUp"; //$NON-NLS-1$
34
35 // ------------------------------------------------------------------------
36 // Constructors
37 // ------------------------------------------------------------------------
38 /**
39 * Default constructor
40 */
41 public MoveSDUp() {
42 this(null);
43 }
44
45 /**
46 * Constructor
47 *
48 * @param view a sequence diagram view reference
49 */
50 public MoveSDUp(SDView view) {
51 super(view);
52 setId(ID);
53 setActionDefinitionId(ID);
54 }
55
56 // ------------------------------------------------------------------------
57 // Methods
58 // ------------------------------------------------------------------------
59
60 @Override
61 public void run() {
62 if (getView() == null) {
63 return;
64 }
65 SDWidget viewer = getView().getSDWidget();
66
67 if (viewer != null) {
68 viewer.scrollBy(0, -viewer.getVisibleHeight());
69 }
70 }
71 }
This page took 0.031235 seconds and 5 git commands to generate.