1 19 20 package org.netbeans.spi.java.project.support.ui.templates; 21 22 import org.netbeans.api.project.Project; 23 import org.netbeans.modules.java.project.JavaTargetChooserPanel; 24 import org.netbeans.modules.java.project.NewJavaFileWizardIterator; 25 import org.netbeans.api.project.SourceGroup; 26 import org.netbeans.spi.project.ui.templates.support.Templates; 27 import org.openide.WizardDescriptor; 28 import org.openide.filesystems.FileObject; 29 30 34 public class JavaTemplates { 35 36 private JavaTemplates() {} 37 38 47 public static WizardDescriptor.Panel createPackageChooser(Project project, SourceGroup[] folders) throws IllegalArgumentException { 48 return createPackageChooser(project, folders, null); 49 } 50 51 63 public static WizardDescriptor.Panel createPackageChooser(Project project, SourceGroup[] folders, WizardDescriptor.Panel bottomPanel) throws IllegalArgumentException { 64 return createPackageChooser(project, folders, bottomPanel, false); 65 } 66 67 82 public static WizardDescriptor.Panel createPackageChooser(Project project, SourceGroup[] folders, 83 WizardDescriptor.Panel bottomPanel, boolean validPackageRequired) throws IllegalArgumentException { 84 if (folders.length == 0) { 85 throw new IllegalArgumentException ("No folders selected"); } 87 return new JavaTargetChooserPanel(project, folders, bottomPanel, NewJavaFileWizardIterator.TYPE_FILE, validPackageRequired); 88 } 89 90 93 public static WizardDescriptor.InstantiatingIterator createJavaTemplateIterator () { 94 return new NewJavaFileWizardIterator (); 95 } 96 97 } 98 | Popular Tags |