X-Git-Url: https://gitweb.fperrin.net/?a=blobdiff_plain;f=tim%2Fprune%2Fcorrelate%2FPhotoCorrelator.java;h=84c179ec3d3a23576d9e6ee83cdf1133758e20af;hb=140e9d165f85c3d4f0435a311e091209313faa2a;hp=6c47d0042621e44e2c38d36f867d569533af9663;hpb=54b9d8bc8f0025ccf97a67d9dd217ef1f9cf082f;p=GpsPrune.git diff --git a/tim/prune/correlate/PhotoCorrelator.java b/tim/prune/correlate/PhotoCorrelator.java index 6c47d00..84c179e 100644 --- a/tim/prune/correlate/PhotoCorrelator.java +++ b/tim/prune/correlate/PhotoCorrelator.java @@ -69,10 +69,6 @@ public class PhotoCorrelator extends GenericFunction public PhotoCorrelator(App inApp) { super(inApp); - _dialog = new JDialog(inApp.getFrame(), I18nManager.getText(getNameKey()), true); - _dialog.setLocationRelativeTo(inApp.getFrame()); - _dialog.getContentPane().add(makeDialogContents()); - _dialog.pack(); } @@ -86,6 +82,14 @@ public class PhotoCorrelator extends GenericFunction */ public void begin() { + // First create dialog if necessary + if (_dialog == null) + { + _dialog = new JDialog(_parentFrame, I18nManager.getText(getNameKey()), true); + _dialog.setLocationRelativeTo(_parentFrame); + _dialog.getContentPane().add(makeDialogContents()); + _dialog.pack(); + } // Check whether track has timestamps, exit if not if (!_app.getTrackInfo().getTrack().hasData(Field.TIMESTAMP)) { @@ -162,8 +166,11 @@ public class PhotoCorrelator extends GenericFunction JPanel card2Top = new JPanel(); card2Top.setLayout(new BoxLayout(card2Top, BoxLayout.Y_AXIS)); _tipLabel = new JLabel(I18nManager.getText("dialog.correlate.options.tip")); + _tipLabel.setBorder(BorderFactory.createEmptyBorder(8, 6, 5, 6)); card2Top.add(_tipLabel); - card2Top.add(new JLabel(I18nManager.getText("dialog.correlate.options.intro"))); + JLabel introLabel = new JLabel(I18nManager.getText("dialog.correlate.options.intro")); + introLabel.setBorder(BorderFactory.createEmptyBorder(8, 6, 5, 6)); + card2Top.add(introLabel); // time offset section JPanel offsetPanel = new JPanel(); offsetPanel.setBorder(BorderFactory.createTitledBorder(I18nManager.getText("dialog.correlate.options.offsetpanel"))); @@ -258,7 +265,7 @@ public class PhotoCorrelator extends GenericFunction card2Top.add(previewButton); card2.add(card2Top, BorderLayout.NORTH); // preview - _previewTable = new JTable(); + _previewTable = new JTable(new PhotoPreviewTableModel()); JScrollPane previewScrollPane = new JScrollPane(_previewTable); previewScrollPane.setPreferredSize(new Dimension(300, 100)); card2.add(previewScrollPane, BorderLayout.CENTER); @@ -332,7 +339,9 @@ public class PhotoCorrelator extends GenericFunction for (int i=0; i