- otherDetailsPanel.add(_updownLabel);
- otherDetailsPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
-
- // Add tab panel for waypoints / photos
- JPanel waypointsPanel = new JPanel();
- waypointsPanel.setLayout(new BoxLayout(waypointsPanel, BoxLayout.Y_AXIS));
- waypointsPanel.setBorder(BorderFactory.createCompoundBorder(
- BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), BorderFactory.createEmptyBorder(3, 3, 3, 3))
- );
- JTabbedPane tabPane = new JTabbedPane();
- _waypointListModel = new WaypointListModel(_trackInfo.getTrack());
- _waypointList = new JList(_waypointListModel);
- _waypointList.setVisibleRowCount(5);
- _waypointList.addListSelectionListener(new ListSelectionListener() {
- public void valueChanged(ListSelectionEvent e)
- {
- if (!e.getValueIsAdjusting()) selectWaypoint(_waypointList.getSelectedIndex());
- }});
- tabPane.addTab(I18nManager.getText("details.waypointsphotos.waypoints"), new JScrollPane(_waypointList));
- _photoListModel = new PhotoListModel(_trackInfo.getPhotoList());
- _photoList = new JList(_photoListModel);
- _photoList.setVisibleRowCount(5);
- _photoList.addListSelectionListener(new ListSelectionListener() {
- public void valueChanged(ListSelectionEvent e)
- {
- if (!e.getValueIsAdjusting()) selectPhoto(_photoList.getSelectedIndex());
- }});
- // TODO: Re-add photos list after v2
- // tabPane.addTab(I18nManager.getText("details.waypointsphotos.photos"), new JScrollPane(_photoList));
- tabPane.setAlignmentX(Component.LEFT_ALIGNMENT);
- waypointsPanel.add(tabPane);
- waypointsPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
-
- // add the slider, point details, and the other details to the main panel
- mainPanel.add(buttonPanel);
- mainPanel.add(Box.createVerticalStrut(5));
- mainPanel.add(_scroller);
+ rangeDetailsPanel.add(_updownLabel);
+ rangeDetailsPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
+
+ // photo details panel
+ _photoDetailsPanel = makeDetailsPanel("details.photodetails", biggerFont);
+ _photoLabel = new JLabel(I18nManager.getText("details.nophoto"));
+ _photoDetailsPanel.add(_photoLabel);
+ _photoPathLabel = new JLabel("");
+ _photoDetailsPanel.add(_photoPathLabel);
+ _photoTimestampLabel = new JLabel("");
+ _photoTimestampLabel.setMinimumSize(new Dimension(120, 10));
+ _photoDetailsPanel.add(_photoTimestampLabel);
+ _photoConnectedLabel = new JLabel("");
+ _photoDetailsPanel.add(_photoConnectedLabel);
+ _photoBearingLabel = new JLabel("");
+ _photoDetailsPanel.add(_photoBearingLabel);
+ _photoThumbnail = new PhotoThumbnail();
+ _photoThumbnail.setVisible(false);
+ _photoThumbnail.setPreferredSize(new Dimension(100, 100));
+ _photoDetailsPanel.add(_photoThumbnail);
+ // Rotate buttons
+ JButton rotLeft = makeRotateButton(IconManager.ROTATE_LEFT, FunctionLibrary.FUNCTION_ROTATE_PHOTO_LEFT);
+ JButton rotRight = makeRotateButton(IconManager.ROTATE_RIGHT, FunctionLibrary.FUNCTION_ROTATE_PHOTO_RIGHT);
+ JButton popup = makeRotateButton(IconManager.SHOW_DETAILS, FunctionLibrary.FUNCTION_PHOTO_POPUP);
+ _rotationButtons = new JPanel();
+ _rotationButtons.add(rotLeft);
+ _rotationButtons.add(rotRight);
+ _rotationButtons.add(Box.createHorizontalStrut(10));
+ _rotationButtons.add(popup);
+ _rotationButtons.setAlignmentX(Component.LEFT_ALIGNMENT);
+ _rotationButtons.setVisible(false);
+ _photoDetailsPanel.add(_rotationButtons);
+ _photoDetailsPanel.setVisible(false);
+
+ // audio details panel
+ _audioDetailsPanel = makeDetailsPanel("details.audiodetails", biggerFont);
+ _audioLabel = new JLabel(I18nManager.getText("details.noaudio"));
+ _audioDetailsPanel.add(_audioLabel);
+ _audioPathLabel = new JLabel("");
+ _audioDetailsPanel.add(_audioPathLabel);
+ _audioTimestampLabel = new JLabel("");
+ _audioTimestampLabel.setMinimumSize(new Dimension(120, 10));
+ _audioDetailsPanel.add(_audioTimestampLabel);
+ _audioLengthLabel = new JLabel("");
+ _audioDetailsPanel.add(_audioLengthLabel);
+ _audioConnectedLabel = new JLabel("");
+ _audioDetailsPanel.add(_audioConnectedLabel);
+ _audioProgress = new JProgressBar(0, 100);
+ _audioProgress.setString(I18nManager.getText("details.audio.playing"));
+ _audioProgress.setStringPainted(true);
+ _audioProgress.setVisible(false);
+ _audioDetailsPanel.add(_audioProgress);
+ _playAudioPanel = new JPanel();
+ _playAudioPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
+ JButton playAudio = makeRotateButton(IconManager.PLAY_AUDIO, FunctionLibrary.FUNCTION_PLAY_AUDIO);
+ playAudio.addActionListener(new AudioListener(_audioProgress));
+ _playAudioPanel.add(playAudio);
+ JButton stopAudio = makeRotateButton(IconManager.STOP_AUDIO, FunctionLibrary.FUNCTION_STOP_AUDIO);
+ _playAudioPanel.add(stopAudio);
+ _playAudioPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
+ _playAudioPanel.setVisible(false);
+ _audioDetailsPanel.add(_playAudioPanel);
+ _audioDetailsPanel.setVisible(false);
+
+ // add the details panels to the main panel
+ mainPanel.add(pointDetailsPanel);