Changeset 1234 in josm for trunk/src


Ignore:
Timestamp:
2009-01-10T18:45:23+01:00 (16 years ago)
Author:
stoecker
Message:

introduced optional and space in tagging presets xml

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java

    r1169 r1234  
    357357    }
    358358
     359    public static class Optional extends Item {
     360        // TODO: Draw a box around optional stuff
     361        @Override public void addToPanel(JPanel p, Collection<OsmPrimitive> sel) {
     362            p.add(new JLabel(" "), GBC.eol()); // space
     363            p.add(new JLabel(tr("Optional Attributes:")), GBC.eol());
     364            p.add(new JLabel(" "), GBC.eol()); // space
     365        }
     366        @Override public void addCommands(Collection<OsmPrimitive> sel, List<Command> cmds) {}
     367    }
     368
     369    public static class Space extends Item {
     370        @Override public void addToPanel(JPanel p, Collection<OsmPrimitive> sel) {
     371            p.add(new JLabel(" "), GBC.eol()); // space
     372        }
     373        @Override public void addCommands(Collection<OsmPrimitive> sel, List<Command> cmds) {}
     374    }
     375
    359376    public static class Key extends Item {
    360377        public String key;
     
    441458        parser.mapBoth("group", TaggingPresetMenu.class);
    442459        parser.map("text", Text.class);
     460        parser.mapOnStart("optional", Optional.class);
    443461        parser.map("check", Check.class);
    444462        parser.map("combo", Combo.class);
    445463        parser.map("label", Label.class);
     464        parser.map("space", Space.class);
    446465        parser.map("key", Key.class);
    447466        LinkedList<TaggingPreset> all = new LinkedList<TaggingPreset>();
Note: See TracChangeset for help on using the changeset viewer.