|
1 /* |
|
2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 * Color Tree Component Item |
|
17 * |
|
18 */ |
|
19 package com.nokia.traceviewer.dialog.treeitem; |
|
20 |
|
21 import org.eclipse.swt.graphics.Color; |
|
22 |
|
23 /** |
|
24 * Color Tree Component Item |
|
25 */ |
|
26 public class ColorTreeComponentItem extends ColorTreeBaseItem { |
|
27 |
|
28 /** |
|
29 * Component ID of this item |
|
30 */ |
|
31 private final int componentId; |
|
32 |
|
33 /** |
|
34 * Group ID of this item |
|
35 */ |
|
36 private final int groupId; |
|
37 |
|
38 /** |
|
39 * Constructor |
|
40 * |
|
41 * @param listener |
|
42 * TreeItem listener |
|
43 * @param parent |
|
44 * parent object |
|
45 * @param name |
|
46 * name of the rule |
|
47 * @param rule |
|
48 * Rule of this item |
|
49 * @param foreground |
|
50 * foreground color for this item |
|
51 * @param background |
|
52 * background color for this item |
|
53 * @param componentId |
|
54 * component ID |
|
55 * @param groupId |
|
56 * group ID |
|
57 */ |
|
58 public ColorTreeComponentItem(TreeItemListener listener, Object parent, |
|
59 String name, Rule rule, Color foreground, Color background, |
|
60 int componentId, int groupId) { |
|
61 super(listener, parent, name, rule, foreground, background); |
|
62 this.componentId = componentId; |
|
63 this.groupId = groupId; |
|
64 } |
|
65 |
|
66 /** |
|
67 * Gets component ID |
|
68 * |
|
69 * @return the componentId |
|
70 */ |
|
71 public int getComponentId() { |
|
72 return componentId; |
|
73 } |
|
74 |
|
75 /** |
|
76 * Gets group ID |
|
77 * |
|
78 * @return the groupId |
|
79 */ |
|
80 public int getGroupId() { |
|
81 return groupId; |
|
82 } |
|
83 } |