lttng: Update copyright headers
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / handlers / NextPage.java
CommitLineData
73005152 1/**********************************************************************
df0b8ff4
BH
2 * Copyright (c) 2005, 2008 IBM Corporation and others.
3 * Copyright (c) 2011, 2012 Ericsson.
4 *
73005152
BH
5 * All rights reserved. This program and the accompanying materials
6 * are made available under the terms of the Eclipse Public License v1.0
7 * which accompanies this distribution, and is available at
8 * http://www.eclipse.org/legal/epl-v10.html
73005152
BH
9 *
10 * Contributors:
11 * IBM - Initial API and implementation
12 * Bernd Hufmann - Updated for TMF
13 **********************************************************************/
14package org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers;
15
16import org.eclipse.jface.action.Action;
d34665f9 17import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
8fd82db5 18import org.eclipse.linuxtools.internal.tmf.ui.Activator;
73005152
BH
19import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
20import org.eclipse.linuxtools.tmf.ui.views.uml2sd.util.SDMessages;
21
22/**
df0b8ff4
BH
23 * Action class implementation to move the focus to the next page of the whole sequence diagram.
24 *
25 * @version 1.0
73005152
BH
26 * @author sveyrier
27 *
28 */
29public class NextPage extends Action {
30
31 // ------------------------------------------------------------------------
df0b8ff4 32 // Constants
73005152 33 // ------------------------------------------------------------------------
df0b8ff4
BH
34 /**
35 * The action ID.
36 */
73005152
BH
37 public static final String ID = "org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.nextpage"; //$NON-NLS-1$
38
df0b8ff4
BH
39 // ------------------------------------------------------------------------
40 // Attributes
41 // ------------------------------------------------------------------------
42 /**
43 * The sequence diagram view reference.
44 */
73005152
BH
45 protected SDView fView = null;
46
47 // ------------------------------------------------------------------------
48 // Constructors
49 // ------------------------------------------------------------------------
df0b8ff4
BH
50 /**
51 * Default constructor
52 *
eb63f5ff 53 * @param view the view reference
df0b8ff4 54 */
eb63f5ff 55 public NextPage(SDView view) {
73005152 56 super();
eb63f5ff 57 fView = view;
73005152
BH
58 setText(SDMessages._36);
59 setToolTipText(SDMessages._38);
60 setId(ID);
8fd82db5 61 setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_NEXT_PAGE));
73005152
BH
62 }
63
64 // ------------------------------------------------------------------------
65 // Operations
66 // ------------------------------------------------------------------------
67 /*
68 * (non-Javadoc)
69 * @see org.eclipse.jface.action.Action#run()
70 */
71 @Override
72 public void run() {
73 if ((fView == null) || (fView.getSDWidget()) == null) {
74 return;
75 }
76 if (fView.getSDPagingProvider() != null) {
77 fView.getSDPagingProvider().nextPage();
78 }
79 fView.updateCoolBar();
80 fView.getSDWidget().redraw();
81 }
82}
This page took 0.037255 seconds and 5 git commands to generate.