Commit | Line | Data |
---|---|---|
b0d3496e | 1 | /******************************************************************************* |
e31e01e8 | 2 | * Copyright (c) 2009, 2010 Ericsson |
b0d3496e ASL |
3 | * |
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 | |
8 | * | |
9 | * Contributors: | |
10 | * Francois Chouinard - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.tmf.ui.views; | |
14 | ||
15 | import org.eclipse.linuxtools.tmf.component.ITmfComponent; | |
8d2e2848 | 16 | import org.eclipse.linuxtools.tmf.signal.TmfSignal; |
b0d3496e ASL |
17 | import org.eclipse.linuxtools.tmf.signal.TmfSignalManager; |
18 | import org.eclipse.swt.widgets.Composite; | |
19 | import org.eclipse.ui.part.ViewPart; | |
20 | ||
21 | /** | |
e31e01e8 | 22 | * <b><u>TmfView</u></b> |
b0d3496e ASL |
23 | * <p> |
24 | * TODO: Implement me. Please. | |
25 | */ | |
26 | public abstract class TmfView extends ViewPart implements ITmfComponent { | |
27 | ||
fc6ccf6f FC |
28 | private final String fName; |
29 | ||
e31e01e8 FC |
30 | // ------------------------------------------------------------------------ |
31 | // Constructor | |
32 | // ------------------------------------------------------------------------ | |
33 | ||
fc6ccf6f | 34 | public TmfView(String viewName) { |
e31e01e8 | 35 | super(); |
fc6ccf6f | 36 | fName = viewName; |
e31e01e8 | 37 | register(); |
b0d3496e ASL |
38 | } |
39 | ||
e31e01e8 FC |
40 | // ------------------------------------------------------------------------ |
41 | // ITmfComponent | |
42 | // ------------------------------------------------------------------------ | |
43 | ||
fc6ccf6f FC |
44 | public String getName() { |
45 | return fName; | |
46 | } | |
47 | ||
e31e01e8 FC |
48 | public void register() { |
49 | TmfSignalManager.register(this); | |
50 | } | |
51 | ||
52 | public void deregister() { | |
53 | TmfSignalManager.deregister(this); | |
b0d3496e ASL |
54 | } |
55 | ||
e31e01e8 | 56 | public void broadcast(TmfSignal signal) { |
8d2e2848 FC |
57 | TmfSignalManager.dispatchSignal(signal); |
58 | } | |
59 | ||
e31e01e8 FC |
60 | // ------------------------------------------------------------------------ |
61 | // ViewPart | |
62 | // ------------------------------------------------------------------------ | |
63 | ||
b0d3496e ASL |
64 | @Override |
65 | public void createPartControl(Composite parent) { | |
66 | // TODO Auto-generated method stub | |
67 | } | |
68 | ||
69 | @Override | |
70 | public void setFocus() { | |
71 | // TODO Auto-generated method stub | |
72 | } | |
73 | ||
e31e01e8 | 74 | } |