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