KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > launcher > InstalledJREsPreferenceNode


1 /*******************************************************************************
2  * Copyright (c) 2003, 2005 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  *******************************************************************************/

11 package org.eclipse.pde.internal.ui.launcher;
12
13 import org.eclipse.jdt.internal.debug.ui.jres.JREsPreferencePage;
14 import org.eclipse.jface.preference.IPreferenceNode;
15 import org.eclipse.jface.preference.IPreferencePage;
16 import org.eclipse.pde.internal.ui.PDEUIMessages;
17 import org.eclipse.swt.graphics.Image;
18
19 public class InstalledJREsPreferenceNode implements IPreferenceNode {
20     
21     private JREsPreferencePage page;
22
23     /* (non-Javadoc)
24      * @see org.eclipse.jface.preference.IPreferenceNode#add(org.eclipse.jface.preference.IPreferenceNode)
25      */

26     public void add(IPreferenceNode node) {
27     }
28
29     /* (non-Javadoc)
30      * @see org.eclipse.jface.preference.IPreferenceNode#createPage()
31      */

32     public void createPage() {
33         page = new JREsPreferencePage();
34     }
35
36     /* (non-Javadoc)
37      * @see org.eclipse.jface.preference.IPreferenceNode#disposeResources()
38      */

39     public void disposeResources() {
40         if (page != null)
41             page.dispose();
42         page = null;
43     }
44
45     /* (non-Javadoc)
46      * @see org.eclipse.jface.preference.IPreferenceNode#findSubNode(java.lang.String)
47      */

48     public IPreferenceNode findSubNode(String JavaDoc id) {
49         return null;
50     }
51
52     /* (non-Javadoc)
53      * @see org.eclipse.jface.preference.IPreferenceNode#getId()
54      */

55     public String JavaDoc getId() {
56         return "org.eclipse.jdt.debug.ui.preferences.VMPreferencePage"; //$NON-NLS-1$
57
}
58
59     /* (non-Javadoc)
60      * @see org.eclipse.jface.preference.IPreferenceNode#getLabelImage()
61      */

62     public Image getLabelImage() {
63         return null;
64     }
65
66     /* (non-Javadoc)
67      * @see org.eclipse.jface.preference.IPreferenceNode#getLabelText()
68      */

69     public String JavaDoc getLabelText() {
70         return PDEUIMessages.BasicLauncherTab_jrePreferencePage; //$NON-NLS-1$
71
}
72
73     /* (non-Javadoc)
74      * @see org.eclipse.jface.preference.IPreferenceNode#getPage()
75      */

76     public IPreferencePage getPage() {
77         return page;
78     }
79
80     /* (non-Javadoc)
81      * @see org.eclipse.jface.preference.IPreferenceNode#getSubNodes()
82      */

83     public IPreferenceNode[] getSubNodes() {
84         return new IPreferenceNode[0];
85     }
86
87     /* (non-Javadoc)
88      * @see org.eclipse.jface.preference.IPreferenceNode#remove(java.lang.String)
89      */

90     public IPreferenceNode remove(String JavaDoc id) {
91         return null;
92     }
93
94     /* (non-Javadoc)
95      * @see org.eclipse.jface.preference.IPreferenceNode#remove(org.eclipse.jface.preference.IPreferenceNode)
96      */

97     public boolean remove(IPreferenceNode node) {
98         return false;
99     }
100
101 }
102
Popular Tags