Lines 21-26
Link Here
|
21 |
|
21 |
|
22 |
import java.awt.Dialog; |
22 |
import java.awt.Dialog; |
23 |
import java.awt.Image; |
23 |
import java.awt.Image; |
|
|
24 |
import java.awt.event.ActionEvent; |
24 |
import java.awt.event.ActionListener; |
25 |
import java.awt.event.ActionListener; |
25 |
import java.io.IOException; |
26 |
import java.io.IOException; |
26 |
import java.util.ArrayList; |
27 |
import java.util.ArrayList; |
Lines 194-199
Link Here
|
194 |
* Interface for creation of Customizer categories and their respective UI panels. |
195 |
* Interface for creation of Customizer categories and their respective UI panels. |
195 |
* Implementations are to be registered in System FileSystem via module layers. Used by the |
196 |
* Implementations are to be registered in System FileSystem via module layers. Used by the |
196 |
* {@link org.netbeans.spi.project.ui.support.ProjectCustomizer#createCustomizerDialog(String,Lookup,String,ActionListener,HelpCtx)} |
197 |
* {@link org.netbeans.spi.project.ui.support.ProjectCustomizer#createCustomizerDialog(String,Lookup,String,ActionListener,HelpCtx)} |
|
|
198 |
* The panel/category created by the provider can get notified that the customizer got |
199 |
* closed by setting an <code>ActionListener</code> to |
200 |
* {@link org.netbeans.spi.project.ui.support.ProjectCustomizer.Category#setOkButtonListener} . |
197 |
* @since org.netbeans.modules.projectuiapi/1 1.15 |
201 |
* @since org.netbeans.modules.projectuiapi/1 1.15 |
198 |
*/ |
202 |
*/ |
199 |
public static interface CompositeCategoryProvider { |
203 |
public static interface CompositeCategoryProvider { |
Lines 209-214
Link Here
|
209 |
|
213 |
|
210 |
/** |
214 |
/** |
211 |
* create the UI component for given category and context. |
215 |
* create the UI component for given category and context. |
|
|
216 |
* The panel/category created by the provider can get notified that the customizer got |
217 |
* closed by setting an <code>ActionListener</code> to |
218 |
* {@link org.netbeans.spi.project.ui.support.ProjectCustomizer.Category#setOkButtonListener}. |
212 |
* @param category Category instance that was created in the createCategory method. |
219 |
* @param category Category instance that was created in the createCategory method. |
213 |
* @param context Lookup instance passed from project The content is up to the project type, please consult documentation |
220 |
* @param context Lookup instance passed from project The content is up to the project type, please consult documentation |
214 |
* for the project type you want to integrate your panel into. |
221 |
* for the project type you want to integrate your panel into. |
Lines 226-231
Link Here
|
226 |
private Category[] subcategories; |
233 |
private Category[] subcategories; |
227 |
private boolean valid; |
234 |
private boolean valid; |
228 |
private String errorMessage; |
235 |
private String errorMessage; |
|
|
236 |
private ActionListener okListener; |
229 |
|
237 |
|
230 |
/** Private constructor. See the factory method. |
238 |
/** Private constructor. See the factory method. |
231 |
*/ |
239 |
*/ |
Lines 255-261
Link Here
|
255 |
return new Category( name, displayName, icon, subcategories ); |
263 |
return new Category( name, displayName, icon, subcategories ); |
256 |
} |
264 |
} |
257 |
|
265 |
|
258 |
|
|
|
259 |
// Public methods ------------------------------------------------------ |
266 |
// Public methods ------------------------------------------------------ |
260 |
|
267 |
|
261 |
/** Gets programmatic name of given category. |
268 |
/** Gets programmatic name of given category. |
Lines 334-339
Link Here
|
334 |
Utilities.getCategoryChangeSupport(this).firePropertyChange( |
341 |
Utilities.getCategoryChangeSupport(this).firePropertyChange( |
335 |
CategoryChangeSupport.ERROR_MESSAGE_PROPERTY, oldMessage, message); |
342 |
CategoryChangeSupport.ERROR_MESSAGE_PROPERTY, oldMessage, message); |
336 |
} |
343 |
} |
|
|
344 |
} |
345 |
|
346 |
/** |
347 |
* set the action listener that will get notified when the changes in the customizer |
348 |
* are to be applied. |
349 |
* @param okButtonListener ActionListener to notify |
350 |
* @since org.netbeans.modules.projectuiapi/1 1.20 |
351 |
*/ |
352 |
public void setOkButtonListener(ActionListener okButtonListener) { |
353 |
okListener = okButtonListener; |
354 |
} |
355 |
|
356 |
/** |
357 |
* returns the action listener associated wth this category that gets notified |
358 |
* when ok button is pressed on the customizer. |
359 |
* @returns instance of ActionListener or null if not set. |
360 |
* @since org.netbeans.modules.projectuiapi/1 1.20 |
361 |
*/ |
362 |
public ActionListener getOkButtonListener() { |
363 |
return okListener; |
337 |
} |
364 |
} |
338 |
|
365 |
|
339 |
} |
366 |
} |