private Object[] buttons() {
   ResourceBundle bundle = NbBundle.getBundle(PropertyAction.class);
   JButton okButton = new JButton();
   Mnemonics.setLocalizedText(okButton, bundle.getString("CTL_OK")); // NOI18N
   okButton
       .getAccessibleContext()
       .setAccessibleDescription(bundle.getString("ACSD_CTL_OK")); // NOI18N
   okButton.setActionCommand(OK_COMMAND);
   JButton cancelButton = new JButton();
   Mnemonics.setLocalizedText(cancelButton, bundle.getString("CTL_Cancel")); // NOI18N
   cancelButton
       .getAccessibleContext()
       .setAccessibleDescription(bundle.getString("ACSD_CTL_Cancel")); // NOI18N
   cancelButton.setActionCommand(CANCEL_COMMAND);
   if (property.isDefaultValue()) {
     if ("Aqua".equals(UIManager.getLookAndFeel().getID())) {
       return new Object[] {cancelButton, okButton};
     } else {
       return new Object[] {okButton, cancelButton};
     }
   } else {
     JButton restoreButton = new JButton();
     Mnemonics.setLocalizedText(restoreButton, bundle.getString("CTL_RestoreDefault")); // NOI18N
     restoreButton
         .getAccessibleContext()
         .setAccessibleDescription(bundle.getString("ACSD_CTL_RestoreDefault")); // NOI18N
     restoreButton.setActionCommand(RESTORE_COMMAND);
     if ("Aqua".equals(UIManager.getLookAndFeel().getID())) {
       return new Object[] {restoreButton, cancelButton, okButton};
     } else {
       return new Object[] {okButton, restoreButton, cancelButton};
     }
   }
 }
Exemple #2
0
 public Update(File repository, String defaultRevision) {
   this.repository = repository;
   panel = new UpdatePanel(repository);
   okButton = new JButton();
   org.openide.awt.Mnemonics.setLocalizedText(
       okButton,
       org.openide.util.NbBundle.getMessage(
           RevertModifications.class, "CTL_UpdateForm_Action_Update")); // NOI18N
   okButton
       .getAccessibleContext()
       .setAccessibleDescription(
           org.openide.util.NbBundle.getMessage(
               RevertModifications.class, "ACSD_UpdateForm_Action_Update")); // NOI18N
   okButton
       .getAccessibleContext()
       .setAccessibleName(
           org.openide.util.NbBundle.getMessage(
               RevertModifications.class, "ACSN_UpdateForm_Action_Update")); // NOI18N
   cancelButton = new JButton();
   org.openide.awt.Mnemonics.setLocalizedText(
       cancelButton,
       org.openide.util.NbBundle.getMessage(
           RevertModifications.class, "CTL_UpdateForm_Action_Cancel")); // NOI18N
   cancelButton
       .getAccessibleContext()
       .setAccessibleDescription(
           org.openide.util.NbBundle.getMessage(
               RevertModifications.class, "ACSD_UpdateForm_Action_Cancel")); // NOI18N
   cancelButton
       .getAccessibleContext()
       .setAccessibleName(
           org.openide.util.NbBundle.getMessage(
               RevertModifications.class, "ACSN_UpdateForm_Action_Cancel")); // NOI18N
 }
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    targetFolderLabel = new JLabel();
    targetFolderTextField = new JTextField();
    browseTargetFolderButton = new JButton();

    targetFolderLabel.setLabelFor(targetFolderTextField);
    Mnemonics.setLocalizedText(
        targetFolderLabel,
        NbBundle.getMessage(
            BrowseFolderPanel.class, "BrowseFolderPanel.targetFolderLabel.text")); // NOI18N
    Mnemonics.setLocalizedText(
        browseTargetFolderButton,
        NbBundle.getMessage(
            BrowseFolderPanel.class, "BrowseFolderPanel.browseTargetFolderButton.text")); // NOI18N
    browseTargetFolderButton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            browseTargetFolderButtonActionPerformed(evt);
          }
        });

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(targetFolderLabel)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(
                        targetFolderTextField, GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(browseTargetFolderButton)
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(
                        layout
                            .createParallelGroup(Alignment.BASELINE)
                            .addComponent(targetFolderLabel)
                            .addComponent(
                                targetFolderTextField,
                                GroupLayout.PREFERRED_SIZE,
                                GroupLayout.DEFAULT_SIZE,
                                GroupLayout.PREFERRED_SIZE)
                            .addComponent(browseTargetFolderButton))));
  } // </editor-fold>//GEN-END:initComponents
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    freeFormatCheckBox = new javax.swing.JCheckBox();
    autoDetect = new javax.swing.JCheckBox();

    setName(null);
    setOpaque(false);

    org.openide.awt.Mnemonics.setLocalizedText(
        freeFormatCheckBox,
        org.openide.util.NbBundle.getMessage(FmtTabsIndents.class, "LBL_Free_Format")); // NOI18N

    org.openide.awt.Mnemonics.setLocalizedText(
        autoDetect,
        org.openide.util.NbBundle.getMessage(FmtTabsIndents.class, "LBL_AUTO_DETECT")); // NOI18N

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(
                                autoDetect,
                                javax.swing.GroupLayout.Alignment.LEADING,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                freeFormatCheckBox,
                                javax.swing.GroupLayout.Alignment.LEADING,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                260,
                                Short.MAX_VALUE))
                    .addContainerGap(17, Short.MAX_VALUE)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addComponent(freeFormatCheckBox)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(autoDetect)));
  } // </editor-fold>//GEN-END:initComponents
 @Messages({
   "PROGRESS_checking_for_upgrade=Checking for old harnesses to upgrade",
   "CTL_Close=&Close",
   "CTL_NbPlatformManager_Title=NetBeans Platform Manager"
 })
 public static void showCustomizer() {
   final AtomicBoolean canceled = new AtomicBoolean();
   ProgressUtils.runOffEventDispatchThread(
       new Runnable() { // #207451
         @Override
         public void run() {
           HarnessUpgrader.checkForUpgrade();
         }
       },
       PROGRESS_checking_for_upgrade(),
       canceled,
       false);
   NbPlatformCustomizer customizer = new NbPlatformCustomizer();
   JButton closeButton = new JButton();
   Mnemonics.setLocalizedText(closeButton, CTL_Close());
   DialogDescriptor descriptor =
       new DialogDescriptor(
           customizer,
           CTL_NbPlatformManager_Title(),
           true,
           new Object[] {closeButton},
           closeButton,
           DialogDescriptor.DEFAULT_ALIGN,
           new HelpCtx("org.netbeans.modules.apisupport.project.ui.platform.NbPlatformCustomizer"),
           null);
   Dialog dlg = DialogDisplayer.getDefault().createDialog(descriptor);
   dlg.setVisible(true);
   dlg.dispose();
 }
