tmf: Update copyright headers in tmf.ui
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / handlers / Print.java
CommitLineData
73005152 1/**********************************************************************
c8422608 2 * Copyright (c) 2005, 2012 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
15import org.eclipse.jface.action.Action;
16import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
17
df0b8ff4
BH
18/**
19 * Action class implementation for 'Printing'.
c8422608 20 *
df0b8ff4
BH
21 * @version 1.0
22 * @author sveyrier
23 */
73005152
BH
24public class Print extends Action {
25
26 // ------------------------------------------------------------------------
df0b8ff4 27 // Constants
73005152 28 // ------------------------------------------------------------------------
df0b8ff4
BH
29 /**
30 * The action ID.
31 */
73005152 32 public static final String ID = "org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.print"; //$NON-NLS-1$
c8422608 33
df0b8ff4
BH
34 // ------------------------------------------------------------------------
35 // Attributes
36 // ------------------------------------------------------------------------
37 /**
38 * The sequence diagram view reference
39 */
40 private SDView fView;
c8422608 41
73005152
BH
42 // ------------------------------------------------------------------------
43 // Constructors
44 // ------------------------------------------------------------------------
df0b8ff4 45 /**
c8422608
AM
46 * Constructor
47 *
df0b8ff4 48 * @param view The view reference
c8422608 49 */
73005152
BH
50 public Print(SDView view) {
51 super();
52 setId(ID);
53 fView = view;
54 }
55
56 // ------------------------------------------------------------------------
df0b8ff4 57 // Methods
73005152
BH
58 // ------------------------------------------------------------------------
59 /*
60 * (non-Javadoc)
61 * @see org.eclipse.jface.action.Action#run()
62 */
63 @Override
64 public void run() {
df0b8ff4 65 if ((fView == null) || fView.getSDWidget() == null){
73005152 66 return;
df0b8ff4
BH
67 }
68
73005152
BH
69 fView.getSDWidget().print();
70 }
71}
This page took 0.034574 seconds and 5 git commands to generate.