@Override public void uninitialize(WizardDescriptor templateWizard) { panel = null; index = -1; this.wiz.putProperty(WizardConstants.PROPERTY_PROJECT_FOLDER, null); this.wiz.putProperty(WizardConstants.PROPERTY_NAME, null); }
public void showError(final String message) { if (wizard != null) wizard.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, message); }
public void uninitialize(TemplateWizard wiz) { if (wiz != null) { wiz.putProperty("additionalProperties", null); wiz.putProperty("projdir",null); //NOI18N wiz.putProperty("name",null); //NOI18N wiz.putProperty("mainClass",null); //NOI18N if (this.type == TYPE_EXT) { wiz.putProperty("sourceRoot",null); //NOI18N wiz.putProperty("testRoot",null); //NOI18N } } wiz = null; panels = null; }
public synchronized void storeData(final TemplateWizard object) { final String location = tLocation.getText(); object.putProperty(PROJECT_LOCATION, location); final String name = new File(location).getName(); object.putProperty(ProjectPanel.PROJECT_NAME, "Imported Project" + (name != null ? " - " + name+'1' : "1")); // NOI18N String detectedConfiguration = null; String detectedProfile = null; final Map<String,String> map = new HashMap<String,String>(); detectedConfiguration = map.get("MicroEdition-Configuration"); // NOI18N detectedProfile = map.get("MicroEdition-Profile"); // NOI18N object.putProperty(PlatformSelectionPanel.REQUIRED_CONFIGURATION, detectedConfiguration); object.putProperty(PlatformSelectionPanel.REQUIRED_PROFILE, detectedProfile); }
public void propertyChange(PropertyChangeEvent ev) { if (PROP_CONTENT_SELECTED_INDEX.equals(ev.getPropertyName())) { putProperty(PROP_CONTENT_SELECTED_INDEX, new Integer(getContentSelectedIndex())); } else { if ((PROP_CONTENT_DATA.equals(ev.getPropertyName())) && (getContentData() != null)) { putProperty(PROP_CONTENT_DATA, getContentData()); } } } };
public boolean isValid() { // If it is always OK to press Next or Finish, then: if (!isBodyTagSupport() && Profile.J2EE_13.equals(j2eeVersion)) { wizard.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, // NOI18N org.openide.util.NbBundle.getMessage(TagHandlerSelection.class, "NOTE_simpleTag")); } else { wizard.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, ""); // NOI18N } return true; // If it depends on some condition (form filled out...), then: // return someCondition (); // and when this condition changes (last form field filled in...) then: // fireChangeEvent (); // and uncomment the complicated stuff below. }
/** Constructor to be called from public default one. */ private TemplateWizard (TemplateWizardIterImpl it) { super (it); this.iterator = it; // pass this to iterator iterator.initialize(this); putProperty("WizardPanel_autoWizardStyle", Boolean.TRUE); // NOI18N putProperty("WizardPanel_contentDisplayed", Boolean.TRUE); // NOI18N putProperty("WizardPanel_contentNumbered", Boolean.TRUE); // NOI18N setTitle(NbBundle.getMessage(TemplateWizard.class,"CTL_TemplateTitle")); //NOI18N setTitleFormat(new java.text.MessageFormat("{0}")); // NOI18N }
@Override public void readSettings(Object settings) { wizard = (TemplateWizard) settings; component.read(wizard); // 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) wizard.putProperty("NewProjectWizard_Title", substitute); // NOI18N }
@Override public void storeSettings( TargetChooserPanel<FileType> panel ) { panel.getTemplateWizard().putProperty(FileType.IS_XML, getUIManager().isXml()); panel.getTemplateWizard().putProperty(FileType.IS_SEGMENT, getUIManager().isSegment()); panel.getTemplateWizard().putProperty(FileType.IS_FACELETS, false); }
@Override public boolean isValid() { getComponent(); if (component.valid(wizard)) { // check that this project has a valid target server if (!ServerUtil.isValidServerInstance(project)) { wizard.putProperty(WizardDescriptor.PROP_WARNING_MESSAGE, NbBundle.getMessage(ManagedBeanPanel.class, "WARN_MissingTargetServer")); } return true; } return false; }
public boolean isValid( TargetChooserPanel<FileType> panel ) { if ( !panel.checkValid() ){ return false; } // check if the TLD info is correct // XX precisely we should check for 'tokens composed of characters, // digits, ".", ":", "-", and the characters defined by Unicode, // such as "combining" or "extender"' to be sure that TLD will validate String tldName = panel.getComponent().getTargetName(); if (tldName.indexOf(' ') >= 0 || tldName.indexOf(',') >= 0) { panel.getTemplateWizard().putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, NbBundle.getMessage(TagLibTargetPanelProvider.class, "TXT_wrongTagLibName", tldName)); // NOI18N return false; } return true; }
public void storeSettings( TargetChooserPanel<FileType> panel ) { if (isFacelets()) { Preferences preferences = ProjectUtils.getPreferences( panel.getProject(), ProjectUtils.class, true); String key = "jsf.language"; //NOI18N String value = "Facelets"; //NOI18N if (!preferences.get(key, "").equals(value)){ preferences.put(key, value); } } panel.getTemplateWizard().putProperty(FileType.IS_XML, false); panel.getTemplateWizard().putProperty(FileType.IS_SEGMENT, getUIManager().isSegment()); panel.getTemplateWizard().putProperty(FileType.IS_FACELETS, getUIManager().isFacelets()); }
@Override public void storeSettings( TargetChooserPanel<FileType> panel ) { panel.getTemplateWizard().putProperty(FileType.IS_XML, getUIManager().isXml()); panel.getTemplateWizard().putProperty(FileType.IS_SEGMENT, getUIManager().isSegment()); panel.getTemplateWizard().putProperty(IS_TLD_SELECTED, getUIManager().isTldCheckBoxSelected()); panel.getTemplateWizard().putProperty(TLD_FILE_OBJECT, getUIManager().getTldFileObject()); panel.getTemplateWizard().putProperty(TAG_NAME, getUIManager().getTagName()); }
@Override public boolean isValid(TargetChooserPanel<FileType> panel) { if (super.isValid(panel)) { // check that this project has a valid target server if (!ServerUtil.isValidServerInstance(panel.getProject())) { panel.getTemplateWizard().putProperty(WizardDescriptor.PROP_WARNING_MESSAGE, NbBundle.getMessage(JSFTargetPanelProvider.class, "WARN_MissingTargetServer")); } return true; } return false; }
@Override public void storeSettings( TargetChooserPanel<FileType> panel ) { panel.getTemplateWizard().putProperty(URI, getUIManager().getUri()); panel.getTemplateWizard().putProperty(PREFIX, getUIManager().getPrefix()); }
protected WizardDescriptor.Panel[] createPanels(Project project, TemplateWizard wiz) { Sources sources = ProjectUtils.getSources(project); SourceGroup[] sourceGroups = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA); facesComponentPanel = new FacesComponentPanel(wiz); WizardDescriptor.Panel javaPanel; if (sourceGroups.length == 0) { wiz.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, NbBundle.getMessage(FacesComponentIterator.class, "MSG_No_Sources_found")); //NOI18N javaPanel = facesComponentPanel; } else { javaPanel = JavaTemplates.createPackageChooser(project, sourceGroups, facesComponentPanel); } return new WizardDescriptor.Panel[]{javaPanel}; }
public void initialize (org.openide.loaders.TemplateWizard templateWizard) { this.wiz = templateWizard; String name = templateWizard.getTemplate().getName(); templateWizard.putProperty (WizardProperties.NAME, name); basicPanel = new PanelConfigureProject(); currentIndex = 0; updateStepsList (); }
public void readSettings(final Object obj) { wizard = (TemplateWizard) obj; ((ImportCDCProjectPanel) getComponent()).readData(wizard); Component component = getComponent(); Object substitute = ((JComponent)component).getClientProperty ("NewProjectWizard_Title"); // NOI18N if (substitute != null) { wizard.putProperty ("NewProjectWizard_Title", substitute); // NOI18N } }
public void setData() { String displayName = null; DataObject templateDo = wizard.getTemplate(); displayName = templateDo.getNodeDelegate ().getDisplayName (); wizard.putProperty("NewFileWizard_Title", displayName); jLinstruction.setEnabled(deployData.makeEntry()); paramPanel.setEnabled(deployData.makeEntry()); }
@Override public void initialize(WizardDescriptor wizard) { int i = 0; this.wiz = (TemplateWizard)wizard; String name = wiz.getTemplate().getNodeDelegate().getName(); if (name != null) { name = name.replaceAll(" ", ""); // NOI18N } wiz.putProperty(WizardConstants.PROPERTY_NAME, name); String wizardTitle = getString("SAMPLE_PROJECT") + name; // NOI18N String wizardTitleACSD = getString("SAMPLE_PROJECT_ACSD"); // NOI18N panel = getPanel(-1, name, wizardTitle, wizardTitleACSD, false); String[] steps = new String[1]; JComponent jc = (JComponent) panel.getComponent(); steps[i] = ((NamedPanel) panel).getName(); jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps); jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, i); }