Exemple #6
0
  private void addScriptCommandToOmegaT() {
    JMenu toolsMenu = Core.getMainWindow().getMainMenu().getToolsMenu();
    toolsMenu.add(new JSeparator());

    JMenuItem scriptMenu = new JMenuItem();
    Mnemonics.setLocalizedText(scriptMenu, OStrings.getString("TF_MENU_TOOLS_SCRIPTING"));
    scriptMenu.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            ScriptingWindow.this.setVisible(true);
          }
        });

    toolsMenu.add(scriptMenu);

    for (int i = 0; i < NUMBERS_OF_QUICK_SCRIPTS; i++) {
      JMenuItem menuItem = new JMenuItem();
      m_quickMenus[i] = menuItem;

      String scriptName = Preferences.getPreferenceDefault("scripts_quick_" + scriptKey(i), null);

      if (scriptName != null || "".equals(scriptName)) {
        setQuickScriptMenu(new ScriptItem(new File(m_scriptsDirectory, scriptName)), i);
      } else {
        unsetQuickScriptMenu(i);
      }

      // Since the script is run while editing a segment, the shortcut should not interfere
      // with the segment content, so we set it to a Function key.
      m_quickMenus[i].setAccelerator(KeyStroke.getKeyStroke("shift ctrl F" + (i + 1)));

      toolsMenu.add(menuItem);
    }
  }
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    buttonGroup = new javax.swing.ButtonGroup();
    checkBoxes = new javax.swing.JPanel();
    label = new javax.swing.JLabel();
    searchInComments = new javax.swing.JCheckBox();

    setLayout(new java.awt.BorderLayout());

    checkBoxes.setLayout(new java.awt.BorderLayout());

    label.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 8, 0));
    checkBoxes.add(label, java.awt.BorderLayout.NORTH);

    searchInComments.setSelected(
        ((Boolean) RefactoringModule.getOption("searchInComments.whereUsed", Boolean.FALSE))
            .booleanValue());
    java.util.ResourceBundle bundle =
        java.util.ResourceBundle.getBundle(
            "org/netbeans/modules/visage/refactoring/impl/ui/Bundle"); // NOI18N
    org.openide.awt.Mnemonics.setLocalizedText(
        searchInComments, bundle.getString("LBL_SafeDelInComents")); // NOI18N
    searchInComments.setMargin(new java.awt.Insets(2, 14, 2, 2));
    searchInComments.addItemListener(
        new java.awt.event.ItemListener() {
          public void itemStateChanged(java.awt.event.ItemEvent evt) {
            searchInCommentsItemStateChanged(evt);
          }
        });
    checkBoxes.add(searchInComments, java.awt.BorderLayout.SOUTH);
    searchInComments.getAccessibleContext().setAccessibleDescription(searchInComments.getText());

    add(checkBoxes, java.awt.BorderLayout.NORTH);
  } // </editor-fold>//GEN-END:initComponents
Exemple #8
0
  private void setupDirectorySelection(JPanel panel) {
    JLabel lblScriptsDirectory = new JLabel(OStrings.getString("SCW_SCRIPTS_FOLDER"));
    panel.add(lblScriptsDirectory);

    m_txtScriptsDir = new JTextField();
    panel.add(m_txtScriptsDir);
    if (m_scriptsDirectory != null) {
      m_txtScriptsDir.setText(m_scriptsDirectory.getPath());
    }

    m_txtScriptsDir.setColumns(40);
    m_txtScriptsDir.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent evt) {
            directoryTextFieldActionPerformed(evt);
          }
        });

    JButton btnBrowse = new JButton();
    Mnemonics.setLocalizedText(btnBrowse, OStrings.getString("SCW_SCRIPTS_FOLDER_CHOOSE"));
    btnBrowse.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent evt) {
            directoryChooserButtonActionPerformed(evt);
          }
        });

    panel.add(btnBrowse);
  }
 @Override
 public JMenuItem getMenuPresenter() {
   JMenu menu = new UpdatingMenu();
   String label = NbBundle.getMessage(EditorsAction.class, "CTL_EditorsAction");
   Mnemonics.setLocalizedText(menu, label);
   return menu;
 }
    public JComponent[] getMenuPresenters() {
      assert SwingUtilities.isEventDispatchThread() : "Must be called from AWT";
      removeAll();
      final TopComponent tc = WindowManager.getDefault().getRegistry().getActivated();
      if (tc != null) {
        setEnabled(true);
        MultiViewHandler handler = MultiViews.findMultiViewHandler(tc);
        if (handler != null) {
          ButtonGroup group = new ButtonGroup();
          MultiViewPerspective[] pers = handler.getPerspectives();
          final String[] names = new String[pers.length];
          for (int i = 0; i < pers.length; i++) {
            MultiViewPerspective thisPers = pers[i];

            JRadioButtonMenuItem item = new JRadioButtonMenuItem();
            names[i] = thisPers.getDisplayName();
            Mnemonics.setLocalizedText(item, thisPers.getDisplayName());
            item.setActionCommand(thisPers.getDisplayName());
            item.addActionListener(
                new ActionListener() {
                  public void actionPerformed(ActionEvent event) {
                    MultiViewHandler handler = MultiViews.findMultiViewHandler(tc);
                    if (handler == null) {
                      return;
                    }
                    MultiViewPerspective thisPers = null;
                    MultiViewPerspective[] pers = handler.getPerspectives();
                    assert pers.length == names.length : "Arrays must have the same length";
                    for (int i = 0; i < pers.length; i++) {
                      if (event.getActionCommand().equals(names[i])) {
                        thisPers = pers[i];
                        break;
                      }
                    }
                    if (thisPers != null) {
                      handler.requestActive(thisPers);
                    }
                  }
                });
            if (thisPers
                .getDisplayName()
                .equals(handler.getSelectedPerspective().getDisplayName())) {
              item.setSelected(true);
            }
            group.add(item);
            add(item);
          }
        } else { // handler == null
          // No reason to enable action on any TC because now it was enabled even for Welcome page
          setEnabled(false);
          /*JRadioButtonMenuItem but = new JRadioButtonMenuItem();
          Mnemonics.setLocalizedText(but, NbBundle.getMessage(EditorsAction.class, "EditorsAction.source"));
          but.setSelected(true);
          add(but);*/
        }
      } else { // tc == null
        setEnabled(false);
      }
      return new JComponent[] {this};
    }
