|
1 /* |
|
2 * Copyright (c) 2008 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 * Interface to a property dialog of Trace Builder |
|
17 * |
|
18 */ |
|
19 package com.nokia.tracebuilder.engine; |
|
20 |
|
21 import java.util.List; |
|
22 |
|
23 import com.nokia.tracebuilder.model.TraceObject; |
|
24 |
|
25 /** |
|
26 * Interface to a property dialog of Trace Builder. Implemented into the view |
|
27 * |
|
28 */ |
|
29 public interface TraceObjectPropertyDialog { |
|
30 |
|
31 /** |
|
32 * OK button pressed |
|
33 */ |
|
34 int OK = 0; |
|
35 |
|
36 /** |
|
37 * Cancel button pressed |
|
38 */ |
|
39 int CANCEL = 1; |
|
40 |
|
41 /** |
|
42 * Add trace dialog type |
|
43 */ |
|
44 int ADD_TRACE = 1; |
|
45 |
|
46 /** |
|
47 * Add parameter dialog type |
|
48 */ |
|
49 int ADD_PARAMETER = 2; |
|
50 |
|
51 /** |
|
52 * Select component dialog type |
|
53 */ |
|
54 int SELECT_COMPONENT = 3; |
|
55 |
|
56 /** |
|
57 * Add constant dialog type |
|
58 */ |
|
59 int ADD_CONSTANT = 4; |
|
60 |
|
61 /** |
|
62 * Edit group dialog type |
|
63 */ |
|
64 int EDIT_GROUP = 5; |
|
65 |
|
66 /** |
|
67 * Edit trace dialog type |
|
68 */ |
|
69 int EDIT_TRACE = 6; |
|
70 |
|
71 /** |
|
72 * Edit constant table dialog type |
|
73 */ |
|
74 int EDIT_CONSTANT_TABLE = 7; |
|
75 |
|
76 /** |
|
77 * Edit constant dialog type |
|
78 */ |
|
79 int EDIT_CONSTANT = 8; |
|
80 |
|
81 /** |
|
82 * Instrumenter dialog type |
|
83 */ |
|
84 int INSTRUMENTER = 9; |
|
85 |
|
86 /** |
|
87 * Sets the dialog type |
|
88 * |
|
89 * @param dialogType |
|
90 * the type |
|
91 */ |
|
92 public void setDialogType(int dialogType); |
|
93 |
|
94 /** |
|
95 * Gets the dialog type |
|
96 * |
|
97 * @return the dialog type |
|
98 */ |
|
99 public int getDialogType(); |
|
100 |
|
101 /** |
|
102 * Gets the name of the target. When OK button is pressed, this may return a |
|
103 * different name than the name of the object set by setTargetObject |
|
104 * |
|
105 * @return the name of the target object |
|
106 */ |
|
107 public String getTarget(); |
|
108 |
|
109 |
|
110 /** |
|
111 * Sets the target name |
|
112 * |
|
113 * @param target |
|
114 * the new target name |
|
115 */ |
|
116 public void setTarget(String target); |
|
117 |
|
118 /** |
|
119 * Sets the target object. The object may not be changed by the UI. |
|
120 * |
|
121 * @param object |
|
122 * the target object |
|
123 */ |
|
124 public void setTargetObject(TraceObject object); |
|
125 |
|
126 /** |
|
127 * Gets the object that was set with setTargetObject |
|
128 * |
|
129 * @return the target object |
|
130 */ |
|
131 public TraceObject getTargetObject(); |
|
132 |
|
133 /** |
|
134 * Shows the dialog. |
|
135 * |
|
136 * @return the button ID used to close the dialog |
|
137 */ |
|
138 public int open(); |
|
139 |
|
140 /** |
|
141 * Sets the object identifier |
|
142 * |
|
143 * @see com.nokia.tracebuilder.model.TraceObject#getID() |
|
144 * @param id |
|
145 * the object ID |
|
146 */ |
|
147 public void setID(int id); |
|
148 |
|
149 /** |
|
150 * Gets the object identifier |
|
151 * |
|
152 * @see com.nokia.tracebuilder.model.TraceObject#getID() |
|
153 * @return the object ID |
|
154 */ |
|
155 public int getID(); |
|
156 |
|
157 /** |
|
158 * Sets the object name |
|
159 * |
|
160 * @see com.nokia.tracebuilder.model.TraceObject#getName() |
|
161 * @param name |
|
162 * the new name |
|
163 */ |
|
164 public void setName(String name); |
|
165 |
|
166 /** |
|
167 * Returns the object name |
|
168 * |
|
169 * @see com.nokia.tracebuilder.model.TraceObject#getName() |
|
170 * @return the name |
|
171 */ |
|
172 public String getName(); |
|
173 |
|
174 /** |
|
175 * Gets the object value. |
|
176 * |
|
177 * @see com.nokia.tracebuilder.model.Trace#getTrace() |
|
178 * @see com.nokia.tracebuilder.model.TraceParameter#getType() |
|
179 * @return the value |
|
180 */ |
|
181 public String getValue(); |
|
182 |
|
183 /** |
|
184 * Sets the object value. |
|
185 * |
|
186 * @see com.nokia.tracebuilder.model.Trace#getTrace() |
|
187 * @see com.nokia.tracebuilder.model.TraceParameter#getType() |
|
188 * @param value |
|
189 * the object value |
|
190 */ |
|
191 public void setValue(String value); |
|
192 |
|
193 /** |
|
194 * Sets the dialog flags |
|
195 * |
|
196 * @param flags |
|
197 * the flags |
|
198 */ |
|
199 public void setFlags(List<TraceObjectPropertyDialogFlag> flags); |
|
200 |
|
201 /** |
|
202 * Gets the dialog flags |
|
203 * |
|
204 * @return the list of flags |
|
205 */ |
|
206 public List<TraceObjectPropertyDialogFlag> getFlags(); |
|
207 |
|
208 /** |
|
209 * Sets the templates to the dialog. |
|
210 * |
|
211 * @param templates |
|
212 * the list of templates |
|
213 * @param active |
|
214 * the template that should be selected when the dialog is shown |
|
215 */ |
|
216 public void setTemplates(List<TraceObjectPropertyDialogTemplate> templates, |
|
217 TraceObjectPropertyDialogTemplate active); |
|
218 |
|
219 /** |
|
220 * Gets the template that was selected |
|
221 * |
|
222 * @return the template |
|
223 */ |
|
224 public TraceObjectPropertyDialogTemplate getTemplate(); |
|
225 |
|
226 /** |
|
227 * Sets the enabler interface |
|
228 * |
|
229 * @param enabler |
|
230 * the enabler |
|
231 */ |
|
232 public void setEnabler(TraceObjectPropertyDialogEnabler enabler); |
|
233 |
|
234 /** |
|
235 * Sets an interface that can be used by the view to verify dialog contents |
|
236 * while user is changing them |
|
237 * |
|
238 * @param verifier |
|
239 * the dialog content verifier |
|
240 */ |
|
241 public void setVerifier(TraceObjectPropertyDialogVerifier verifier); |
|
242 |
|
243 } |