Ignore:
Timestamp:
2012-02-18T15:10:01+01:00 (12 years ago)
Author:
bastik
Message:

update because of core api change (preferences - rev. 4968)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/simplifyarea/src/sk/zdila/josm/plugin/simplify/SimplifyAreaPreferenceSetting.java

    r25883 r27857  
    99
    1010import org.openstreetmap.josm.Main;
    11 import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
     11import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting;
    1212import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
    1313import org.openstreetmap.josm.tools.GBC;
    1414
    15 public class SimplifyAreaPreferenceSetting implements PreferenceSetting {
     15public class SimplifyAreaPreferenceSetting extends DefaultTabPreferenceSetting {
    1616
    1717    static final String DIST_FACTOR = "simplify-area.dist.factor";
     
    3131    private final JTextField distanceFactor = new JTextField(8);
    3232
     33    public SimplifyAreaPreferenceSetting() {
     34        super("simplifyArea", "Simplify Area", "Node of the way (area) is removed if all of <u>Angle Weight</u>, <u>Area Weight</u> and <u>Distance Weight</u> are greater than 1. " +
     35                "<u>Weight</u> is computed as <u>Value</u> / <u>Threshold</u>, where <u>Value</u> is one of <u>Angle</u>, <u>Area</u> and <u>Distance</u> " +
     36                "computed from every three adjanced points of the way." +
     37                "<ul><li><u>Value</u> of <u>Angle</u> is angle in degrees on the second node</li>" +
     38                "<li><u>Value</u> of <u>Area</u> is area formed by triangle</li>" +
     39                "<li><u>Value</u> of the <u>Distance</u> is Cross Track Error Distance</li></ul>" +
     40                "All three <u>Weight</u>s multiplied by its <u>Factor</u>s are summed and node of the lowest sum is removed first. " +
     41                "Removal continues until there is no node to remove." +
     42                "Merge Nearby Nodes is another step of the simplification that merges adjanced nodes that are closer than <u>Threshold</u> meters.");
     43    }
    3344
    3445    @Override
    3546    public void addGui(final PreferenceTabbedPane gui) {
    36         final JPanel tab = gui.createPreferenceTab("simplifyArea", "Simplify Area", "Node of the way (area) is removed if all of <u>Angle Weight</u>, <u>Area Weight</u> and <u>Distance Weight</u> are greater than 1. " +
    37                         "<u>Weight</u> is computed as <u>Value</u> / <u>Threshold</u>, where <u>Value</u> is one of <u>Angle</u>, <u>Area</u> and <u>Distance</u> " +
    38                         "computed from every three adjanced points of the way." +
    39                         "<ul><li><u>Value</u> of <u>Angle</u> is angle in degrees on the second node</li>" +
    40                         "<li><u>Value</u> of <u>Area</u> is area formed by triangle</li>" +
    41                         "<li><u>Value</u> of the <u>Distance</u> is Cross Track Error Distance</li></ul>" +
    42                         "All three <u>Weight</u>s multiplied by its <u>Factor</u>s are summed and node of the lowest sum is removed first. " +
    43                         "Removal continues until there is no node to remove." +
    44                         "Merge Nearby Nodes is another step of the simplification that merges adjanced nodes that are closer than <u>Threshold</u> meters.");
     47        final JPanel tab = gui.createPreferenceTab(this);
    4548
    4649        angleThreshold.setText(Main.pref.get(ANGLE_THRESHOLD, "10"));
Note: See TracChangeset for help on using the changeset viewer.