1 package tim.prune.function;
3 import java.awt.BorderLayout;
4 import java.awt.FlowLayout;
5 import java.awt.event.ActionEvent;
6 import java.awt.event.ActionListener;
7 import java.awt.event.KeyAdapter;
8 import java.awt.event.KeyEvent;
9 import java.awt.event.MouseAdapter;
11 import javax.swing.BorderFactory;
12 import javax.swing.JButton;
13 import javax.swing.JDialog;
14 import javax.swing.JLabel;
15 import javax.swing.JPanel;
16 import javax.swing.JTextField;
19 import tim.prune.GenericFunction;
20 import tim.prune.I18nManager;
21 import tim.prune.config.Config;
22 import tim.prune.data.Field;
23 import tim.prune.data.Unit;
24 import tim.prune.data.UnitSetLibrary;
27 * Class to provide the function to add remove the altitude from points in a
30 public class RemoveAltitudes extends GenericFunction
34 * @param inApp application object for callback
36 public RemoveAltitudes(App inApp)
41 /** Get the name key */
42 public String getNameKey() {
43 return "function.removealtitudes";
51 int selStart = _app.getTrackInfo().getSelection().getStart();
52 int selEnd = _app.getTrackInfo().getSelection().getEnd();
53 if (!_app.getTrackInfo().getTrack().hasData(Field.ALTITUDE, selStart, selEnd))
55 _app.showErrorMessage(getNameKey(), "dialog.addaltitude.noaltitudes");
58 _app.removeAltitudes(selStart, selEnd);