Last change
on this file since 86 was 86, checked in by imi, 18 years ago |
- added conflicts and resolve conflict dialog
This is one of those "changed everything" checkpoint.
|
File size:
1023 bytes
|
Line | |
---|
1 | package org.openstreetmap.josm.gui.dialogs;
|
---|
2 |
|
---|
3 | import java.awt.event.ActionEvent;
|
---|
4 |
|
---|
5 | import javax.swing.AbstractAction;
|
---|
6 | import javax.swing.JList;
|
---|
7 | import javax.swing.JOptionPane;
|
---|
8 | import javax.swing.JPopupMenu;
|
---|
9 |
|
---|
10 | import org.openstreetmap.josm.Main;
|
---|
11 | import org.openstreetmap.josm.gui.layer.Layer;
|
---|
12 | import org.openstreetmap.josm.tools.ImageProvider;
|
---|
13 |
|
---|
14 | /**
|
---|
15 | * Popup menu handler for the layer list.
|
---|
16 | */
|
---|
17 | public class LayerListPopup extends JPopupMenu {
|
---|
18 |
|
---|
19 | public final static class InfoAction extends AbstractAction {
|
---|
20 | private final Layer layer;
|
---|
21 | public InfoAction(Layer layer) {
|
---|
22 | super("Info", ImageProvider.get("info"));
|
---|
23 | this.layer = layer;
|
---|
24 | }
|
---|
25 | public void actionPerformed(ActionEvent e) {
|
---|
26 | JOptionPane.showMessageDialog(Main.main, layer.getInfoComponent());
|
---|
27 | }
|
---|
28 | }
|
---|
29 |
|
---|
30 | public LayerListPopup(final JList layers, final Layer layer) {
|
---|
31 | add(new LayerList.ShowHideLayerAction(layers, layer));
|
---|
32 | add(new LayerList.DeleteLayerAction(layers, layer));
|
---|
33 | addSeparator();
|
---|
34 |
|
---|
35 | layer.addMenuEntries(this);
|
---|
36 | }
|
---|
37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.