First part of LTTng 2.0 support
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng.ui / src / org / eclipse / linuxtools / lttng / ui / views / control / model / impl / KernelProviderComponent.java
CommitLineData
eb1bab5b
BH
1/**********************************************************************
2 * Copyright (c) 2012 Ericsson
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 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12
13package org.eclipse.linuxtools.lttng.ui.views.control.model.impl;
14
15import java.util.Iterator;
16import java.util.List;
17
18import org.eclipse.linuxtools.lttng.ui.views.control.model.IBaseEventInfo;
19import org.eclipse.linuxtools.lttng.ui.views.control.model.ITraceControlComponent;
20
21/**
22 * <b><u>KernelProviderComponent</u></b>
23 * <p>
24 * TODO
25 * </p>
26 */
27public class KernelProviderComponent extends TraceControlComponent {
28
29 // ------------------------------------------------------------------------
30 // Constants
31 // ------------------------------------------------------------------------
32 /**
33 * Path to icon file for this component.
34 */
35 public static final String KERNEL_PROVIDER_ICON_FILE = "icons/obj16/targets.gif"; //$NON-NLS-1$
36
37 // ------------------------------------------------------------------------
38 // Attributes
39 // ------------------------------------------------------------------------
40
41 // ------------------------------------------------------------------------
42 // Constructors
43 // ------------------------------------------------------------------------
44 /**
45 * Constructor
46 * @param name - the name of the component.
47 * @param parent - the parent of this component.
48 */
49 public KernelProviderComponent(String name, ITraceControlComponent parent) {
50 super(name, parent);
51 setImage(KERNEL_PROVIDER_ICON_FILE);
52 }
53
54 // ------------------------------------------------------------------------
55 // Accessors
56 // ------------------------------------------------------------------------
57 /**
58 * Sets the events information for this component.
59 * @param eventInfos - events information to set.
60 */
61 public void setEventInfo(List<IBaseEventInfo> eventInfos) {
62 for (Iterator<IBaseEventInfo> iterator = eventInfos.iterator(); iterator.hasNext();) {
63 IBaseEventInfo baseEventInfo = (IBaseEventInfo) iterator.next();
64 BaseEventComponent component = new BaseEventComponent(baseEventInfo.getName(), this);
65 component.setEventInfo(baseEventInfo);
66 addChild(component);
67 }
68 }
69
70 // ------------------------------------------------------------------------
71 // Operations
72 // ------------------------------------------------------------------------
73
74
75}
This page took 0.029224 seconds and 5 git commands to generate.