srcanaapps/depexplorer/com.nokia.s60tools.appdep/src/com/nokia/s60tools/appdep/ui/views/main/MainViewImportFunctionsTabContentProvider.java
author noe\swadi
Tue, 23 Feb 2010 10:27:57 +0530
changeset 3 ec51f72aa69a
parent 0 a02c979e8dfd
permissions -rw-r--r--
Licenses updated to EPL.

/*
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/
 
 
package com.nokia.s60tools.appdep.ui.views.main;


import java.util.ArrayList;

import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;

import com.nokia.s60tools.appdep.core.model.ImportFunctionData;

/**
 * Content provider for Import Functions tab item. 
 */
class MainViewImportFunctionsTabContentProvider implements IStructuredContentProvider {
		
	/**
	 * Reference to <code>ArrayList</code> object that always 
	 * contains the current list of imported functions.
	 * This list is populated by <code>MainViewSelectionChangedListener</code> 
	 * class.
	 * @see com.nokia.s60tools.appdep.ui.views.main.MainViewSelectionChangedListener
	 */
	private ArrayList<ImportFunctionData> importFunctionsArrayList = null;
	
	/**
	 * Content provider's constructor.
	 * @param importFunctionsArrayList <code>ArrayList</code> object that always 
	 * contains the current list of imported functions.
	 */
	public MainViewImportFunctionsTabContentProvider(ArrayList<ImportFunctionData> importFunctionsArrayList){
		this.importFunctionsArrayList = importFunctionsArrayList;
	}
	
	/* (non-Javadoc)
	 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
	 */
	public void inputChanged(Viewer v, Object oldInput, Object newInput) {
	}
	
	/* (non-Javadoc)
	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
	 */
	public void dispose() {
	}
	
	/* (non-Javadoc)
	 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
	 */
	public Object[] getElements(Object parent) {
		return importFunctionsArrayList.toArray();
	}
	
}