~ubuntu-branches/ubuntu/utopic/gpsprune/utopic

« back to all changes in this revision

Viewing changes to tim/prune/gui/DetailsDisplay.java

  • Committer: Bazaar Package Importer
  • Author(s): David Paleino
  • Date: 2011-10-20 21:54:34 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20111020215434-fqphir79ryum5mea
Tags: 13.1-1
* New upstream version
  + now defaults looking in ~ for the configuration (Closes: #598983)
  + added OpenSeaMap to background images (Closes: #639502)
* Upstream author renamed it gpsprune, fix various files
* Fix Main-Class in debian/manifest

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
import tim.prune.UpdateMessageBroker;
28
28
import tim.prune.config.Config;
29
29
import tim.prune.data.Altitude;
30
 
import tim.prune.data.AudioFile;
 
30
import tim.prune.data.AudioClip;
31
31
import tim.prune.data.Coordinate;
32
32
import tim.prune.data.DataPoint;
33
33
import tim.prune.data.Distance;
63
63
        private PhotoThumbnail _photoThumbnail = null;
64
64
        private JLabel _photoTimestampLabel = null;
65
65
        private JLabel _photoConnectedLabel = null;
 
66
        private JLabel _photoBearingLabel = null;
66
67
        private JPanel _rotationButtons = null;
67
68
 
68
69
        // Audio details
160
161
                _photoDetailsPanel.add(_photoTimestampLabel);
161
162
                _photoConnectedLabel = new JLabel("");
162
163
                _photoDetailsPanel.add(_photoConnectedLabel);
 
164
                _photoBearingLabel = new JLabel("");
 
165
                _photoDetailsPanel.add(_photoBearingLabel);
163
166
                _photoThumbnail = new PhotoThumbnail();
164
167
                _photoThumbnail.setVisible(false);
165
168
                _photoThumbnail.setPreferredSize(new Dimension(100, 100));
381
384
                        _photoLabel.setText(I18nManager.getText("details.nophoto"));
382
385
                        _photoTimestampLabel.setText("");
383
386
                        _photoConnectedLabel.setText("");
 
387
                        _photoBearingLabel.setText("");
384
388
                        _photoThumbnail.setVisible(false);
385
389
                        _rotationButtons.setVisible(false);
386
390
                }
387
391
                else
388
392
                {
389
393
                        if (currentPhoto == null) {currentPhoto = currentPoint.getPhoto();}
390
 
                        _photoLabel.setText(I18nManager.getText("details.photofile") + ": " + currentPhoto.getFile().getName());
391
 
                        _photoTimestampLabel.setText(LABEL_POINT_TIMESTAMP + currentPhoto.getTimestamp().getText());
 
394
                        _photoLabel.setText(I18nManager.getText("details.photofile") + ": " + currentPhoto.getName());
 
395
                        _photoTimestampLabel.setText(currentPhoto.hasTimestamp()?(LABEL_POINT_TIMESTAMP + currentPhoto.getTimestamp().getText()):"");
392
396
                        _photoConnectedLabel.setText(I18nManager.getText("details.media.connected") + ": "
393
397
                                + (currentPhoto.getCurrentStatus() == Photo.Status.NOT_CONNECTED ?
394
398
                                        I18nManager.getText("dialog.about.no"):I18nManager.getText("dialog.about.yes")));
 
399
                        if (currentPhoto.getBearing() >= 0.0 && currentPhoto.getBearing() <= 360.0)
 
400
                        {
 
401
                                _photoBearingLabel.setText(I18nManager.getText("details.photo.bearing") + ": "
 
402
                                        + (int) currentPhoto.getBearing() + " \u00B0");
 
403
                        }
 
404
                        else _photoBearingLabel.setText("");
395
405
                        _photoThumbnail.setVisible(true);
396
406
                        _photoThumbnail.setPhoto(currentPhoto);
397
407
                        _rotationButtons.setVisible(true);
401
411
 
402
412
                // audio details
403
413
                _audioDetailsPanel.setVisible(_trackInfo.getAudioList().getNumAudios() > 0);
404
 
                AudioFile currentAudio = _trackInfo.getAudioList().getAudio(_trackInfo.getSelection().getCurrentAudioIndex());
 
414
                AudioClip currentAudio = _trackInfo.getAudioList().getAudio(_trackInfo.getSelection().getCurrentAudioIndex());
405
415
                if (currentAudio == null) {
406
416
                        _audioLabel.setText(I18nManager.getText("details.noaudio"));
407
417
                        _audioTimestampLabel.setText("");
410
420
                }
411
421
                else
412
422
                {
413
 
                        _audioLabel.setText(LABEL_AUDIO_FILE + currentAudio.getFile().getName());
414
 
                        _audioTimestampLabel.setText(LABEL_POINT_TIMESTAMP + currentAudio.getTimestamp().getText());
 
423
                        _audioLabel.setText(LABEL_AUDIO_FILE + currentAudio.getName());
 
424
                        _audioTimestampLabel.setText(currentAudio.hasTimestamp()?(LABEL_POINT_TIMESTAMP + currentAudio.getTimestamp().getText()):"");
415
425
                        int audioLength = currentAudio.getLengthInSeconds();
416
426
                        _audioLengthLabel.setText(audioLength < 0?"":LABEL_RANGE_DURATION + DisplayUtils.buildDurationString(audioLength));
417
427
                        _audioConnectedLabel.setText(I18nManager.getText("details.media.connected") + ": "