Exemple #11
0
 private void unsetQuickScriptMenu(int index) {
   m_quickScripts[index] = null;
   removeAllQuickScriptActionListenersFrom(m_quickMenus[index]);
   m_quickMenus[index].setEnabled(false);
   Mnemonics.setLocalizedText(
       m_quickMenus[index],
       "&" + scriptKey(index) + " - " + OStrings.getString("SCW_SCRIPTS_NONE"));
 }
Exemple #12
0
 public BaseTranslate() {
   menuItem = new JCheckBoxMenuItem();
   Mnemonics.setLocalizedText(menuItem, getName());
   menuItem.addActionListener(this);
   enabled = Preferences.isPreference(getPreferenceName());
   menuItem.setState(enabled);
   Core.getMainWindow().getMainMenu().getMachineTranslationMenu().add(menuItem);
 }
 @Override
 public Component getCustomEditor() {
   if (customEditor == null) {
     initComponents();
     Mnemonics.setLocalizedText(radioButton, mnemonic);
     initElements(Collections.<PropertyEditorElement>singleton(this));
   }
   return super.getCustomEditor();
 }
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jLabel1 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();

    org.openide.awt.Mnemonics.setLocalizedText(
        jLabel1,
        org.openide.util.NbBundle.getMessage(
            BuildActionsPanel.class, "BuildActionsPanel.jLabel1.text")); // NOI18N

    jTextArea1.setColumns(20);
    jTextArea1.setRows(5);
    jTextArea1.setText(
        org.openide.util.NbBundle.getMessage(
            BuildActionsPanel.class, "BuildActionsPanel.jTextArea1.text")); // NOI18N
    jScrollPane1.setViewportView(jTextArea1);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(jLabel1)
                                    .addGap(0, 0, Short.MAX_VALUE))
                            .addComponent(
                                jScrollPane1,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                521,
                                Short.MAX_VALUE))
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(22, 22, 22)
                    .addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(
                        jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 185, Short.MAX_VALUE)
                    .addContainerGap()));
  } // </editor-fold>//GEN-END:initComponents
 private void connect(
     Application application,
     ProxyClient proxyClient,
     ApplicationRemovedListener listener,
     ApplicationAvailabilityListener aListener) {
   while (true) {
     try {
       proxyClient.connect();
       application.notifyWhenRemoved(listener);
       application.addPropertyChangeListener(Stateful.PROPERTY_STATE, aListener);
       break;
     } catch (SecurityException e) {
       LOGGER.log(Level.INFO, "connect", e); // NOI18N
       if (proxyClient.hasSSLStubCheck()) {
         Storage storage = application.getStorage();
         String noSSLProp = JmxApplicationProvider.PROPERTY_RETRY_WITHOUT_SSL;
         String noSSL = storage.getCustomProperty(noSSLProp);
         if (noSSL != null && Boolean.parseBoolean(noSSL)) { // NOI18N
           proxyClient.setInsecure();
           continue;
         } else {
           String conn = storage.getCustomProperty(DataSourceDescriptor.PROPERTY_NAME);
           if (conn == null)
             conn = storage.getCustomProperty(ApplicationType.PROPERTY_SUGGESTED_NAME);
           if (conn == null) conn = proxyClient.getUrl().toString();
           String msg =
               NbBundle.getMessage(JmxModelImpl.class, "MSG_Insecure_SSL", conn); // NOI18N
           String title = NbBundle.getMessage(JmxModelImpl.class, "Title_Insecure_SSL"); // NOI18N
           String retry = NbBundle.getMessage(JmxModelImpl.class, "Retry_Insecure_SSL"); // NOI18N
           JLabel l = new JLabel(msg);
           JCheckBox c = new JCheckBox();
           Mnemonics.setLocalizedText(c, retry);
           c.setSelected(noSSL == null);
           JPanel p = new JPanel(new BorderLayout(0, 20));
           p.add(l, BorderLayout.CENTER);
           p.add(c, BorderLayout.SOUTH);
           NotifyDescriptor dd =
               new NotifyDescriptor.Confirmation(p, title, NotifyDescriptor.YES_NO_OPTION);
           if (DialogDisplayer.getDefault().notify(dd) == NotifyDescriptor.YES_OPTION) {
             storage.setCustomProperty(noSSLProp, Boolean.toString(c.isSelected()));
             proxyClient.setInsecure();
             continue;
           } else {
             break;
           }
         }
       }
       if (supplyCredentials(application, proxyClient) == null) {
         break;
       }
     }
   }
 }
  /** Creates new form BrowseFolders */
  public NoProjectNew(int type, DataFolder targetFolder, JButton okOption) {
    initComponents();
    nameTextField.getDocument().addDocumentListener(this);

    this.type = type;
    this.targetFolder = targetFolder;
    this.okOption = okOption;

    switch (type) {
      case TYPE_FILE:
        org.openide.awt.Mnemonics.setLocalizedText(nameLabel, FILE_NAME);
        nameTextField.getAccessibleContext().setAccessibleDescription(FILE_TEXT_FIELD_ACD);
        getAccessibleContext().setAccessibleDescription(FILE_DIALOG_ACD);
        break;
      case TYPE_FOLDER:
        org.openide.awt.Mnemonics.setLocalizedText(nameLabel, FOLDER_NAME);
        nameTextField.getAccessibleContext().setAccessibleDescription(FOLDER_TEXT_FIELD_ACD);
        getAccessibleContext().setAccessibleDescription(FOLDER_DIALOG_ACD);
        break;
    }

    this.okOption.setEnabled(false);
  }
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jLabel1 = new javax.swing.JLabel();
    termsList = new javax.swing.JComboBox();

    org.openide.awt.Mnemonics.setLocalizedText(
        jLabel1,
        org.openide.util.NbBundle.getMessage(
            DeletePresencePanel.class, "DeletePresencePanel.jLabel1.text")); // NOI18N

    termsList.setModel(new javax.swing.DefaultComboBoxModel(new String[] {}));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1)
                            .addComponent(
                                termsList,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                238,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        termsList,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
  } // </editor-fold>//GEN-END:initComponents
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    nameLabel = new javax.swing.JLabel();
    nameField = new javax.swing.JTextField();

    org.openide.awt.Mnemonics.setLocalizedText(
        nameLabel,
        org.openide.util.NbBundle.getMessage(
            CategoryNamePanel.class, "CategoryNamePanel.nameLabel.text")); // NOI18N

    nameField.setText(
        org.openide.util.NbBundle.getMessage(
            CategoryNamePanel.class, "CategoryNamePanel.nameField.text")); // NOI18N

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(nameLabel)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        nameField, javax.swing.GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE)
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(nameLabel)
                            .addComponent(
                                nameField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(41, Short.MAX_VALUE)));
  } // </editor-fold>//GEN-END:initComponents
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jButton1 = new javax.swing.JButton();
    jScrollPane1 = new BeanTreeView();

    setToolTipText(
        org.openide.util.NbBundle.getMessage(
            TreeBrowserTopComponent.class, "TreeBrowserTopComponent.toolTipText")); // NOI18N

    jButton1.setIcon(
        new javax.swing.ImageIcon(
            "/home/justin/Programs/GITClones/github/netbeans-opc-browser/modules/netbeans-opc-browser-plugin/src/main/resources/com/summit/opc/nb/serverIcon.png")); // NOI18N
    org.openide.awt.Mnemonics.setLocalizedText(
        jButton1,
        org.openide.util.NbBundle.getMessage(
            TreeBrowserTopComponent.class, "TreeBrowserTopComponent.jButton1.text")); // NOI18N
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jButton1)
                    .addContainerGap(212, Short.MAX_VALUE))
            .addComponent(jScrollPane1));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jButton1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 279, Short.MAX_VALUE)));
  } // </editor-fold>//GEN-END:initComponents
