Package util.ui

Examples of util.ui.SearchFormSettings


    int version = in.readInt();

    int historySize = in.readInt();
    mSearchHistory = new SearchFormSettings[historySize];
    for (int i = 0; i < historySize; i++) {
      SearchFormSettings settings;

      if (version > 1) {
        // version 2
        settings = new SearchFormSettings(in);
      } else {
        // version 1
        String searchText = (String) in.readObject();
        in.readBoolean(); // searchInTitle
        boolean searchInInfoText = in.readBoolean();
        boolean caseSensitive = in.readBoolean();
        int option = in.readInt();

        settings = new SearchFormSettings(searchText);
        if (searchInInfoText) {
          settings.setSearchIn(SearchFormSettings.SEARCH_IN_ALL);
        } else {
          settings.setSearchIn(SearchFormSettings.SEARCH_IN_TITLE);
        }
        settings.setCaseSensitive(caseSensitive);
        switch (option) {
        case 1:
          settings.setSearcherType(PluginManager.SEARCHER_TYPE_KEYWORD);
          break;
        case 2:
          settings
              .setSearcherType(PluginManager.SEARCHER_TYPE_REGULAR_EXPRESSION);
          break;
        default:
          settings.setSearcherType(PluginManager.SEARCHER_TYPE_EXACTLY);
          break;
        }
      }

      mSearchHistory[i] = settings;
View Full Code Here


   * Sets the text of the pattern text field.
   *
   * @param text The new pattern text.
   */
  public void setPatternText(String text) {
    SearchFormSettings settings = new SearchFormSettings(text);
    settings.setSearchIn(SearchFormSettings.SEARCH_IN_TITLE);
    settings.setSearcherType(PluginManager.SEARCHER_TYPE_EXACTLY);
    settings.setCaseSensitive(true);

    setSearchSettings(settings);
  }
View Full Code Here

  /**
   * Starts the search.
   */
  private void search() {
    final SearchFormSettings settings = mSearchForm.getSearchFormSettings();
    if (settings.getFieldTypes().length == 0) {
      String msg = mLocalizer.msg("noFields.message",
          "No search fields selected!");
      String title = mLocalizer.msg("noFields.title", "Error");
      JOptionPane.showMessageDialog(MainFrame.getInstance(), msg, title,
          JOptionPane.ERROR_MESSAGE);
View Full Code Here

    setVisible(false);

    SearchPlugin.getInstance().setRepetitionTimeSelection(
        mTimeChooser.getSelectedIndex());

    SearchFormSettings settings = getSearchSettings();

    SearchHelper.search(getParent(), new PluginPictureSettings(
        PluginPictureSettings.ALL_PLUGINS_SETTINGS_TYPE), settings, true);
  }
View Full Code Here

        PluginPictureSettings.ALL_PLUGINS_SETTINGS_TYPE), settings, true);
  }

  private SearchFormSettings getSearchSettings() {
    int days = getDays();
    SearchFormSettings settings = new SearchFormSettings(mText.getText());
    settings.setNrDays(days);
    settings.setSearchIn(SearchFormSettings.SEARCH_IN_TITLE);
    settings.setSearcherType(PluginManager.SEARCHER_TYPE_EXACTLY);
    settings.setCaseSensitive(false);
    if (mChannelChooser.getSelectedIndex() > 0) {
      settings.setChannels(new Channel[] { (Channel) mChannelChooser
          .getSelectedItem() });
    }
    return settings;
  }
View Full Code Here

TOP

Related Classes of util.ui.SearchFormSettings

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.