|
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 * Filter Tree Base item class |
|
17 * |
|
18 */ |
|
19 package com.nokia.traceviewer.dialog.treeitem; |
|
20 |
|
21 import com.nokia.traceviewer.engine.TraceProperties; |
|
22 |
|
23 /** |
|
24 * Filter Tree Base item class |
|
25 */ |
|
26 public class FilterTreeBaseItem extends TreeItemImpl implements FilterTreeItem { |
|
27 |
|
28 /** |
|
29 * Rule of the item |
|
30 */ |
|
31 private final Rule rule; |
|
32 |
|
33 /** |
|
34 * Indicates if this rule is inside logical NOT |
|
35 */ |
|
36 private boolean notRule; |
|
37 |
|
38 /** |
|
39 * Constructor |
|
40 * |
|
41 * @param listener |
|
42 * TreeItemListener |
|
43 * @param parent |
|
44 * parent object |
|
45 * @param name |
|
46 * name for the item |
|
47 * @param rule |
|
48 * rule for the item |
|
49 */ |
|
50 public FilterTreeBaseItem(TreeItemListener listener, Object parent, |
|
51 String name, Rule rule) { |
|
52 super(name, parent, listener, (rule == Rule.GROUP)); |
|
53 this.rule = rule; |
|
54 } |
|
55 |
|
56 /** |
|
57 * Gets the type of the rule |
|
58 * |
|
59 * @return the rule |
|
60 */ |
|
61 public Rule getRule() { |
|
62 return rule; |
|
63 } |
|
64 |
|
65 /* |
|
66 * (non-Javadoc) |
|
67 * |
|
68 * @see |
|
69 * com.nokia.traceviewer.engine.dataprocessor.FilterRuleObject#isLogicalNotRule |
|
70 * () |
|
71 */ |
|
72 public boolean isLogicalNotRule() { |
|
73 return notRule; |
|
74 } |
|
75 |
|
76 /* |
|
77 * (non-Javadoc) |
|
78 * |
|
79 * @see |
|
80 * com.nokia.traceviewer.engine.dataprocessor.FilterRuleObject#setLogicalNotRule |
|
81 * (boolean) |
|
82 */ |
|
83 public void setLogicalNotRule(boolean notRule) { |
|
84 this.notRule = notRule; |
|
85 } |
|
86 |
|
87 /* |
|
88 * (non-Javadoc) |
|
89 * |
|
90 * @see com.nokia.traceviewer.engine.dataprocessor.FilterRuleObject |
|
91 * #processRule(com.nokia.traceviewer.engine.TraceProperties) |
|
92 */ |
|
93 public boolean processRule(TraceProperties properties) { |
|
94 // Method implemented in subclassses |
|
95 return false; |
|
96 } |
|
97 } |