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

Templates (NetBeans Project UI API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.spi.project.ui.templates.support
Class Templates

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

public class Templates
extends Object

Default implementations of template UI.


Method Summary
static WizardDescriptor.Panel createSimpleTargetChooser(Project project, SourceGroup[] folders)
          Create a basic target chooser suitable for many kinds of templates.
static WizardDescriptor.Panel createSimpleTargetChooser(Project project, SourceGroup[] folders, WizardDescriptor.Panel bottomPanel)
          Create a basic target chooser suitable for many kinds of templates.
static Project getProject(WizardDescriptor wizardDescriptor)
          Method to communicate current choice of project to a custom WizardIteartor associated with particular template
static FileObject getTargetFolder(WizardDescriptor wizardDescriptor)
          Method to communicate current choice of target folder to a custom WizardDescriptor.InstantiatingIterator associated with particular template.
static String getTargetName(WizardDescriptor wizardDescriptor)
          Method to communicate current choice of target name to a custom WizardDescriptor.InstantiatingIterator associated with particular template.
static FileObject getTemplate(WizardDescriptor wizardDescriptor)
          Method to communicate current choice of template to a custom WizardDescriptor.InstantiatingIterator associated with particular template.
static void setTargetFolder(WizardDescriptor wizardDescriptor, FileObject folder)
          Sets the target folder for given WizardDescriptor to be used from custom target choosers
static void setTargetName(WizardDescriptor wizardDescriptor, String targetName)
          Sets the target name for given WizardDescriptor to be used from custom target choosers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getProject

public static Project getProject(WizardDescriptor wizardDescriptor)
Method to communicate current choice of project to a custom WizardIteartor associated with particular template


getTemplate

public static FileObject getTemplate(WizardDescriptor wizardDescriptor)
Method to communicate current choice of template to a custom WizardDescriptor.InstantiatingIterator associated with particular template.


getTargetFolder

public static FileObject getTargetFolder(WizardDescriptor wizardDescriptor)
Method to communicate current choice of target folder to a custom WizardDescriptor.InstantiatingIterator associated with particular template.


setTargetFolder

public static void setTargetFolder(WizardDescriptor wizardDescriptor,
                                   FileObject folder)
Sets the target folder for given WizardDescriptor to be used from custom target choosers


getTargetName

public static String getTargetName(WizardDescriptor wizardDescriptor)
Method to communicate current choice of target name to a custom WizardDescriptor.InstantiatingIterator associated with particular template.


setTargetName

public static void setTargetName(WizardDescriptor wizardDescriptor,
                                 String targetName)
Sets the target name for given WizardDescriptor to be used from custom target choosers


createSimpleTargetChooser

public static WizardDescriptor.Panel createSimpleTargetChooser(Project project,
                                                               SourceGroup[] folders)
Create a basic target chooser suitable for many kinds of templates. The user is prompted to choose a location for the new file and a (base) name. Instantiation is handled by DataObject.createFromTemplate(org.openide.loaders.DataFolder).

Parameters:
project - The project to work on.
folders - a list of possible roots to create the new file in
Returns:
a wizard panel(s) prompting the user to choose a name and location

createSimpleTargetChooser

public static WizardDescriptor.Panel createSimpleTargetChooser(Project project,
                                                               SourceGroup[] folders,
                                                               WizardDescriptor.Panel bottomPanel)
Create a basic target chooser suitable for many kinds of templates. The user is prompted to choose a location for the new file and a (base) name. Instantiation is handled by DataObject.createFromTemplate(org.openide.loaders.DataFolder). Resulting panel can be decorated with additional panel placed below the standard target chooser.

Parameters:
project - The project to work on.
folders - a list of possible roots to create the new file in
bottomPanel - panel which should be placed underneth the default chooser
Returns:
a wizard panel(s) prompting the user to choose a name and location

 

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