|
1 /* |
|
2 * Copyright (c) 2006 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 */ |
|
17 |
|
18 |
|
19 package com.nokia.s60tools.appdep.ui.views.main; |
|
20 |
|
21 |
|
22 import java.util.ArrayList; |
|
23 |
|
24 import org.eclipse.jface.viewers.IStructuredContentProvider; |
|
25 import org.eclipse.jface.viewers.Viewer; |
|
26 |
|
27 import com.nokia.s60tools.appdep.core.model.ImportFunctionData; |
|
28 |
|
29 /** |
|
30 * Content provider for Import Functions tab item. |
|
31 */ |
|
32 class MainViewImportFunctionsTabContentProvider implements IStructuredContentProvider { |
|
33 |
|
34 /** |
|
35 * Reference to <code>ArrayList</code> object that always |
|
36 * contains the current list of imported functions. |
|
37 * This list is populated by <code>MainViewSelectionChangedListener</code> |
|
38 * class. |
|
39 * @see com.nokia.s60tools.appdep.ui.views.main.MainViewSelectionChangedListener |
|
40 */ |
|
41 private ArrayList<ImportFunctionData> importFunctionsArrayList = null; |
|
42 |
|
43 /** |
|
44 * Content provider's constructor. |
|
45 * @param importFunctionsArrayList <code>ArrayList</code> object that always |
|
46 * contains the current list of imported functions. |
|
47 */ |
|
48 public MainViewImportFunctionsTabContentProvider(ArrayList<ImportFunctionData> importFunctionsArrayList){ |
|
49 this.importFunctionsArrayList = importFunctionsArrayList; |
|
50 } |
|
51 |
|
52 /* (non-Javadoc) |
|
53 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) |
|
54 */ |
|
55 public void inputChanged(Viewer v, Object oldInput, Object newInput) { |
|
56 } |
|
57 |
|
58 /* (non-Javadoc) |
|
59 * @see org.eclipse.jface.viewers.IContentProvider#dispose() |
|
60 */ |
|
61 public void dispose() { |
|
62 } |
|
63 |
|
64 /* (non-Javadoc) |
|
65 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object) |
|
66 */ |
|
67 public Object[] getElements(Object parent) { |
|
68 return importFunctionsArrayList.toArray(); |
|
69 } |
|
70 |
|
71 } |