+ /**
+ * Create a JToolBar containing all toolbar buttons
+ * @return toolbar containing buttons
+ */
+ public JToolBar createToolBar()
+ {
+ JToolBar toolbar = new JToolBar();
+ // Add text file
+ JButton openFileButton = new JButton(new ImageIcon(getClass().getResource("images/add_textfile_icon.png")));
+ openFileButton.setToolTipText(I18nManager.getText("menu.file.open"));
+ openFileButton.addActionListener(_openFileAction);
+ toolbar.add(openFileButton);
+ // Add photo
+ JButton addPhotoButton = new JButton(new ImageIcon(getClass().getResource("images/add_photo_icon.png")));
+ addPhotoButton.setToolTipText(I18nManager.getText("menu.file.addphotos"));
+ addPhotoButton.addActionListener(_addPhotoAction);
+ toolbar.add(addPhotoButton);
+ // Save
+ _saveButton = new JButton(new ImageIcon(getClass().getResource("images/save_icon.gif")));
+ _saveButton.setToolTipText(I18nManager.getText("menu.file.save"));
+ _saveButton.addActionListener(_saveAction);
+ _saveButton.setEnabled(false);
+ toolbar.add(_saveButton);
+ // Undo
+ _undoButton = new JButton(new ImageIcon(getClass().getResource("images/undo_icon.gif")));
+ _undoButton.setToolTipText(I18nManager.getText("menu.edit.undo"));
+ _undoButton.addActionListener(_undoAction);
+ _undoButton.setEnabled(false);
+ toolbar.add(_undoButton);
+ // Edit point
+ _editPointButton = new JButton(new ImageIcon(getClass().getResource("images/edit_point_icon.gif")));
+ _editPointButton.setToolTipText(I18nManager.getText("menu.edit.editpoint"));
+ _editPointButton.addActionListener(_editPointAction);
+ _editPointButton.setEnabled(false);
+ toolbar.add(_editPointButton);
+ // Select start, end
+ _selectStartButton = new JButton(new ImageIcon(getClass().getResource("images/set_start_icon.png")));
+ _selectStartButton.setToolTipText(I18nManager.getText("menu.select.start"));
+ _selectStartButton.addActionListener(_selectStartAction);
+ _selectStartButton.setEnabled(false);
+ toolbar.add(_selectStartButton);
+ _selectEndButton = new JButton(new ImageIcon(getClass().getResource("images/set_end_icon.png")));
+ _selectEndButton.setToolTipText(I18nManager.getText("menu.select.end"));
+ _selectEndButton.addActionListener(_selectEndAction);
+ _selectEndButton.setEnabled(false);
+ toolbar.add(_selectEndButton);
+ _connectPhotoButton = new JButton(new ImageIcon(getClass().getResource("images/connect_photo_icon.png")));
+ _connectPhotoButton.setToolTipText(I18nManager.getText("menu.photo.connect"));
+ _connectPhotoButton.addActionListener(_connectPhotoAction);
+ _connectPhotoButton.setEnabled(false);
+ toolbar.add(_connectPhotoButton);
+ // finish off
+ toolbar.setFloatable(false);
+ return toolbar;
+ }
+
+