Ignore:
Timestamp:
2010-08-03T07:52:26+02:00 (16 years ago)
Author:
jttt
Message:

Show only actions that can work on all selected layers in LayerListDialog popup menu

File:
1 edited

Legend:

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

    r3362 r3408  
    1010import java.awt.AlphaComposite;
    1111import java.awt.Color;
    12 import java.awt.Component;
    1312import java.awt.Composite;
    1413import java.awt.Graphics2D;
     
    2827
    2928import javax.swing.AbstractAction;
     29import javax.swing.Action;
    3030import javax.swing.Icon;
    3131import javax.swing.JLabel;
    32 import javax.swing.JMenuItem;
    3332import javax.swing.JOptionPane;
    3433import javax.swing.JPanel;
    3534import javax.swing.JScrollPane;
    36 import javax.swing.JSeparator;
    3735import javax.swing.JTextArea;
    3836
     
    440438    }
    441439
    442     @Override public Component[] getMenuEntries() {
     440    @Override public Action[] getMenuEntries() {
    443441        if (Main.applet)
    444             return new Component[]{
    445                 new JMenuItem(LayerListDialog.getInstance().createActivateLayerAction(this)),
    446                 new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)),
    447                 new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)),
    448                 new JSeparator(),
    449                 new JMenuItem(LayerListDialog.getInstance().createMergeLayerAction(this)),
    450                 new JSeparator(),
    451                 new JMenuItem(new RenameLayerAction(getAssociatedFile(), this)),
    452                 new JMenuItem(new ConsistencyTestAction()),
    453                 new JSeparator(),
    454                 new JMenuItem(new LayerListPopup.InfoAction(this))};
    455         return new Component[]{
    456                 new JMenuItem(LayerListDialog.getInstance().createActivateLayerAction(this)),
    457                 new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)),
    458                 new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)),
    459                 new JSeparator(),
    460                 new JMenuItem(LayerListDialog.getInstance().createMergeLayerAction(this)),
    461                 new JMenuItem(new LayerSaveAction(this)),
    462                 new JMenuItem(new LayerSaveAsAction(this)),
    463                 new JMenuItem(new LayerGpxExportAction(this)),
    464                 new JMenuItem(new ConvertToGpxLayerAction()),
    465                 new JSeparator(),
    466                 new JMenuItem(new RenameLayerAction(getAssociatedFile(), this)),
    467                 new JMenuItem(new ConsistencyTestAction()),
    468                 new JSeparator(),
    469                 new JMenuItem(new LayerListPopup.InfoAction(this))};
     442            return new Action[]{
     443                LayerListDialog.getInstance().createActivateLayerAction(this),
     444                LayerListDialog.getInstance().createShowHideLayerAction(),
     445                LayerListDialog.getInstance().createDeleteLayerAction(),
     446                SeparatorLayerAction.INSTANCE,
     447                LayerListDialog.getInstance().createMergeLayerAction(this),
     448                SeparatorLayerAction.INSTANCE,
     449                new RenameLayerAction(getAssociatedFile(), this),
     450                new ConsistencyTestAction(),
     451                SeparatorLayerAction.INSTANCE,
     452                new LayerListPopup.InfoAction(this)};
     453        return new Action[]{
     454                LayerListDialog.getInstance().createActivateLayerAction(this),
     455                LayerListDialog.getInstance().createShowHideLayerAction(),
     456                LayerListDialog.getInstance().createDeleteLayerAction(),
     457                SeparatorLayerAction.INSTANCE,
     458                LayerListDialog.getInstance().createMergeLayerAction(this),
     459                new LayerSaveAction(this),
     460                new LayerSaveAsAction(this),
     461                new LayerGpxExportAction(this),
     462                new ConvertToGpxLayerAction(),
     463                SeparatorLayerAction.INSTANCE,
     464                new RenameLayerAction(getAssociatedFile(), this),
     465                new ConsistencyTestAction(),
     466                SeparatorLayerAction.INSTANCE,
     467                new LayerListPopup.InfoAction(this)};
    470468    }
    471469
Note: See TracChangeset for help on using the changeset viewer.