站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

ProjectCustomizer (Project UI API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.projectuiapi/1 1.24.0 6

org.netbeans.spi.project.ui.support
Class ProjectCustomizer

java.lang.Object
  extended by org.netbeans.spi.project.ui.support.ProjectCustomizer

public final class ProjectCustomizer
extends Object

Support for creating dialogs which can be used as project customizers. The dialog may display multiple panels or categories.

See Also:
CustomizerProvider, ProjectCustomizer.Category

Nested Class Summary
static class ProjectCustomizer.Category
          Describes category of properties to be customized by given component
static interface ProjectCustomizer.CategoryComponentProvider
          Provides components for categories.
static interface ProjectCustomizer.CompositeCategoryProvider
          Interface for creation of Customizer categories and their respective UI panels.
 
Method Summary
static Dialog createCustomizerDialog(ProjectCustomizer.Category[] categories, ProjectCustomizer.CategoryComponentProvider componentProvider, String preselectedCategory, ActionListener okOptionListener, HelpCtx helpCtx)
          Creates standard which can be used for implementation of CustomizerProvider.
static Dialog createCustomizerDialog(String folderPath, Lookup context, String preselectedCategory, ActionListener okOptionListener, HelpCtx helpCtx)
          Creates standard customizer dialog that can be used for implementation of CustomizerProvider based on content of a folder in Layers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createCustomizerDialog

public static Dialog createCustomizerDialog(ProjectCustomizer.Category[] categories,
                                            ProjectCustomizer.CategoryComponentProvider componentProvider,
                                            String preselectedCategory,
                                            ActionListener okOptionListener,
                                            HelpCtx helpCtx)
Creates standard which can be used for implementation of CustomizerProvider. You don't need to call pack() method on the dialog. The resulting dialog will be non-modal.
Call show() on the dialog to make it visible. If you want the dialog to be closed after user presses the "OK" button you have to call hide() and dispose() on it. (Usually in the actionPerformed(...) method of the listener you provided as a parameter. In case of the click on the "Cancel" button the dialog will be closed automatically.

Parameters:
categories - array of descriptions of categories to be shown in the dialog. Note that categories have the valid property. If any of the given categories is not valid cusomizer's OK button will be disabled until all categories become valid again.
componentProvider - creator of GUI components for categories in the customizer dialog.
preselectedCategory - name of one of the supplied categories or null. Category with given name will be selected. If null or if the category of given name does not exist the first category will be selected.
okOptionListener - listener which will be notified when the user presses the OK button.
helpCtx - Help context for the dialog, which will be used when the panels in the customizer do not specify their own help context.
Returns:
standard project customizer dialog.

createCustomizerDialog

public static Dialog createCustomizerDialog(String folderPath,
                                            Lookup context,
                                            String preselectedCategory,
                                            ActionListener okOptionListener,
                                            HelpCtx helpCtx)
Creates standard customizer dialog that can be used for implementation of CustomizerProvider based on content of a folder in Layers. Use this method when you want to allow composition and 3rd party additions to your customizer UI. You don't need to call pack() method on the dialog. The resulting dialog will be non-modal.
Call show() on the dialog to make it visible. If you want the dialog to be closed after user presses the "OK" button you have to call hide() and dispose() on it. (Usually in the actionPerformed(...) method of the listener you provided as a parameter. In case of the click on the "Cancel" button the dialog will be closed automatically.

Parameters:
folderPath - the path in the System Filesystem that is used as root for panel composition. The content of the folder is assummed to be ProjectCustomizer.CompositeCategoryProvider instances
context - the context for the panels, up to the project type what the context shall be, for example org.netbeans.api.project.Project instance
preselectedCategory - name of one of the supplied categories or null. Category with given name will be selected. If null or if the category of given name does not exist the first category will be selected.
okOptionListener - listener which will be notified when the user presses the OK button.
helpCtx - Help context for the dialog, which will be used when the panels in the customizer do not specify their own help context.
Returns:
standard project customizer dialog.
Since:
org.netbeans.modules.projectuiapi/1 1.15

org.netbeans.modules.projectuiapi/1 1.24.0 6

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.