1 /**********************************************************************
2 * Copyright (c) 2012 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
.linuxtools
.lttng
.ui
.views
.control
.model
.impl
;
14 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.Messages
;
15 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.IChannelInfo
;
16 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.IDomainInfo
;
17 import org
.eclipse
.linuxtools
.lttng
.ui
.views
.control
.model
.ITraceControlComponent
;
20 * <b><u>TraceDomainComponent</u></b>
22 * Implementation of the trace domain component.
25 public class TraceDomainComponent
extends TraceControlComponent
{
26 // ------------------------------------------------------------------------
28 // ------------------------------------------------------------------------
30 * Path to icon file for this component.
32 public static final String TRACE_DOMAIN_ICON_FILE
= "icons/obj16/domain.gif"; //$NON-NLS-1$
34 // ------------------------------------------------------------------------
36 // ------------------------------------------------------------------------
38 * The domain information.
40 private IDomainInfo fDomainInfo
= null;
42 // ------------------------------------------------------------------------
44 // ------------------------------------------------------------------------
47 * @param name - the name of the component.
48 * @param parent - the parent of this component.
50 public TraceDomainComponent(String name
, ITraceControlComponent parent
) {
52 setImage(TRACE_DOMAIN_ICON_FILE
);
53 setToolTip(Messages
.TraceControl_DomainDisplayName
);
54 fDomainInfo
= new DomainInfo(name
);
57 // ------------------------------------------------------------------------
59 // ------------------------------------------------------------------------
61 * Sets the domain information.
62 * @param domainInfo - the domain information to set.
64 public void setDomainInfo(IDomainInfo domainInfo
) {
65 fDomainInfo
= domainInfo
;
66 IChannelInfo
[] channels
= fDomainInfo
.getChannels();
67 for (int i
= 0; i
< channels
.length
; i
++) {
68 TraceChannelComponent channel
= new TraceChannelComponent(channels
[i
].getName(), this);
69 channel
.setChannelInfo(channels
[i
]);
74 // ------------------------------------------------------------------------
76 // ------------------------------------------------------------------------