|
1 /* |
|
2 * Copyright (c) 2007 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 * Callback for update group property dialog |
|
17 * |
|
18 */ |
|
19 package com.nokia.tracebuilder.engine.propertydialog; |
|
20 |
|
21 import com.nokia.tracebuilder.engine.TraceObjectPropertyDialog; |
|
22 import com.nokia.tracebuilder.model.TraceBuilderException; |
|
23 import com.nokia.tracebuilder.model.TraceGroup; |
|
24 import com.nokia.tracebuilder.model.TraceModel; |
|
25 |
|
26 /** |
|
27 * Callback for update group property dialog |
|
28 * |
|
29 */ |
|
30 final class UpdateGroupCallback extends PropertyDialogCallback { |
|
31 |
|
32 /** |
|
33 * The group to be updated |
|
34 */ |
|
35 private TraceGroup group; |
|
36 |
|
37 /** |
|
38 * Constructor |
|
39 * |
|
40 * @param model |
|
41 * the trace model |
|
42 * @param group |
|
43 * the group to be updated |
|
44 */ |
|
45 UpdateGroupCallback(TraceModel model, TraceGroup group) { |
|
46 super(model); |
|
47 this.group = group; |
|
48 } |
|
49 |
|
50 /* |
|
51 * (non-Javadoc) |
|
52 * |
|
53 * @see com.nokia.tracebuilder.engine.PropertyDialogManagerCallback# |
|
54 * okSelected(com.nokia.tracebuilder.engine.TraceObjectPropertyDialog) |
|
55 */ |
|
56 public void okSelected(TraceObjectPropertyDialog dialog) |
|
57 throws TraceBuilderException { |
|
58 int id = dialog.getID(); |
|
59 String name = dialog.getName(); |
|
60 group.getModel().getVerifier().checkTraceGroupProperties( |
|
61 group.getModel(), group, id, name); |
|
62 group.setID(id); |
|
63 group.setName(name); |
|
64 } |
|
65 |
|
66 } |