Ignore:
Timestamp:
2009-08-02T23:15:26+02:00 (15 years ago)
Author:
Gubaer
Message:

update: rewrite of layer dialog
new: allows multiple selection of layers in the dialog
new: move up, move down, toggle visibility, and delete on multiple layers
new: merge from an arbitrary layer into another layer, not only from the first into the second
new: new action for merging of the currently selected primitives on an arbitrary layer
new: make "active" layer explicit (special icon); activating a layer automatically moves it in the first position
refactoring: public fields 'name' and 'visible' on Layer are @deprecated. Use the setter/getters instead, Layer now emits PropertyChangeEvents if name or visibility are changed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    r1865 r1890  
    407407        }
    408408        final JPanel p = new JPanel(new GridBagLayout());
    409         p.add(new JLabel(tr("{0} consists of:", name)), GBC.eol());
     409        p.add(new JLabel(tr("{0} consists of:", getName())), GBC.eol());
    410410        for (int i = 0; i < counter.normal.length; ++i) {
    411411            String s = counter.normal[i]+" "+trn(counter.names[i],counter.names[i]+"s",counter.normal[i]);
     
    423423        if (Main.applet)
    424424            return new Component[]{
    425                 new JMenuItem(new LayerListDialog.ShowHideLayerAction(this)),
    426                 new JMenuItem(new LayerListDialog.DeleteLayerAction(this)),
     425                new JMenuItem(LayerListDialog.getInstance().createActivateLayerAction(this)),
     426                new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)),
     427                new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)),
     428                new JSeparator(),
     429                new JMenuItem(LayerListDialog.getInstance().createMergeLayerAction(this)),
    427430                new JSeparator(),
    428431                new JMenuItem(new RenameLayerAction(getAssociatedFile(), this)),
     
    430433                new JMenuItem(new LayerListPopup.InfoAction(this))};
    431434        return new Component[]{
    432                 new JMenuItem(new LayerListDialog.ShowHideLayerAction(this)),
    433                 new JMenuItem(new LayerListDialog.DeleteLayerAction(this)),
     435                new JMenuItem(LayerListDialog.getInstance().createActivateLayerAction(this)),
     436                new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)),
     437                new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)),
    434438                new JSeparator(),
     439                new JMenuItem(LayerListDialog.getInstance().createMergeLayerAction(this)),
    435440                new JMenuItem(new LayerSaveAction(this)),
    436441                new JMenuItem(new LayerSaveAsAction(this)),
     
    515520        }
    516521        public void actionPerformed(ActionEvent e) {
    517             Main.main.addLayer(new GpxLayer(toGpxData(), tr("Converted from: {0}", name)));
     522            Main.main.addLayer(new GpxLayer(toGpxData(), tr("Converted from: {0}", getName())));
    518523            Main.main.removeLayer(OsmDataLayer.this);
    519524        }
Note: See TracChangeset for help on using the changeset viewer.