Package org.wikipediacleaner.utils

Examples of org.wikipediacleaner.utils.Configuration


    error.remove(page);
    if (!textPage.isModified()) {
      pane.remove(this);
    }
    if (error.getPageCount() == 0) {
      Configuration configuration = Configuration.getConfiguration();
      if (!configuration.getBoolean(
          null,
          ConfigurationValueBoolean.CHECK_SHOW_0_ERRORS)) {
        window.listAllErrors.removeItem(error);
      }
    }
View Full Code Here


        updateISBNWarning = true;
      }
    }

    // Send page
    final Configuration configuration = Configuration.getConfiguration();
    SendWorker sendWorker = new SendWorker(
        getWiki(), window,
        page, textPage.getText(), textComment.getText(),
        configuration.getBoolean(
            null,
            ConfigurationValueBoolean.FORCE_WATCH),
        false, false, updateISBNWarning, createISBNWarning,
        contributions, errorsFixed);
    sendWorker.setListener(new DefaultBasicWorkerListener() {
View Full Code Here

              }
            }
          }
        }
      }
      final Configuration configuration = Configuration.getConfiguration();
      if (!configuration.getBoolean(
          null,
          ConfigurationValueBoolean.CHECK_SHOW_0_ERRORS)) {
        for (CheckError tmpError : errorsToBeRemoved) {
          window.listAllErrors.removeItem(tmpError);
        }
View Full Code Here

    }
    buttonOptions.addActionListener(EventHandler.create(
        ActionListener.class, this, "actionOptions"));
    panel.add(buttonOptions);

    Configuration config = Configuration.getConfiguration();
    menuOptions = new JPopupMenu();
    chkCloseAfterSend = Utilities.createJCheckBoxMenuItm(
        GT._("&Close after sending"),
        config.getBoolean(
            null,
            ConfigurationValueBoolean.CLOSE_FULL));
    menuOptions.add(chkCloseAfterSend);
    chkEditTalkPage = Utilities.createJCheckBoxMenuItm(
        GT._("&Add a note on talk page"), false);
View Full Code Here

   */
  public boolean shouldCheckSpelling() {
    if (chkSpelling != null) {
      return chkSpelling.isSelected();
    }
    Configuration config = Configuration.getConfiguration();
    return config.getBoolean(
        null, ConfigurationValueBoolean.SPELLING);
  }
View Full Code Here

   */
  protected void addTextContents(
      JPanel panel, GridBagConstraints constraints,
      MWPane textPane, JButton undo) {
    if (textPane != null) {
      Configuration config = Configuration.getConfiguration();
      textPane.setBackground(Color.WHITE);
      textPane.setEditable(true);
      if (undo != null) {
        textPane.getUndoManager().setUndoLevels(config.getInt(
            null,
            ConfigurationValueInteger.ANALYSIS_UNDO_LVL));
      }
      textPane.addPropertyChangeListener(
          MWPane.PROPERTY_MODIFIED,
View Full Code Here

      Controller.runNewSection(
          page.getTalkPage(),
          getTextContents().getText(), page.getTitle(),
          getWikipedia());
    }
    Configuration config = Configuration.getConfiguration();
    final boolean hideWindow = config.getBoolean(
        null,
        ConfigurationValueBoolean.ANALYSIS_HIDE_SENDING);
    final boolean forceWatch = config.getBoolean(
        null,
        ConfigurationValueBoolean.FORCE_WATCH);
    final int oldState = getParentComponent().getExtendedState();
    final boolean updateDabWarning = (chkUpdateDabWarning != null) && (chkUpdateDabWarning.isSelected());
    final boolean createDabWarning = (chkCreateDabWarning != null) && (chkCreateDabWarning.isSelected());
View Full Code Here

   * @param submenu Submenu.
   * @param begin Number of items kept at the beginning.
   * @param end Number of items kept at the end.
   */
  public void addSubmenu(JPopupMenu menu, JMenu submenu, int begin, int end) {
    Configuration config = Configuration.getConfiguration();
    final int maxElements = Math.max(
        config.getInt(null, ConfigurationValueInteger.MENU_SIZE),
        begin + end + 2);
    if (submenu.getMenuComponentCount() > maxElements) {
      List<JMenu> menuList = new ArrayList<JMenu>();
      while (submenu.getMenuComponentCount() > begin + end + 1) {
        int count = Math.min(maxElements, submenu.getMenuComponentCount() - begin - end);
View Full Code Here

   *
   * @param menu Menu.
   * @param items Submenus.
   */
  public void addSubmenus(JPopupMenu menu, List<JMenuItem> items) {
    Configuration config = Configuration.getConfiguration();
    final int maxElements = Math.max(config.getInt(null, ConfigurationValueInteger.MENU_SIZE), 10);
    if (items.size() <= maxElements) {
      for (JMenuItem item : items) {
        menu.add(item);
      }
      return;
View Full Code Here

      constraints.gridy++;
      variant.add(null);
    }

    // Default language
    Configuration config = Configuration.getConfiguration();
    String defaultLanguage = config.getString(null, ConfigurationValueString.LAST_LANGUAGE);
    if (defaultLanguage != null) {
      selectLanguage(defaultLanguage);
    }
  }
View Full Code Here

TOP

Related Classes of org.wikipediacleaner.utils.Configuration

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.