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

JavaTemplates (NetBeans Java Project API) - NetBeans API Javadoc 5.0.0

 

org.netbeans.spi.java.project.support.ui.templates
Class JavaTemplates

java.lang.Object
  extended byorg.netbeans.spi.java.project.support.ui.templates.JavaTemplates

public class JavaTemplates
extends Object

Default implementations of Java-specific template UI.


Method Summary
static WizardDescriptor.InstantiatingIterator createJavaTemplateIterator()
          Creates new WizardIterator containing standard Package chooser
static WizardDescriptor.Panel createPackageChooser(Project project, SourceGroup[] folders)
          Create a Java-oriented target chooser suitable for templates which are Java sources or otherwise intended to reside in a Java package.
static WizardDescriptor.Panel createPackageChooser(Project project, SourceGroup[] folders, WizardDescriptor.Panel bottomPanel)
          Create a Java-oriented target chooser suitable for templates which are Java sources or otherwise intended to reside in a Java package.
static WizardDescriptor.Panel createPackageChooser(Project project, SourceGroup[] folders, WizardDescriptor.Panel bottomPanel, boolean validPackageRequired)
          Create a Java-oriented target chooser suitable for templates which are Java sources or otherwise intended to reside in a Java package.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createPackageChooser

public static WizardDescriptor.Panel createPackageChooser(Project project,
                                                          SourceGroup[] folders)
                                                   throws IllegalArgumentException
Create a Java-oriented target chooser suitable for templates which are Java sources or otherwise intended to reside in a Java package. The user is prompted to choose a package location for the new file and a (base) name.

Parameters:
project - the project which the template will be created in
folders - a list of possible Java package roots to create the new file in (must be nonempty)
Returns:
a wizard panel prompting the user to choose a name and package
Throws:
IllegalArgumentException - if folders is empty

createPackageChooser

public static WizardDescriptor.Panel createPackageChooser(Project project,
                                                          SourceGroup[] folders,
                                                          WizardDescriptor.Panel bottomPanel)
                                                   throws IllegalArgumentException
Create a Java-oriented target chooser suitable for templates which are Java sources or otherwise intended to reside in a Java package. The user is prompted to choose a package location for the new file and a (base) name. Resulting panel can be decorated with additional panel. Which will be placed below the standard package chooser.

Parameters:
project - the project which the template will be created in
folders - a list of possible Java package roots to create the new file in (must be nonempty)
bottomPanel - panel which should be placed underneth the default chooser
Returns:
a wizard panel prompting the user to choose a name and package
Throws:
IllegalArgumentException - if folders is empty

createPackageChooser

public static WizardDescriptor.Panel createPackageChooser(Project project,
                                                          SourceGroup[] folders,
                                                          WizardDescriptor.Panel bottomPanel,
                                                          boolean validPackageRequired)
                                                   throws IllegalArgumentException
Create a Java-oriented target chooser suitable for templates which are Java sources or otherwise intended to reside in a Java package. The user is prompted to choose a package location for the new file and a (base) name; this method allows to specify whether a valid (non-empty) package is required. Resulting panel can be decorated with additional panel. Which will be placed below the standard package chooser.

Parameters:
project - the project which the template will be created in
folders - a list of possible Java package roots to create the new file in (must be nonempty)
bottomPanel - panel which should be placed underneth the default chooser
validPackageRequired - indicates whether a only a valid (non-empty) package is accepted
Returns:
a wizard panel prompting the user to choose a name and package
Throws:
IllegalArgumentException - if folders is empty
Since:
org.netbeans.modules.java.project/1 1.3

createJavaTemplateIterator

public static WizardDescriptor.InstantiatingIterator createJavaTemplateIterator()
Creates new WizardIterator containing standard Package chooser

Returns:
WizardIterator consisting of one panel containing package chooser

 

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