KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > net > NonProxyHostsContentProvider


1 /*******************************************************************************
2  * Copyright (c) 2005, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  * yyyymmdd bug Email and other contact information
11  * -------- -------- -----------------------------------------------------------
12  * 20070201 154100 pmoogk@ca.ibm.com - Peter Moogk, Port internet code from WTP to Eclipse base.
13  *******************************************************************************/

14
15 package org.eclipse.ui.internal.net;
16
17 import java.util.Collection JavaDoc;
18
19 import org.eclipse.jface.viewers.IStructuredContentProvider;
20 import org.eclipse.jface.viewers.Viewer;
21
22 /**
23  * Monitor content provider.
24  */

25 public class NonProxyHostsContentProvider implements IStructuredContentProvider
26 {
27     /**
28      * MonitorContentProvider constructor comment.
29      */

30     public NonProxyHostsContentProvider()
31     {
32         super();
33     }
34
35     /*
36      * Disposes of this content provider.
37      */

38     public void dispose()
39     {
40         // do nothing
41
}
42
43     /*
44      * Returns the elements to display in the viewer
45      * when its input is set to the given element.
46      */

47     public Object JavaDoc[] getElements(Object JavaDoc inputElement)
48     {
49         Collection JavaDoc coll = (Collection JavaDoc)inputElement;
50     
51         return coll.toArray( new String JavaDoc[0] );
52     }
53
54     /*
55      * Notifies this content provider that the given viewer's input
56      * has been switched to a different element.
57      */

58     public void inputChanged(Viewer viewer, Object JavaDoc oldInput, Object JavaDoc newInput)
59     {
60         // do nothing
61
}
62 }
63
Popular Tags