本文整理汇总了Java中org.openide.WizardDescriptor.putProperty方法的典型用法代码示例。如果您正苦于以下问题:Java WizardDescriptor.putProperty方法的具体用法?Java WizardDescriptor.putProperty怎么用?Java WizardDescriptor.putProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openide.WizardDescriptor
的用法示例。
在下文中一共展示了WizardDescriptor.putProperty方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readSettings
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@Override
public void readSettings(WizardDescriptor wizard) {
this.wizard = wizard;
if ( gui != null ) {
// Try to preselect a folder
FileObject preselectedFolder = Templates.getTargetFolder( wizard );
// Init values
gui.initValues( Templates.getTemplate( wizard ), preselectedFolder );
}
if ( bottomPanel != null ) {
bottomPanel.readSettings(wizard);
}
// XXX hack, TemplateWizard in final setTemplateImpl() forces new wizard's title
// this name is used in NewFileWizard to modify the title
if (gui != null) {
Object substitute = gui.getClientProperty ("NewFileWizard_Title"); // NOI18N
if (substitute != null) {
wizard.putProperty ("NewFileWizard_Title", substitute); // NOI18N
}
}
}
示例2: initWizardDescriptor
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
private void initWizardDescriptor() {
wizardDescriptor = new WizardDescriptor(this);
wizardDescriptor.setTitle(Bundle.ProfilingPointWizard_WizardTitle());
wizardDescriptor.setTitleFormat(new MessageFormat("{0}")); // NOI18N
wizardDescriptor.putProperty(WizardDescriptor.PROP_AUTO_WIZARD_STYLE, Boolean.TRUE); // NOI18N
wizardDescriptor.putProperty(WizardDescriptor.PROP_CONTENT_DISPLAYED, Boolean.TRUE); // NOI18N
wizardDescriptor.putProperty(WizardDescriptor.PROP_CONTENT_NUMBERED, Boolean.TRUE); // NOI18N
wizardDescriptor.putProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, Integer.valueOf(0)); // NOI18N
}
示例3: store
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@Override
void store(WizardDescriptor d) {
String name = projectNameTextField.getText().trim();
String location = projectLocationTextField.getText().trim();
String folder = createdFolderTextField.getText().trim();
d.putProperty( /*XXX Define somewhere */"projdir", new File(folder)); // NOI18N
d.putProperty( /*XXX Define somewhere */"name", name); // NOI18N
}
示例4: storeSettings
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
public @Override void storeSettings(WizardDescriptor wiz) {
if (WizardDescriptor.NEXT_OPTION.equals(wiz.getValue()) ||
WizardDescriptor.FINISH_OPTION.equals(wiz.getValue())) {
panel.storeToDataModel();
}
//XXX hack
wiz.putProperty("NewFileWizard_Title", null); // NOI18N
}
示例5: initialize
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@Override
public void initialize(WizardDescriptor wizard) {
project = Templates.getProject(wizard);
descriptor = new PersistenceUnitWizardDescriptor(project);
panels = new WizardDescriptor.Panel[] {descriptor};
wizard.putProperty("NewFileWizard_Title",
NbBundle.getMessage(PersistenceUnitWizard.class, "Templates/Persistence/PersistenceUnit"));
Wizards.mergeSteps(wizard, panels, null);
}
示例6: store
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@Override
void store (WizardDescriptor settings) {
File[] sourceRoots = ((FolderList)this.sourcePanel).getFiles();
File[] testRoots = ((FolderList)this.testsPanel).getFiles();
settings.putProperty ("sourceRoot",sourceRoots); //NOI18N
settings.putProperty("testRoot",testRoots); //NOI18N
}
示例7: read
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
void read (WizardDescriptor settings) {
File projectLocation = (File) settings.getProperty ("projdir"); //NOI18N
if (projectLocation == null || projectLocation.getParentFile() == null ||
(projectLocation.getParentFile().exists() && !projectLocation.getParentFile().isDirectory ())) {
projectLocation = ProjectChooser.getProjectsFolder();
}
else {
projectLocation = projectLocation.getParentFile();
}
this.projectLocationTextField.setText (projectLocation.getAbsolutePath());
String projectName = (String) settings.getProperty ("name"); //NOI18N
if (projectName == null) {
switch (type) {
case APP:
int baseCount = WizardSettings.getNewApplicationCount() + 1;
String formatter = NbBundle.getMessage(PanelSourceFolders.class,"TXT_JavaApplication");
while ((projectName=validFreeProjectName(projectLocation, formatter, baseCount))==null)
baseCount++;
settings.putProperty (NewJ2SEProjectWizardIterator.PROP_NAME_INDEX, new Integer(baseCount));
break;
default:
baseCount = WizardSettings.getNewLibraryCount() + 1;
formatter = NbBundle.getMessage(PanelSourceFolders.class,"TXT_JavaLibrary");
while ((projectName=validFreeProjectName(projectLocation, formatter, baseCount))==null)
baseCount++;
settings.putProperty (NewJ2SEProjectWizardIterator.PROP_NAME_INDEX, new Integer(baseCount));
}
}
this.projectNameTextField.setText (projectName);
this.projectNameTextField.selectAll();
}
示例8: loadSettings
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
private void loadSettings(WizardDescriptor wizard) {
JUnitSettings settings = JUnitSettings.getDefault();
wizard.putProperty(GuiUtils.CHK_SETUP, settings.isGenerateSetUp());
wizard.putProperty(GuiUtils.CHK_TEARDOWN, settings.isGenerateTearDown());
wizard.putProperty(GuiUtils.CHK_BEFORE_CLASS, settings.isGenerateClassSetUp());
wizard.putProperty(GuiUtils.CHK_AFTER_CLASS, settings.isGenerateClassTearDown());
wizard.putProperty(GuiUtils.CHK_HINTS, settings.isBodyComments());
}
示例9: readSettings
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@Override
public void readSettings(Object settings) {
wizardDescriptor = (WizardDescriptor) settings;
component.read(wizardDescriptor);
// XXX hack, TemplateWizard in final setTemplateImpl() forces new wizard's title
// this name is used in NewProjectWizard to modify the title
Object substitute = ((JComponent) component).getClientProperty("NewProjectWizard_Title"); // NOI18N
if (substitute != null){
wizardDescriptor.putProperty("NewProjectWizard_Title", substitute); // NOI18N
}
}
示例10: storeSettings
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@Override
public void storeSettings(WizardDescriptor wizard) {
Object value = wizard.getValue();
if (WizardDescriptor.PREVIOUS_OPTION.equals(value) || WizardDescriptor.CANCEL_OPTION.equals(value)
|| WizardDescriptor.CLOSED_OPTION.equals(value)) {
return;
}
if (gui != null) {
wizard.putProperty(CP_ITEMS_TO_MOVE, gui.getCPItemsToMove());
}
wizard.putProperty("NewFileWizard_Title", null); // NOI18N
}
示例11: valid
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
boolean valid( WizardDescriptor wizardDescriptor ) {
wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, ""); //NOI18N
return projectLocationPanel.valid( wizardDescriptor ) && optionsPanel.valid(wizardDescriptor);
}
示例12: storeSettings
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
public void storeSettings(Object settings) {
WizardDescriptor d = (WizardDescriptor)settings;
component.store(d);
d.putProperty ("NewProjectWizard_Title", null); // NOI18N
}
示例13: read
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@Override
void read(WizardDescriptor settings) {
File projectLocation = (File) settings.getProperty("projdir"); //NOI18N
if (projectLocation == null || projectLocation.getParentFile() == null || !projectLocation.getParentFile().isDirectory()) {
projectLocation = ProjectChooser.getProjectsFolder();
} else {
projectLocation = projectLocation.getParentFile();
}
this.projectLocationTextField.setText(projectLocation.getAbsolutePath());
String projectName = (String) settings.getProperty("name"); //NOI18N
if (projectName == null) {
switch (type) {
case APPLICATION:
case FXML:
int baseCount = WizardSettings.getNewApplicationCount() + 1;
String formatter = NbBundle.getMessage(PanelSourceFolders.class, "TXT_JavaFXApplication"); // NOI18N
while ((projectName = validFreeProjectName(projectLocation, formatter, baseCount)) == null) {
baseCount++;
}
settings.putProperty(JavaFXProjectWizardIterator.PROP_NAME_INDEX, new Integer(baseCount));
break;
case PRELOADER:
baseCount = WizardSettings.getNewPreloaderCount() + 1;
formatter = NbBundle.getMessage(PanelSourceFolders.class, "TXT_JavaFXPreloaderApplication"); // NOI18N
while ((projectName = validFreeProjectName(projectLocation, formatter, baseCount)) == null) {
baseCount++;
}
settings.putProperty(JavaFXProjectWizardIterator.PROP_NAME_INDEX, new Integer(baseCount));
break;
case SWING:
baseCount = WizardSettings.getNewFxSwingCount() + 1;
formatter = NbBundle.getMessage(PanelSourceFolders.class, "TXT_JavaFXSwingApplication"); // NOI18N
while ((projectName = validFreeProjectName(projectLocation, formatter, baseCount)) == null) {
baseCount++;
}
settings.putProperty(JavaFXProjectWizardIterator.PROP_NAME_INDEX, new Integer(baseCount));
break;
default:
baseCount = WizardSettings.getNewLibraryCount() + 1;
formatter = NbBundle.getMessage(PanelSourceFolders.class, "TXT_JavaLibrary"); // NOI18N
while ((projectName = validFreeProjectName(projectLocation, formatter, baseCount)) == null) {
baseCount++;
}
settings.putProperty(JavaFXProjectWizardIterator.PROP_NAME_INDEX, new Integer(baseCount));
}
}
this.projectNameTextField.setText(projectName);
this.projectNameTextField.selectAll();
}
示例14: readSettings
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
public void readSettings(Object settings) {
wizardDescriptor = (WizardDescriptor) settings;
wizardDescriptor.putProperty("NewFileWizard_Title", title);
}
示例15: valid
import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@Override
boolean valid(WizardDescriptor settings) {
if (!JavaFXPlatformUtils.isJavaFXEnabled(getSelectedPlatform())) {
setBottomPanelAreaVisible(false);
settings.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
NbBundle.getMessage(PanelOptionsVisual.class, "WARN_PanelOptionsVisual.notFXPlatform")); // NOI18N
return false;
}
setBottomPanelAreaVisible(true);
if (cbSharable.isSelected()) {
String location = txtLibFolder.getText();
if (projectLocation != null) {
if (new File(location).isAbsolute()) {
settings.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
NbBundle.getMessage(PanelOptionsVisual.class, "WARN_PanelOptionsVisual.absolutePath")); // NOI18N
} else {
File projectLoc = FileUtil.normalizeFile(new File(projectLocation));
File libLoc = PropertyUtils.resolveFile(projectLoc, location);
if (!CollocationQuery.areCollocated(projectLoc.toURI(), libLoc.toURI())) {
settings.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
NbBundle.getMessage(PanelOptionsVisual.class, "WARN_PanelOptionsVisual.relativePath")); // NOI18N
}
}
}
}
if (mainClassTextField.isVisible() && mainClassTextField.isEnabled()) {
if (!isMainClassValid) {
settings.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
NbBundle.getMessage(PanelOptionsVisual.class, "ERROR_IllegalMainClassName")); // NOI18N
return false;
}
}
if (txtPreloaderProject.isVisible() && txtPreloaderProject.isEnabled()) {
if (!isPreloaderNameValid) {
settings.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
NbBundle.getMessage(PanelOptionsVisual.class, "ERROR_IllegalPreloaderProjectName")); // NOI18N
return false;
}
}
if (fxmlTextField.isVisible()) {
if (!isFXMLNameValid) {
settings.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
NbBundle.getMessage(PanelOptionsVisual.class, "ERROR_IllegalFXMLName")); // NOI18N
return false;
}
}
return true;
}