Class CorrelateGpxWithImages
java.lang.Object
javax.swing.AbstractAction
org.openstreetmap.josm.gui.layer.geoimage.CorrelateGpxWithImages
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action,ExpertToggleAction.ExpertModeChangeListener,Destroyable
public class CorrelateGpxWithImages
extends AbstractAction
implements ExpertToggleAction.ExpertModeChangeListener, Destroyable
This class displays the window to select the GPX file and the offset (timezone + delta).
Then it correlates the images of the layer with that GPX file.
- Since:
- 2566
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final classPresents dialog with sliders for manual adjust.private final classprivate final classprivate static classprivate static final classprivate static classprivate final classThis class is called when the user doesn't find the GPX file he needs in the files that have been loaded yet.private static class(package private) static class(package private) static classprivate final classThis action listener is called when the user has a photo of the time of his GPS receiver.private classprivate final classprivate final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate JButtonprivate JCheckBoxprivate JCheckBoxprivate JCheckBoxprivate JCheckBoxprivate GpxTimeOffsetprivate JPanelprivate static booleanprivate static JosmComboBoxModel<CorrelateGpxWithImages.GpxDataWrapper>private static TimeSourceprivate JLabelprivate JLabelprivate intprivate JPanelprivate ImageDirectionPositionPanelprivate JRadioButtonprivate JRadioButtonprivate JSeparatorprivate JSeparatorprivate JLabelprivate final CorrelateGpxWithImages.StatusBarUpdaterprivate final CorrelateGpxWithImages.StatusBarUpdaterprivate CorrelationSupportLayerprivate ExtendedDialogprivate JosmTextFieldprivate JosmTextFieldprivate JosmTextFieldprivate GpxTimezoneprivate final GeoImageLayerFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newCorrelateGpxWithImagesaction. -
Method Summary
Modifier and TypeMethodDescriptionvoid(package private) static Pair<GpxTimezone,GpxTimeOffset> autoGuess(List<ImageEntry> imgs, GpxData gpx) Tries to auto-guess the timezone and offset.(package private) voidprivate voidConstruct the list of loaded GPX tracksvoiddestroy()Called when the object has been destroyed.voidexpertChanged(boolean isExpert) The expert mode changed.private static voidforEachLayer(Consumer<CorrelateGpxWithImages> action) private List<ImageEntry>(package private) static GpxTimeOffset(package private) static String(package private) static GpxTimezoneprivate static voidremoveDuplicates(File file) private void(package private) voidprivate static CorrelateGpxWithImages.GpxDataWrapperselectedGPX(boolean complain) Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
gpxModel
-
forceTags
-
imgTimeSource
-
yLayer
-
supportLayer
-
timezone
-
delta
-
syncDialog
-
outerPanel
-
expertPanel
-
cbGpx
-
buttonSupport
-
tfTimezone
-
tfOffset
-
rbTimeFromCamera
-
rbTimeFromGps
-
cbExifImg
-
cbTaggedImg
-
cbShowThumbs
-
sepExtendedTags
-
labelExtTags
-
labelDatum
-
statusBarText
-
sepDirectionPosition
-
pDirectionPosition
-
cbAddGpsDatum
-
tfDatum
-
lastNumMatched
-
statusBarUpdater
-
statusBarUpdaterWithRepaint
-
-
Constructor Details
-
CorrelateGpxWithImages
Constructs a newCorrelateGpxWithImagesaction.- Parameters:
layer- The image layer
-
-
Method Details
-
removeSupportLayer
-
constructGpxModel
Construct the list of loaded GPX tracks- Parameters:
nogdw- Data wrapper with no GPX data
-
loadTimezone
-
loadDelta
-
loadGpsDatum
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
getSettings
-
expertChanged
Description copied from interface:ExpertToggleAction.ExpertModeChangeListenerThe expert mode changed.- Specified by:
expertChangedin interfaceExpertToggleAction.ExpertModeChangeListener- Parameters:
isExpert-trueif expert mode was enabled, false otherwise.
-
removeDuplicates
-
forEachLayer
-
closeDialog
void closeDialog() -
repaintCombobox
void repaintCombobox() -
autoGuess
static Pair<GpxTimezone,GpxTimeOffset> autoGuess(List<ImageEntry> imgs, GpxData gpx) throws CorrelateGpxWithImages.NoGpxTimestamps Tries to auto-guess the timezone and offset.- Parameters:
imgs- the images to correlategpx- the gpx track to correlate to- Returns:
- a pair of timezone and offset
- Throws:
IndexOutOfBoundsException- when there are no imagesCorrelateGpxWithImages.NoGpxTimestamps- when the gpx track does not contain a timestamp
-
getSortedImgList
-
selectedGPX
-
destroy
Description copied from interface:DestroyableCalled when the object has been destroyed.- Specified by:
destroyin interfaceDestroyable
-