1 /**********************************************************************
2 * Copyright (c) 2011, 2014 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org
.eclipse
.tracecompass
.tmf
.ui
.views
.uml2sd
.handlers
;
14 import org
.eclipse
.tracecompass
.internal
.tmf
.ui
.Activator
;
15 import org
.eclipse
.tracecompass
.internal
.tmf
.ui
.ITmfImageConstants
;
16 import org
.eclipse
.tracecompass
.tmf
.ui
.views
.uml2sd
.SDView
;
17 import org
.eclipse
.tracecompass
.tmf
.ui
.views
.uml2sd
.util
.Messages
;
20 * Action class implementation to move the focus to the last page of the whole sequence diagram.
23 * @author Bernd Hufmann
25 public class LastPage
extends BaseSDAction
{
27 // ------------------------------------------------------------------------
29 // ------------------------------------------------------------------------
34 public static final String ID
= "org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.lastpage"; //$NON-NLS-1$
36 // ------------------------------------------------------------------------
38 // ------------------------------------------------------------------------
41 * Standard constructor
43 * @param view the view reference
45 public LastPage(SDView view
) {
47 setText(Messages
.SequenceDiagram_LastPage
);
48 setToolTipText(Messages
.SequenceDiagram_GoToLastPage
);
50 setImageDescriptor(Activator
.getDefault().getImageDescripterFromPath(ITmfImageConstants
.IMG_UI_LAST_PAGE
));
53 // ------------------------------------------------------------------------
55 // ------------------------------------------------------------------------
59 if ((getView() == null) || (getView().getSDWidget()) == null) {
62 if (getView().getSDPagingProvider() != null) {
63 getView().getSDPagingProvider().lastPage();
65 getView().updateCoolBar();
66 getView().getSDWidget().redraw();