Package util.ui

Examples of util.ui.SearchForm


  /**
   * Show the Configuration-Dialog
   * @param textField
   */
  protected void showConfigureDialog(final SearchTextField textField) {
    final SearchForm form = new SearchForm(false, false, true);
    form.setSearchFormSettings(mSearchFormSettings);

    final JDialog configure = new JDialog(MainFrame.getInstance(), mLocalizer.msg("settingsTitle","Search-Settings"), false);
    configure.setUndecorated(true);
    JPanel panel = (JPanel)configure.getContentPane();
    panel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEtchedBorder(),Borders.DLU4_BORDER));
    panel.setLayout(new FormLayout("fill:pref:grow, 3dlu, pref", "pref, fill:3dlu:grow, pref"));

    form.setParentDialog(configure);

    CellConstraints cc = new CellConstraints();

    panel.add(form, cc.xyw(1, 1, 3));

    JButton ok = new JButton(Localizer.getLocalization(Localizer.I18N_OK));
    ok.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        configure.setVisible(false);
        mSearchFormSettings = form.getSearchFormSettings();
        saveSearchFormSettings();
        textField.requestFocusInWindow();
        textField.selectAll();
      }
    });

    panel.add(ok, cc.xy(3,3));

    UiUtilities.registerForClosing(new WindowClosingIf() {
      public void close() {
        configure.removeWindowListener(configure.getWindowListeners()[0]);
        configure.setVisible(false);
        textField.requestFocusInWindow();
        textField.selectAll();
      }

      public JRootPane getRootPane() {
        return configure.getRootPane();
      }
    });

    configure.pack();

    configure.addWindowListener(new WindowAdapter() {
      public void windowDeactivated(WindowEvent e) {
        if(!form.isSearchFieldsSelectionDialogVisible()) {
          ((JDialog)e.getSource()).setVisible(false);
          mSearchFormSettings = form.getSearchFormSettings();
          saveSearchFormSettings();
        }
      }
    });

View Full Code Here


   * Create the GUI
   */
  private void createGui() {
    setTitle(mLocalizer.msg("title", "Mass-Filter Settings"));

    mForm = new SearchForm(false, false, false);
    mForm.setSearchFormSettings(mSearchFormSettings);

    JPanel content = (JPanel) getContentPane();

    content.setLayout(new BorderLayout());
View Full Code Here

    msg = mLocalizer.msg("description",
        "Accept all programs containing the following keyword:");
    pn.add(UiUtilities.createHelpTextArea(msg));
    content.add(pn);

    mSearchForm = new SearchForm(false, false);
    mSearchForm.setSearchFormSettings(mSearchFormSettings);
    content.add(mSearchForm);

    return content;
  }
View Full Code Here

    private SearchForm mSearchForm;
    private JCheckBox mFilterCheckbox;
    private JComboBox mFilterCombo;

    public JPanel createConfigurationPanel() {
      mSearchForm = new SearchForm(true, false, false, SearchForm.LAYOUT_HORIZONTAL);
      mSearchForm.setSearchFormSettings(mSearchFormSettings);


      CellConstraints cc = new CellConstraints();
      PanelBuilder panelBuilder = new PanelBuilder(new FormLayout("pref:grow, 3dlu, pref:grow", "pref, 5dlu, pref"));
View Full Code Here

    JPanel main = new JPanel(new TabLayout(1));
    main.setBorder(Borders.DLU4_BORDER);
    setContentPane(main);

    // pattern
    mSearchForm = new SearchForm(true, true);
    mSearchForm.setHistory(SearchPlugin.getSearchHistory());
    mSearchForm.addPatternChangeListener(new DocumentListener() {

      private void updateButton(DocumentEvent e) {
        mSearchBt.setEnabled(e.getDocument().getLength() > 0);
View Full Code Here

TOP

Related Classes of util.ui.SearchForm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.