1609
|
1 |
/*
|
|
2 |
* Copyright (c) 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 the License "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 |
*/
|
|
17 |
package com.nokia.carbide.internal.discovery.ui.editor;
|
|
18 |
|
1615
|
19 |
import java.util.ArrayList;
|
|
20 |
import java.util.List;
|
|
21 |
|
1734
|
22 |
import com.nokia.carbide.internal.discovery.ui.extension.IActionUIUpdater;
|
1609
|
23 |
|
|
24 |
class ActionUIUpdater implements IActionUIUpdater {
|
|
25 |
|
1615
|
26 |
private List<TaskBar> taskBars;
|
|
27 |
|
|
28 |
public ActionUIUpdater() {
|
|
29 |
taskBars = new ArrayList<TaskBar>();
|
|
30 |
}
|
1609
|
31 |
|
1615
|
32 |
void addTaskBar(TaskBar taskBar) {
|
|
33 |
taskBars.add(taskBar);
|
1609
|
34 |
}
|
|
35 |
|
|
36 |
@Override
|
|
37 |
public void update(String actionId) {
|
1615
|
38 |
for (TaskBar taskBar : taskBars) {
|
1609
|
39 |
taskBar.updateActionUI(actionId);
|
1615
|
40 |
}
|
1609
|
41 |
}
|
|
42 |
|
|
43 |
@Override
|
|
44 |
public void updateAll() {
|
1615
|
45 |
for (TaskBar taskBar : taskBars) {
|
1609
|
46 |
taskBar.updateAllActionsUI();
|
1615
|
47 |
}
|
1609
|
48 |
}
|
|
49 |
|
|
50 |
}
|