import tim.prune.load.TrackNameList;
import tim.prune.save.ExifSaver;
import tim.prune.save.FileSaver;
+import tim.prune.tips.TipManager;
import tim.prune.undo.*;
private FileLoader _fileLoader = null;
private JpegLoader _jpegLoader = null;
private FileSaver _fileSaver = null;
- private Stack<UndoOperation> _undoStack = null;
+ private UndoStack _undoStack = null;
private boolean _mangleTimestampsConfirmed = false;
private Viewport _viewport = null;
private ArrayList<File> _dataFiles = null;
public App(JFrame inFrame)
{
_frame = inFrame;
- _undoStack = new Stack<UndoOperation>();
+ _undoStack = new UndoStack();
_track = new Track();
_trackInfo = new TrackInfo(_track);
FunctionLibrary.initialise(this);
return _undoStack;
}
+
+ /**
+ * Show the specified tip if appropriate
+ * @param inTipNumber tip number from TipManager
+ */
+ public void showTip(int inTipNumber)
+ {
+ String key = TipManager.fireTipTrigger(inTipNumber);
+ if (key != null && !key.equals(""))
+ {
+ JOptionPane.showMessageDialog(_frame, I18nManager.getText(key),
+ I18nManager.getText("tip.title"), JOptionPane.INFORMATION_MESSAGE);
+ }
+ }
+
+
/**
* Load the specified data files one by one
* @param inDataFiles arraylist containing File objects to load
// ensure track's field list contains point's fields
_track.extendFieldList(inPoint.getFieldList());
_trackInfo.selectPoint(inIndex);
- final int selStart = _trackInfo.getSelection().getStart();
- final int selEnd = _trackInfo.getSelection().getEnd();
+ final int selStart = _trackInfo.getSelection().getStart();
+ final int selEnd = _trackInfo.getSelection().getEnd();
if (selStart < inIndex && selEnd > inIndex)
{
// Extend end of selection by 1
UpdateMessageBroker.informSubscribers();
}
+ /**
+ * @return the current data status, used for later comparison
+ */
+ public DataStatus getCurrentDataStatus() {
+ return new DataStatus(_undoStack.size(), _undoStack.getNumTimesDeleted());
+ }
/**
* Show a map url in an external browser