tmf: Move plugins to the Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / handlers / MoveSDRight.java
1 /**********************************************************************
2 * Copyright (c) 2005, 2013 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.linuxtools.tmf.ui.views.uml2sd.handlers;
14
15 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
16 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDWidget;
17
18 /**
19 * Action class implementation to move right in the sequence diagram view within a page.
20 *
21 * @version 1.0
22 * @author sveyrier
23 *
24 */
25
26 public class MoveSDRight extends BaseSDAction {
27
28 // ------------------------------------------------------------------------
29 // Constants
30 // ------------------------------------------------------------------------
31 /**
32 * The action ID.
33 */
34 public static final String ID = "org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.MoveSDRight"; //$NON-NLS-1$
35
36 // ------------------------------------------------------------------------
37 // Constructors
38 // ------------------------------------------------------------------------
39 /**
40 * Default constructor
41 */
42 public MoveSDRight() {
43 this(null);
44 }
45
46 /**
47 * Constructor
48 *
49 * @param view a sequence diagram view reference
50 */
51 public MoveSDRight(SDView view) {
52 super(view);
53 setId(ID);
54 setActionDefinitionId(ID);
55 }
56
57 // ------------------------------------------------------------------------
58 // Methods
59 // ------------------------------------------------------------------------
60
61 @Override
62 public void run() {
63
64 if (getView() == null) {
65 return;
66 }
67
68 SDWidget viewer = getView().getSDWidget();
69 if (viewer != null) {
70 viewer.scrollBy(+viewer.getVisibleWidth(), 0);
71 }
72 }
73 }
This page took 0.033223 seconds and 5 git commands to generate.