示例#1
0
 private void configDelActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_configDelActionPerformed
   String config = (String) configCombo.getSelectedItem();
   assert config != null;
   configs.put(config, null);
   configChanged(null);
   uiProperties.activeConfig = null;
 } // GEN-LAST:event_configDelActionPerformed
示例#2
0
 private void configComboActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_configComboActionPerformed
   String config = (String) configCombo.getSelectedItem();
   if (config.length() == 0) {
     config = null;
   }
   configChanged(config);
   uiProperties.activeConfig = config;
 } // GEN-LAST:event_configComboActionPerformed
示例#3
0
 private void configNewActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_configNewActionPerformed
   NotifyDescriptor.InputLine d =
       new NotifyDescriptor.InputLine(
           NbBundle.getMessage(CustomizerRun.class, "CustomizerRun.input.prompt"), // NOI18N
           NbBundle.getMessage(CustomizerRun.class, "CustomizerRun.input.title")); // NOI18N
   if (DialogDisplayer.getDefault().notify(d) != NotifyDescriptor.OK_OPTION) {
     return;
   }
   String name = d.getInputText();
   String config = name.replaceAll("[^a-zA-Z0-9_.-]", "_"); // NOI18N
   if (config.trim().length() == 0) {
     // #143764
     DialogDisplayer.getDefault()
         .notify(
             new NotifyDescriptor.Message(
                 NbBundle.getMessage(
                     CustomizerRun.class, "CustomizerRun.input.empty", config), // NOI18N
                 NotifyDescriptor.WARNING_MESSAGE));
     return;
   }
   if (configs.get(config) != null) {
     DialogDisplayer.getDefault()
         .notify(
             new NotifyDescriptor.Message(
                 NbBundle.getMessage(
                     CustomizerRun.class, "CustomizerRun.input.duplicate", config), // NOI18N
                 NotifyDescriptor.WARNING_MESSAGE));
     return;
   }
   Map<String, String> m = new HashMap<String, String>();
   if (!name.equals(config)) {
     m.put("$label", name); // NOI18N
   }
   configs.put(config, m);
   configChanged(config);
   uiProperties.activeConfig = config;
 } // GEN-LAST:event_configNewActionPerformed