Commit | Line | Data |
---|---|---|
fb5cad3d PT |
1 | /*******************************************************************************\r |
2 | * Copyright (c) 2012 Ericsson\r | |
013a5f1c | 3 | *\r |
fb5cad3d PT |
4 | * All rights reserved. This program and the accompanying materials are\r |
5 | * made available under the terms of the Eclipse Public License v1.0 which\r | |
6 | * accompanies this distribution, and is available at\r | |
7 | * http://www.eclipse.org/legal/epl-v10.html\r | |
013a5f1c | 8 | *\r |
fb5cad3d PT |
9 | * Contributors:\r |
10 | * Patrick Tasse - Initial API and implementation\r | |
11 | *******************************************************************************/\r | |
12 | \r | |
13 | package org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets;\r | |
14 | \r | |
15 | import java.util.ArrayList;\r | |
16 | import java.util.List;\r | |
17 | \r | |
18 | import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;\r | |
19 | \r | |
013a5f1c AM |
20 | /**\r |
21 | * Item in the generic time graph view\r | |
22 | *\r | |
23 | * @version 1.0\r | |
24 | * @author Patrick Tasse\r | |
25 | */\r | |
3934297e | 26 | @SuppressWarnings("javadoc")\r |
fb5cad3d PT |
27 | public class TimeGraphItem {\r |
28 | public boolean _expanded;\r | |
29 | public boolean _selected;\r | |
30 | public boolean _hasChildren;\r | |
b83af2c3 | 31 | public int itemHeight;\r |
fb5cad3d PT |
32 | public int level;\r |
33 | public List<TimeGraphItem> children;\r | |
34 | public String _name;\r | |
35 | public ITimeGraphEntry _trace;\r | |
36 | \r | |
3934297e AM |
37 | /**\r |
38 | * Standard constructor\r | |
39 | *\r | |
40 | * @param trace\r | |
41 | * The entry matching to trace to which this item is associated\r | |
42 | * @param name\r | |
43 | * The name of the item\r | |
44 | * @param level\r | |
45 | * The tree level of this entry (0 = top level)\r | |
46 | */\r | |
fb5cad3d PT |
47 | public TimeGraphItem(ITimeGraphEntry trace, String name, int level) {\r |
48 | this._trace = trace;\r | |
49 | this._name = name;\r | |
50 | this.level = level;\r | |
51 | this.children = new ArrayList<TimeGraphItem>();\r | |
52 | }\r | |
53 | \r | |
54 | @Override\r | |
55 | public String toString() {\r | |
56 | return _name;\r | |
57 | }\r | |
58 | } |