tmf: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / tmf / ui / views / uml2sd / handlers / MoveSDLeft.java
CommitLineData
73005152 1/**********************************************************************
ed902a2b 2 * Copyright (c) 2005, 2014 IBM Corporation, Ericsson
73005152
BH
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
c8422608
AM
7 *
8 * Contributors:
9 * IBM - Initial API and implementation
10 * Bernd Hufmann - Updated for TMF
73005152 11 **********************************************************************/
c8422608 12
2bdf0193 13package org.eclipse.tracecompass.tmf.ui.views.uml2sd.handlers;
73005152 14
2bdf0193
AM
15import org.eclipse.tracecompass.tmf.ui.views.uml2sd.SDView;
16import org.eclipse.tracecompass.tmf.ui.views.uml2sd.SDWidget;
73005152
BH
17
18/**
df0b8ff4 19 * Action class implementation to move left in the sequence diagram view within a page.
c8422608 20 *
df0b8ff4 21 * @version 1.0
73005152 22 * @author sveyrier
c8422608 23 *
73005152 24 */
cab6c8ff 25public class MoveSDLeft extends BaseSDAction {
73005152
BH
26
27 // ------------------------------------------------------------------------
df0b8ff4 28 // Constants
73005152 29 // ------------------------------------------------------------------------
df0b8ff4
BH
30 /**
31 * The action ID.
32 */
f26e290b 33 public static final String ID = "org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.MoveSDLeft"; //$NON-NLS-1$
c8422608 34
73005152
BH
35 // ------------------------------------------------------------------------
36 // Constructors
37 // ------------------------------------------------------------------------
df0b8ff4
BH
38 /**
39 * Default constructor
40 */
73005152
BH
41 public MoveSDLeft(){
42 this(null);
43 }
44
df0b8ff4
BH
45 /**
46 * Constructor
c8422608 47 *
df0b8ff4
BH
48 * @param view a sequence diagram view reference
49 */
73005152 50 public MoveSDLeft(SDView view) {
cab6c8ff 51 super(view);
73005152
BH
52 setId(ID);
53 setActionDefinitionId(ID);
73005152
BH
54 }
55
56 // ------------------------------------------------------------------------
57 // Operations
58 // ------------------------------------------------------------------------
11252342 59
df0b8ff4 60 @Override
73005152 61 public void run() {
c8422608 62
cab6c8ff 63 if (getView() == null) {
73005152
BH
64 return;
65 }
c8422608 66
cab6c8ff 67 SDWidget viewer = getView().getSDWidget();
73005152
BH
68 if (viewer != null) {
69 viewer.scrollBy(-viewer.getVisibleWidth(), 0);
70 }
71 }
73005152 72}
This page took 0.12773 seconds and 5 git commands to generate.