- Timestamp:
- 2008-03-20T23:56:02+01:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r582 r586 5 5 6 6 import java.awt.BorderLayout; 7 import java.awt.FlowLayout; 8 import java.awt.GridBagLayout; 7 9 import java.awt.GridLayout; 8 10 import java.awt.event.ActionEvent; … … 28 30 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 29 31 import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener; 32 import org.openstreetmap.josm.tools.GBC; 30 33 import org.openstreetmap.josm.tools.ImageProvider; 31 34 … … 67 70 add(new JScrollPane(displaylist), BorderLayout.CENTER); 68 71 69 JPanel buttonPanel = new JPanel(new Grid Layout(1,3));70 71 buttonPanel.add(createButton(marktr(" Add Relation"), "addrelation", tr("Create a new relation"), -1, new ActionListener() {72 JPanel buttonPanel = new JPanel(new GridBagLayout()); 73 74 buttonPanel.add(createButton(marktr("New"), "addrelation", tr("Create a new relation"), -1, new ActionListener() { 72 75 public void actionPerformed(ActionEvent e) { 73 76 // call relation editor with null argument to create new relation 74 77 new RelationEditor(null).setVisible(true); 75 78 } 76 })); 79 }), GBC.std()); 80 81 buttonPanel.add(createButton(marktr("Select"), "select", tr("Select this relation"), -1, new ActionListener() { 82 public void actionPerformed(ActionEvent e) { 83 // replace selection with the relation from the list 84 Main.ds.setSelected((Relation)displaylist.getSelectedValue()); 85 } 86 }), GBC.std()); 77 87 78 88 buttonPanel.add(createButton(marktr("Edit"), "edit", tr( "Open an editor for the selected relation"), -1, new ActionListener() { … … 82 92 new RelationEditor(toEdit).setVisible(true); 83 93 } 84 }) );94 }), GBC.std()); 85 95 86 buttonPanel.add(createButton( marktr("Delete"), "delete", tr("Delete the selected relation"), -1, new ActionListener() {96 buttonPanel.add(createButton("", "delete", tr("Delete the selected relation"), -1, new ActionListener() { 87 97 public void actionPerformed(ActionEvent e) { 88 98 Relation toDelete = (Relation) displaylist.getSelectedValue(); … … 92 102 } 93 103 } 94 }) );104 }), GBC.eol()); 95 105 Layer.listeners.add(this); 96 106 add(buttonPanel, BorderLayout.SOUTH);
Note:
See TracChangeset
for help on using the changeset viewer.