Changeset 2632 in josm for trunk/src/org
- Timestamp:
- 2009-12-14T12:57:16+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r2626 r2632 5 5 6 6 import java.awt.BorderLayout; 7 import java.awt.GridLayout;8 7 import java.awt.Point; 9 8 import java.awt.event.ActionEvent; … … 23 22 import javax.swing.DefaultListSelectionModel; 24 23 import javax.swing.JList; 25 import javax.swing.JPanel;26 24 import javax.swing.JPopupMenu; 27 25 import javax.swing.JScrollPane; 26 import javax.swing.JToolBar; 28 27 import javax.swing.KeyStroke; 29 28 import javax.swing.ListSelectionModel; … … 49 48 import org.openstreetmap.josm.gui.MapView; 50 49 import org.openstreetmap.josm.gui.OsmPrimitivRenderer; 51 import org.openstreetmap.josm.gui. SideButton;50 import org.openstreetmap.josm.gui.MapView.LayerChangeListener; 52 51 import org.openstreetmap.josm.gui.dialogs.relation.DownloadRelationTask; 53 52 import org.openstreetmap.josm.gui.dialogs.relation.RelationEditor; 54 53 import org.openstreetmap.josm.gui.layer.Layer; 55 54 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 56 import org.openstreetmap.josm.tools.GBC;57 55 import org.openstreetmap.josm.tools.ImageProvider; 58 56 import org.openstreetmap.josm.tools.Shortcut; … … 101 99 // create the panel with buttons 102 100 // 103 J Panel buttonPanel = new JPanel(new GridLayout(1,3));104 101 JToolBar tp = new JToolBar(JToolBar.HORIZONTAL); 102 tp.setFloatable(false); 105 103 // the new action 106 104 // 107 105 newAction = new NewAction(); 108 buttonPanel.add(new SideButton(newAction), GBC.std());106 tp.add(newAction); 109 107 110 108 // the edit action … … 112 110 editAction = new EditAction(); 113 111 displaylist.addListSelectionListener(editAction); 114 buttonPanel.add(new SideButton(editAction), GBC.std());112 tp.add(editAction); 115 113 116 114 // the duplicate action … … 118 116 DuplicateAction duplicateAction = new DuplicateAction(); 119 117 displaylist.addListSelectionListener(duplicateAction); 120 buttonPanel.add(new SideButton(duplicateAction), GBC.std());118 tp.add(duplicateAction); 121 119 122 120 // the delete action … … 124 122 deleteAction = new DeleteAction(); 125 123 displaylist.addListSelectionListener(deleteAction); 126 buttonPanel.add(new SideButton(deleteAction), GBC.eol());124 tp.add(deleteAction); 127 125 128 126 // the select action … … 130 128 SelectAction selectAction = new SelectAction(); 131 129 displaylist.addListSelectionListener(selectAction); 132 buttonPanel.add(new SideButton(selectAction), GBC.eol());133 134 add( buttonPanel, BorderLayout.SOUTH);130 tp.add(selectAction); 131 132 add(tp, BorderLayout.SOUTH); 135 133 136 134 // activate DEL in the list of relations … … 339 337 * 340 338 */ 341 static class NewAction extends AbstractAction implements MapView.LayerChangeListener{339 static class NewAction extends AbstractAction implements LayerChangeListener{ 342 340 public NewAction() { 343 341 putValue(SHORT_DESCRIPTION,tr("Create a new relation")); 344 342 //putValue(NAME, tr("New")); 345 343 putValue(SMALL_ICON, ImageProvider.get("dialogs", "addrelation")); 346 setEnabled(false);344 updateEnabledState(); 347 345 } 348 346
Note:
See TracChangeset
for help on using the changeset viewer.