Exemple #20
0
  private void setQuickScriptMenu(ScriptItem scriptItem, int index) {
    m_quickScripts[index] = scriptItem.getName();

    removeAllQuickScriptActionListenersFrom(m_quickMenus[index]);
    m_quickMenus[index].addActionListener(new QuickScriptActionListener(index));

    // Since the script is run while editing a segment, the shortcut should not interfere
    // with the segment content, so we set it to a Function key.
    m_quickMenus[index].setAccelerator(KeyStroke.getKeyStroke("shift ctrl F" + (index + 1)));
    m_quickMenus[index].setEnabled(true);
    if ("".equals(scriptItem.getDescription())) {
      m_quickMenus[index].setToolTipText(scriptItem.getDescription());
    }

    Mnemonics.setLocalizedText(
        m_quickMenus[index], "&" + scriptKey(index) + " - " + scriptItem.getScriptName());
  }
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    jLblTreeView = new javax.swing.JLabel();

    setLayout(new java.awt.GridBagLayout());

    org.openide.awt.Mnemonics.setLocalizedText(
        jLblTreeView,
        NbBundle.getMessage(
            DefaultClientSelectionPanel.class, "LBL_AvailableWebServices")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(11, 11, 0, 11);
    add(jLblTreeView, gridBagConstraints);
  } // </editor-fold>//GEN-END:initComponents
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    tfShortcut = new javax.swing.JTextField();

    java.util.ResourceBundle bundle =
        java.util.ResourceBundle.getBundle(
            "org/netbeans/modules/apisupport/project/ui/wizard/action/Bundle"); // NOI18N
    org.openide.awt.Mnemonics.setLocalizedText(
        tfShortcutLabel, bundle.getString("LBL_Shortcut")); // NOI18N

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(tfShortcutLabel)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        tfShortcut, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(tfShortcutLabel)
                            .addComponent(
                                tfShortcut,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
  } // </editor-fold>//GEN-END:initComponents
 @NbBundle.Messages({
   "TransferFilesChooser.title.download=File Download",
   "TransferFilesChooser.title.upload=File Upload",
   "TransferFilesChooser.button.downloadWithMnemonics=&Download",
   "TransferFilesChooser.button.uploadWithMnemonics=&Upload"
 })
 public Set<TransferFile> showDialog() {
   String title;
   String buttonLabel;
   switch (transferType) {
     case DOWNLOAD:
       title = Bundle.TransferFilesChooser_title_download();
       buttonLabel = Bundle.TransferFilesChooser_button_downloadWithMnemonics();
       break;
     case UPLOAD:
       title = Bundle.TransferFilesChooser_title_upload();
       buttonLabel = Bundle.TransferFilesChooser_button_uploadWithMnemonics();
       break;
     default:
       throw new IllegalStateException("Unknown transfer type: " + transferType);
   }
   JButton okButton = new JButton();
   Mnemonics.setLocalizedText(okButton, buttonLabel);
   DialogDescriptor descriptor =
       new DialogDescriptor(
           getTransferVisual(),
           title,
           true,
           new Object[] {okButton, DialogDescriptor.CANCEL_OPTION},
           okButton,
           DialogDescriptor.DEFAULT_ALIGN,
           null,
           null);
   if (DialogDisplayer.getDefault().notify(descriptor) == okButton) {
     return getTransferPanel().getSelectedFiles();
   }
   return Collections.<TransferFile>emptySet();
 }
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jScrollPane1 = new javax.swing.JScrollPane();
    presenceTable = new javax.swing.JTable();
    titleLabel = new javax.swing.JLabel();

    setLayout(new java.awt.BorderLayout());

    presenceTable.setModel(
        new javax.swing.table.DefaultTableModel(new Object[][] {{}, {}, {}, {}}, new String[] {}));

    presenceTable.setColumnSelectionAllowed(true);
    presenceTable.getTableHeader().setReorderingAllowed(false);
    presenceTable.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            presenceTableMouseClicked(evt);
          }
        });
    jScrollPane1.setViewportView(presenceTable);
    presenceTable
        .getColumnModel()
        .getSelectionModel()
        .setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);

    add(jScrollPane1, java.awt.BorderLayout.CENTER);

    titleLabel.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
    org.openide.awt.Mnemonics.setLocalizedText(
        titleLabel,
        org.openide.util.NbBundle.getMessage(
            PresenceTableTopComponent.class,
            "PresenceTableTopComponent.titleLabel.text")); // NOI18N
    titleLabel.setPreferredSize(new java.awt.Dimension(50, 40));
    add(titleLabel, java.awt.BorderLayout.PAGE_START);
  } // </editor-fold>//GEN-END:initComponents
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    jPanel1 = new javax.swing.JPanel();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    jPanel2 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    storesTbl = new com.afrisoftech.dbadmin.JTable();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jButton1 = new javax.swing.JButton();
    jPanel3 = new javax.swing.JPanel();
    jScrollPane2 = new javax.swing.JScrollPane();
    itemsTbl = new com.afrisoftech.dbadmin.JTable();
    jPanel4 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    beginDatePicker = new com.afrisoftech.lib.DatePicker();

    setClosable(true);
    setIconifiable(true);
    setMaximizable(true);
    setResizable(true);
    getContentPane().setLayout(new java.awt.GridBagLayout());

    jPanel1.setLayout(new java.awt.GridBagLayout());

    jPanel2.setLayout(new java.awt.GridBagLayout());

    storesTbl.setModel(
        com.afrisoftech.dbadmin.TableModel.createTableVectors(
            connectDB,
            "SELECT DISTINCT upper(store_name) AS STORE, '' STOCK_VALUE, FALSE AS DRILL_DOWN from st_main_stores UNION SELECT DISTINCT upper(store_name) AS STORE, '' STOCK_VALUE, FALSE AS DRILL_DOWN  FROM st_stores WHERE status ILIKE 'pharmacy' ORDER BY 1"));
    storesTbl.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            storesTblMouseClicked(evt);
          }
        });
    jScrollPane1.setViewportView(storesTbl);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel2.add(jScrollPane1, gridBagConstraints);

    org.openide.awt.Mnemonics.setLocalizedText(
        jLabel2,
        org.openide.util.NbBundle.getMessage(
            StockPositionIntfr.class, "StockPositionIntfr.jLabel2.text")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    jPanel2.add(jLabel2, gridBagConstraints);

    org.openide.awt.Mnemonics.setLocalizedText(
        jLabel3,
        org.openide.util.NbBundle.getMessage(
            StockPositionIntfr.class, "StockPositionIntfr.jLabel3.text")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    jPanel2.add(jLabel3, gridBagConstraints);

    org.openide.awt.Mnemonics.setLocalizedText(
        jButton1,
        org.openide.util.NbBundle.getMessage(
            StockPositionIntfr.class, "StockPositionIntfr.jButton1.text")); // NOI18N
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });
    jPanel2.add(jButton1, new java.awt.GridBagConstraints());

    jTabbedPane1.addTab(
        org.openide.util.NbBundle.getMessage(
            StockPositionIntfr.class, "StockPositionIntfr.jPanel2.TabConstraints.tabTitle"),
        jPanel2); // NOI18N

    jPanel3.setLayout(new java.awt.GridBagLayout());

    itemsTbl.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {}, new String[] {}));

    jScrollPane2.setViewportView(itemsTbl);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel3.add(jScrollPane2, gridBagConstraints);

    jTabbedPane1.addTab(
        org.openide.util.NbBundle.getMessage(
            StockPositionIntfr.class, "StockPositionIntfr.jPanel3.TabConstraints.tabTitle"),
        jPanel3); // NOI18N

    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout.setHorizontalGroup(
        jPanel4Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1200, Short.MAX_VALUE));
    jPanel4Layout.setVerticalGroup(
        jPanel4Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 194, Short.MAX_VALUE));

    jTabbedPane1.addTab(
        org.openide.util.NbBundle.getMessage(
            StockPositionIntfr.class, "StockPositionIntfr.jPanel4.TabConstraints.tabTitle"),
        jPanel4); // NOI18N

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel1.add(jTabbedPane1, gridBagConstraints);

    org.openide.awt.Mnemonics.setLocalizedText(
        jLabel1,
        org.openide.util.NbBundle.getMessage(
            StockPositionIntfr.class, "StockPositionIntfr.jLabel1.text")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 0.3;
    jPanel1.add(jLabel1, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 0.3;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 50);
    jPanel1.add(beginDatePicker, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    getContentPane().add(jPanel1, gridBagConstraints);

    pack();
  } // </editor-fold>//GEN-END:initComponents
Exemple #26
0
  private void setupRunButtons(JPanel panel) {
    m_btnRunScript = new JButton();
    Mnemonics.setLocalizedText(m_btnRunScript, OStrings.getString("SCW_RUN_SCRIPT"));
    m_btnRunScript.setAlignmentX(Component.LEFT_ALIGNMENT);
    m_btnRunScript.setHorizontalAlignment(SwingConstants.LEFT);
    m_btnRunScript.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent a) {
            runScript();
          }
        });
    panel.add(m_btnRunScript);

    for (int i = 0; i < NUMBERS_OF_QUICK_SCRIPTS; i++) {
      final int index = i;
      final int scriptKey = scriptKey(index);
      m_quickScriptButtons[i] = new JButton("" + scriptKey + "");

      String scriptName = Preferences.getPreferenceDefault("scripts_quick_" + scriptKey, null);

      if (scriptName != null || "".equals(scriptName)) {
        m_quickScriptButtons[i].setToolTipText(scriptName);
        m_quickScriptButtons[i].setText("<" + scriptKey + ">");
      } else {
        m_quickScriptButtons[i].setToolTipText(OStrings.getString("SCW_NO_SCRIPT_SET"));
      }

      // Run a script from the quick button bar
      m_quickScriptButtons[i].addActionListener(
          new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent a) {
              if (Preferences.existsPreference("scripts_quick_" + scriptKey)) {
                runQuickScript(index);
              } else {
                logResult(StaticUtils.format(OStrings.getString("SCW_NO_SCRIPT_BOUND"), scriptKey));
              }
            }
          });

      JPopupMenu quickScriptPopup = new JPopupMenu();

      // Add a script to the quick script button bar
      final JMenuItem addQuickScriptMenuItem = new JMenuItem(OStrings.getString("SCW_ADD_SCRIPT"));
      addQuickScriptMenuItem.addActionListener(
          new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent evt) {
              ScriptItem scriptItem = (ScriptItem) m_scriptList.getSelectedValue();
              Preferences.setPreference("scripts_quick_" + scriptKey, scriptItem.getName());
              m_quickScriptButtons[index].setToolTipText(scriptItem.getToolTip());
              m_quickScriptButtons[index].setText("<" + scriptKey + ">");

              setQuickScriptMenu(scriptItem, index);

              logResult(
                  StaticUtils.format(
                      OStrings.getString("SCW_SAVE_QUICK_SCRIPT"), scriptItem, scriptKey));
            }
          });
      quickScriptPopup.add(addQuickScriptMenuItem);

      // Remove a script from the button bar
      final JMenuItem removeQuickScriptMenuItem =
          new JMenuItem(OStrings.getString("SCW_REMOVE_SCRIPT"));
      removeQuickScriptMenuItem.addActionListener(
          new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent evt) {
              String scriptName =
                  Preferences.getPreferenceDefault("scripts_quick_" + scriptKey, "(unknown)");
              logResult(
                  StaticUtils.format(
                      OStrings.getString("SCW_REMOVED_QUICK_SCRIPT"), scriptName, scriptKey));
              Preferences.setPreference("scripts_quick_" + scriptKey, "");
              m_quickScriptButtons[index].setToolTipText(OStrings.getString("SCW_NO_SCRIPT_SET"));
              m_quickScriptButtons[index].setText(" " + scriptKey + " ");

              unsetQuickScriptMenu(index);
            }
          });
      quickScriptPopup.add(removeQuickScriptMenuItem);

      quickScriptPopup.addPopupMenuListener(
          new PopupMenuListener() {
            @Override
            public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
              // Disable add a script command if script selection empty
              addQuickScriptMenuItem.setEnabled(!m_scriptList.isSelectionEmpty());

              // Disable remove a script command if the quick run button is not bounded
              String scriptName =
                  Preferences.getPreferenceDefault("scripts_quick_" + scriptKey, null);
              removeQuickScriptMenuItem.setEnabled(!StringUtil.isEmpty(scriptName));
            }

            @Override
            public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
              // do nothing
            }

            @Override
            public void popupMenuCanceled(PopupMenuEvent e) {
              // do nothing
            }
          });

      m_quickScriptButtons[i].setComponentPopupMenu(quickScriptPopup);

      panel.add(m_quickScriptButtons[i]);
    }
  }
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    lblFilters = new javax.swing.JLabel();
    scrollFilters = new javax.swing.JScrollPane();
    lstFilters = new javax.swing.JList();
    btnNewFilter = new javax.swing.JButton();
    btnRemoveFilter = new javax.swing.JButton();
    tabs = new javax.swing.JTabbedPane();
    panelTypes = new javax.swing.JPanel();
    panelKeywords = new javax.swing.JPanel();
    lblFilterName = new javax.swing.JLabel();
    txtFilterName = new javax.swing.JTextField();

    lblFilters.setLabelFor(lstFilters);
    org.openide.awt.Mnemonics.setLocalizedText(
        lblFilters,
        org.openide.util.NbBundle.getMessage(
            FilterEditor.class, "FilterEditor.lblFilters.text")); // NOI18N

    lstFilters.setModel(
        new javax.swing.AbstractListModel() {
          String[] strings = {"Item 1", "Item 2", "Item 3", "Item 4", "Item 5"};

          public int getSize() {
            return strings.length;
          }

          public Object getElementAt(int i) {
            return strings[i];
          }
        });
    lstFilters.setToolTipText(
        org.openide.util.NbBundle.getMessage(
            FilterEditor.class, "FilterEditor.lstFilters.toolTipText")); // NOI18N
    scrollFilters.setViewportView(lstFilters);

    org.openide.awt.Mnemonics.setLocalizedText(
        btnNewFilter,
        org.openide.util.NbBundle.getMessage(
            FilterEditor.class, "FilterEditor.btnNewFilter.text")); // NOI18N
    btnNewFilter.setToolTipText(
        org.openide.util.NbBundle.getMessage(
            FilterEditor.class, "FilterEditor.btnNewFilter.toolTipText")); // NOI18N
    btnNewFilter.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            onNewFilter(evt);
          }
        });

    org.openide.awt.Mnemonics.setLocalizedText(
        btnRemoveFilter,
        org.openide.util.NbBundle.getMessage(
            FilterEditor.class, "FilterEditor.btnRemoveFilter.text")); // NOI18N
    btnRemoveFilter.setToolTipText(
        org.openide.util.NbBundle.getMessage(
            FilterEditor.class, "FilterEditor.btnRemoveFilter.toolTipText")); // NOI18N
    btnRemoveFilter.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            onRemoveFilter(evt);
          }
        });

    panelTypes.setOpaque(false);
    panelTypes.setLayout(new java.awt.BorderLayout());
    tabs.addTab(
        org.openide.util.NbBundle.getMessage(
            FilterEditor.class, "FilterEditor.panelTypes.TabConstraints.tabTitle"),
        panelTypes); // NOI18N

    panelKeywords.setOpaque(false);
    panelKeywords.setLayout(new java.awt.BorderLayout());
    tabs.addTab(
        org.openide.util.NbBundle.getMessage(
            FilterEditor.class, "FilterEditor.panelKeywords.TabConstraints.tabTitle"),
        panelKeywords); // NOI18N

    lblFilterName.setLabelFor(txtFilterName);
    org.openide.awt.Mnemonics.setLocalizedText(
        lblFilterName,
        org.openide.util.NbBundle.getMessage(
            FilterEditor.class, "FilterEditor.lblFilterName.text")); // NOI18N

    txtFilterName.setToolTipText(
        org.openide.util.NbBundle.getMessage(
            FilterEditor.class, "FilterEditor.txtFilterName.toolTipText")); // NOI18N

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(lblFilters)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(btnNewFilter)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(btnRemoveFilter))
                            .addComponent(scrollFilters))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(lblFilterName)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        txtFilterName,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        459,
                                        Short.MAX_VALUE))
                            .addComponent(
                                tabs, javax.swing.GroupLayout.DEFAULT_SIZE, 516, Short.MAX_VALUE))
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(lblFilters)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        scrollFilters,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        229,
                                        Short.MAX_VALUE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(btnNewFilter)
                                            .addComponent(btnRemoveFilter)))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(lblFilterName)
                                            .addComponent(
                                                txtFilterName,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        tabs,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        235,
                                        Short.MAX_VALUE)))
                    .addContainerGap()));
  } // </editor-fold>//GEN-END:initComponents
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    classesChangedMessage = new javax.swing.JLabel();
    serviceLbl = new javax.swing.JLabel();
    serviceAsyncLbl = new javax.swing.JLabel();
    serviceImplLbl = new javax.swing.JLabel();
    serviceName = new javax.swing.JLabel();
    serviceImplName = new javax.swing.JLabel();
    serviceAsyncName = new javax.swing.JLabel();
    miscChangesMessage = new javax.swing.JLabel();

    setBorder(javax.swing.BorderFactory.createEmptyBorder(12, 12, 11, 11));

    org.openide.awt.Mnemonics.setLocalizedText(
        classesChangedMessage, NbBundle.getMessage(ServiceDeletePanel.class, "FollowCl")); // NOI18N

    org.openide.awt.Mnemonics.setLocalizedText(
        serviceLbl, NbBundle.getMessage(ServiceDeletePanel.class, "Svc")); // NOI18N

    org.openide.awt.Mnemonics.setLocalizedText(
        serviceAsyncLbl, NbBundle.getMessage(ServiceDeletePanel.class, "Async")); // NOI18N

    org.openide.awt.Mnemonics.setLocalizedText(
        serviceImplLbl, NbBundle.getMessage(ServiceDeletePanel.class, "SvcImpl")); // NOI18N

    org.openide.awt.Mnemonics.setLocalizedText(serviceName, "                   ");

    org.openide.awt.Mnemonics.setLocalizedText(serviceImplName, "                           ");

    org.openide.awt.Mnemonics.setLocalizedText(serviceAsyncName, "                  ");

    miscChangesMessage.setFont(new java.awt.Font("Tahoma", 2, 11));
    org.openide.awt.Mnemonics.setLocalizedText(
        miscChangesMessage, NbBundle.getMessage(ServiceDeletePanel.class, "UsageEx")); // NOI18N

    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                classesChangedMessage,
                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                377,
                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
            .add(
                layout
                    .createSequentialGroup()
                    .add(
                        layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(serviceLbl)
                            .add(serviceAsyncLbl)
                            .add(serviceImplLbl))
                    .add(38, 38, 38)
                    .add(
                        layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(
                                serviceImplName,
                                org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                258,
                                Short.MAX_VALUE)
                            .add(
                                serviceName,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                229,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(
                                serviceAsyncName,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                242,
                                org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap())
            .add(layout.createSequentialGroup().add(miscChangesMessage).addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(
                layout
                    .createSequentialGroup()
                    .add(classesChangedMessage)
                    .add(18, 18, 18)
                    .add(
                        layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(serviceLbl)
                            .add(serviceName))
                    .add(
                        layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(
                                layout
                                    .createSequentialGroup()
                                    .add(18, 18, 18)
                                    .add(serviceAsyncLbl)
                                    .add(18, 18, 18)
                                    .add(serviceImplLbl))
                            .add(
                                layout
                                    .createSequentialGroup()
                                    .add(18, 18, 18)
                                    .add(serviceAsyncName)
                                    .add(18, 18, 18)
                                    .add(serviceImplName)))
                    .add(49, 49, 49)
                    .add(miscChangesMessage)
                    .addContainerGap(42, Short.MAX_VALUE)));
  } // </editor-fold>//GEN-END:initComponents
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    projectNameLabel = new javax.swing.JLabel();
    projectNameTextField = new javax.swing.JTextField();
    projectLocationLabel = new javax.swing.JLabel();
    projectLocationTextField = new javax.swing.JTextField();
    browseButton = new javax.swing.JButton();
    createdFolderLabel = new javax.swing.JLabel();
    createdFileTextField = new javax.swing.JTextField();
    projectTitleLabel = new javax.swing.JLabel();
    projectTiteTextField = new javax.swing.JTextField();

    projectNameLabel.setLabelFor(projectNameTextField);
    org.openide.awt.Mnemonics.setLocalizedText(
        projectNameLabel,
        org.openide.util.NbBundle.getMessage(
            NameAndLocationWizardPanelVisual.class,
            "NameAndLocationWizardPanelVisual.projectNameLabel.text")); // NOI18N

    projectLocationLabel.setLabelFor(projectLocationTextField);
    org.openide.awt.Mnemonics.setLocalizedText(
        projectLocationLabel,
        org.openide.util.NbBundle.getMessage(
            NameAndLocationWizardPanelVisual.class,
            "NameAndLocationWizardPanelVisual.projectLocationLabel.text")); // NOI18N

    org.openide.awt.Mnemonics.setLocalizedText(
        browseButton,
        org.openide.util.NbBundle.getMessage(
            NameAndLocationWizardPanelVisual.class,
            "NameAndLocationWizardPanelVisual.browseButton.text")); // NOI18N
    browseButton.setActionCommand(
        org.openide.util.NbBundle.getMessage(
            NameAndLocationWizardPanelVisual.class,
            "NameAndLocationWizardPanelVisual.browseButton.actionCommand")); // NOI18N
    browseButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            browseButtonActionPerformed(evt);
          }
        });

    createdFolderLabel.setLabelFor(createdFileTextField);
    org.openide.awt.Mnemonics.setLocalizedText(
        createdFolderLabel,
        org.openide.util.NbBundle.getMessage(
            NameAndLocationWizardPanelVisual.class,
            "NameAndLocationWizardPanelVisual.createdFolderLabel.text")); // NOI18N

    createdFileTextField.setEditable(false);

    org.openide.awt.Mnemonics.setLocalizedText(
        projectTitleLabel,
        org.openide.util.NbBundle.getMessage(
            NameAndLocationWizardPanelVisual.class,
            "NameAndLocationWizardPanelVisual.projectTitleLabel.text")); // NOI18N

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(projectNameLabel)
                            .addComponent(projectLocationLabel)
                            .addComponent(createdFolderLabel)
                            .addComponent(projectTitleLabel))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                projectTiteTextField,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                171,
                                Short.MAX_VALUE)
                            .addComponent(
                                createdFileTextField,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                171,
                                Short.MAX_VALUE)
                            .addComponent(
                                projectNameTextField,
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                171,
                                Short.MAX_VALUE)
                            .addComponent(
                                projectLocationTextField,
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                171,
                                Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(browseButton)
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addContainerGap()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(projectNameLabel)
                                            .addComponent(
                                                projectNameTextField,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addGroup(
                                                layout
                                                    .createParallelGroup(
                                                        javax.swing.GroupLayout.Alignment.BASELINE)
                                                    .addComponent(projectLocationLabel)
                                                    .addComponent(browseButton))
                                            .addComponent(
                                                projectLocationTextField,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGap(71, 71, 71)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(
                                                createdFileTextField,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(createdFolderLabel))))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                projectTiteTextField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(projectTitleLabel))
                    .addContainerGap(177, Short.MAX_VALUE)));
  } // </editor-fold>//GEN-END:initComponents
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    org.netbeans.modules.git.ui.repository.RevisionDialog revisionPickerDialog1 =
        this.revisionPanel;
    jLabel1 = new javax.swing.JLabel();

    jLabel1.setLabelFor(branchNameField);
    org.openide.awt.Mnemonics.setLocalizedText(
        jLabel1,
        org.openide.util.NbBundle.getMessage(
            CreateBranchPanel.class, "CreateBranchPanel.jLabel1.text")); // NOI18N

    branchNameField.setText(
        org.openide.util.NbBundle.getMessage(
            CreateBranchPanel.class, "CreateBranchPanel.branchNameField.text")); // NOI18N

    lblError.setIcon(
        new javax.swing.ImageIcon(
            getClass()
                .getResource("/org/netbeans/modules/git/resources/icons/info.png"))); // NOI18N
    org.openide.awt.Mnemonics.setLocalizedText(
        lblError,
        org.openide.util.NbBundle.getMessage(
            CreateBranchPanel.class, "MSG_CreateBranch.errorBranchExists")); // NOI18N

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                revisionPickerDialog1,
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                397,
                                Short.MAX_VALUE)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(jLabel1)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        branchNameField,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        288,
                                        Short.MAX_VALUE))
                            .addComponent(
                                lblError,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                397,
                                Short.MAX_VALUE))
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(
                                branchNameField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(
                        revisionPickerDialog1,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        161,
                        Short.MAX_VALUE)
                    .addGap(12, 12, 12)
                    .addComponent(lblError)
                    .addContainerGap()));
  } // </editor-fold>//GEN-END:initComponents