Logo Search packages:      
Sourcecode: josm-plugins version File versions  Download package

void org::openstreetmap::josm::plugins::validator::tests::SpellCheck::ok (  )  [inline]

Called when the used submits the preferences

Reimplemented from org::openstreetmap::josm::plugins::validator::Test.

Definition at line 465 of file SpellCheck.java.

References org::openstreetmap::josm::plugins::validator::Test::enabled, PREF_CHECK_FIXMES, PREF_CHECK_FIXMES_BEFORE_UPLOAD, PREF_CHECK_KEYS, PREF_CHECK_KEYS_BEFORE_UPLOAD, PREF_CHECK_VALUES, PREF_CHECK_VALUES_BEFORE_UPLOAD, PREF_SOURCES, prefCheckFixmes, prefCheckFixmesBeforeUpload, prefCheckKeys, prefCheckKeysBeforeUpload, prefCheckValues, prefCheckValuesBeforeUpload, spellcheckSources, and org::openstreetmap::josm::plugins::validator::Test::testBeforeUpload().

      {
            enabled = prefCheckKeys.isSelected() || prefCheckValues.isSelected() || prefCheckFixmes.isSelected();
        testBeforeUpload = prefCheckKeysBeforeUpload.isSelected() || prefCheckValuesBeforeUpload.isSelected() || prefCheckFixmesBeforeUpload.isSelected();
            
        Main.pref.put(PREF_CHECK_VALUES, prefCheckValues.isSelected());
        Main.pref.put(PREF_CHECK_KEYS, prefCheckKeys.isSelected());
        Main.pref.put(PREF_CHECK_FIXMES, prefCheckFixmes.isSelected());
        Main.pref.put(PREF_CHECK_VALUES_BEFORE_UPLOAD, prefCheckValuesBeforeUpload.isSelected());
        Main.pref.put(PREF_CHECK_KEYS_BEFORE_UPLOAD, prefCheckKeysBeforeUpload.isSelected());
        Main.pref.put(PREF_CHECK_FIXMES_BEFORE_UPLOAD, prefCheckFixmesBeforeUpload.isSelected());            
        String sources = "";
        if( spellcheckSources.getModel().getSize() > 0 )
        {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < spellcheckSources.getModel().getSize(); ++i)
                sb.append(";"+spellcheckSources.getModel().getElementAt(i));
            sources = sb.substring(1);
        }
        Main.pref.put(PREF_SOURCES, sources );

      }


Generated by  Doxygen 1.6.0   Back to index