Changeset 27957 in osm
- Timestamp:
- 2012-02-29T17:07:20+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementDialog.java
r27852 r27957 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.BorderLayout;7 6 import java.awt.Dimension; 8 7 import java.awt.GridLayout; 9 8 import java.awt.event.ActionEvent; 10 import java.awt.event.ActionListener;11 9 import java.awt.event.KeyEvent; 12 10 import java.text.DecimalFormat; … … 14 12 import java.util.Collection; 15 13 14 import javax.swing.AbstractAction; 16 15 import javax.swing.JLabel; 17 16 import javax.swing.JPanel; … … 24 23 import org.openstreetmap.josm.gui.SideButton; 25 24 import org.openstreetmap.josm.gui.dialogs.ToggleDialog; 25 import org.openstreetmap.josm.gui.help.HelpUtil; 26 import org.openstreetmap.josm.tools.ImageProvider; 26 27 import org.openstreetmap.josm.tools.Shortcut; 27 28 … … 31 32 * @author ramack 32 33 */ 33 public class MeasurementDialog extends ToggleDialog implements ActionListener 34 { 34 public class MeasurementDialog extends ToggleDialog { 35 35 private static final long serialVersionUID = 4708541586297950021L; 36 36 … … 69 69 KeyEvent.VK_U, Shortcut.CTRL_SHIFT), 150); 70 70 71 resetButton = new SideButton(marktr("Reset"), "select", "Measurement", 72 tr("Reset current measurement results and delete measurement path."), this); 71 resetButton = new SideButton(new AbstractAction() { 72 { 73 putValue(NAME, marktr("Reset")); 74 putValue(SMALL_ICON,ImageProvider.get("dialogs", "select")); 75 putValue(SHORT_DESCRIPTION, tr("Reset current measurement results and delete measurement path.")); 76 putValue("help", HelpUtil.ht("/Dialog/Measurement#Reset")); 77 } 78 @Override 79 public void actionPerformed(ActionEvent e) 80 { 81 resetValues(); 82 } 83 }); 73 84 74 85 JPanel valuePanel = new JPanel(new GridLayout(0,2)); … … 149 160 } 150 161 151 @Override152 public void actionPerformed(ActionEvent e)153 {154 String actionCommand = e.getActionCommand();155 if( actionCommand.equals("Reset")){156 resetValues();157 }158 }159 160 162 /** 161 163 * Cleans the active Meausurement Layer
Note:
See TracChangeset
for help on using the changeset viewer.