tmf: API clean-up of sequence diagram framework
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / handlers / NextPage.java
CommitLineData
73005152 1/**********************************************************************
11252342 2 * Copyright (c) 2005, 2013 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
73005152
BH
13package org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers;
14
8fd82db5 15import org.eclipse.linuxtools.internal.tmf.ui.Activator;
cab6c8ff 16import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
73005152 17import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
92330441 18import org.eclipse.linuxtools.tmf.ui.views.uml2sd.util.Messages;
73005152
BH
19
20/**
df0b8ff4 21 * Action class implementation to move the focus to the next page of the whole sequence diagram.
c8422608 22 *
df0b8ff4 23 * @version 1.0
73005152 24 * @author sveyrier
c8422608 25 *
73005152 26 */
cab6c8ff 27public class NextPage extends BaseSDAction {
73005152
BH
28
29 // ------------------------------------------------------------------------
df0b8ff4 30 // Constants
73005152 31 // ------------------------------------------------------------------------
df0b8ff4
BH
32 /**
33 * The action ID.
34 */
73005152 35 public static final String ID = "org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.nextpage"; //$NON-NLS-1$
c8422608 36
73005152
BH
37 // ------------------------------------------------------------------------
38 // Constructors
39 // ------------------------------------------------------------------------
df0b8ff4 40 /**
c8422608
AM
41 * Default constructor
42 *
eb63f5ff 43 * @param view the view reference
df0b8ff4 44 */
eb63f5ff 45 public NextPage(SDView view) {
cab6c8ff 46 super(view);
92330441
AM
47 setText(Messages.SequenceDiagram_NextPage);
48 setToolTipText(Messages.SequenceDiagram_GoToNextPage);
c8422608 49 setId(ID);
8fd82db5 50 setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_NEXT_PAGE));
73005152
BH
51 }
52
53 // ------------------------------------------------------------------------
54 // Operations
55 // ------------------------------------------------------------------------
11252342 56
73005152
BH
57 @Override
58 public void run() {
cab6c8ff 59 if ((getView() == null) || (getView().getSDWidget()) == null) {
73005152
BH
60 return;
61 }
cab6c8ff
BH
62 if (getView().getSDPagingProvider() != null) {
63 getView().getSDPagingProvider().nextPage();
73005152 64 }
cab6c8ff
BH
65 getView().updateCoolBar();
66 getView().getSDWidget().redraw();
73005152
BH
67 }
68}
This page took 0.048585 seconds and 5 git commands to generate.