KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > java > j2seproject > api > J2SERunConfigProvider


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.java.j2seproject.api;
21
22 import java.util.Map JavaDoc;
23 import javax.swing.JComponent JavaDoc;
24
25 import org.netbeans.api.project.Project;
26
27 /**
28  * Provider of component that will be added to Run customizer panel that will
29  * be used for additional customization of set of properties affected by given
30  * run configuration. Implementation of the interface should be registered to
31  * default lookup (e.g. META-INF/services).
32  *
33  * @author Milan Kubec
34  * @since 1.10
35  */

36 public interface J2SERunConfigProvider {
37     
38     /**
39      * Provides component that is added to Run Customizer panel of j2seproject
40      *
41      * @param proj project to create the customizer component for
42      * @param listener listener to be notified when properties should be updated
43      */

44     JComponent JavaDoc createComponent(Project proj, ConfigChangeListener listener);
45     
46     /**
47      * Method is called when the config is changed (or created),
48      * component is updated according to properties of the config
49      *
50      * @param props all properties (shared + private) of the new config;
51      * properites are not evaluated
52      */

53     void configUpdated(Map JavaDoc<String JavaDoc,String JavaDoc> props);
54     
55     /**
56      * Callback listener for setting properties that are changed by interaction
57      * with the component
58      */

59     interface ConfigChangeListener {
60         /**
61          * Method is called when properties should be updated, null prop value
62          * means property will be removed from the property file, only shared
63          * properties are updated; properties are not evaluated
64          *
65          * @param updates map holding updated properties
66          */

67         void propertiesChanged(Map JavaDoc<String JavaDoc,String JavaDoc> updates);
68     }
69     
70 }
71
Popular Tags