Class ConvertFromGpxLayerAction
java.lang.Object
javax.swing.AbstractAction
org.openstreetmap.josm.gui.layer.gpx.ConvertToDataLayerAction<GpxLayer>
org.openstreetmap.josm.gui.layer.gpx.ConvertFromGpxLayerAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action
Converts a
GpxLayer to a OsmDataLayer.- Since:
- 14129 (extracted from
ConvertToDataLayerAction) - See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static class -
Field Summary
FieldsFields inherited from class org.openstreetmap.josm.gui.layer.gpx.ConvertToDataLayerAction
layerFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddAttributes(Map<String, Object> attr, OsmPrimitive p, List<String> keys, boolean check, boolean none, String gpxPrefix) private static voidaddExtensions(GpxExtensionCollection exts, OsmPrimitive p, boolean seg, List<String> keys, boolean check, String gpxPrefix) convert()Performs the conversion to aDataSet.static DataSetstatic DataSetfilterDataSet(DataSet ds, List<String> listPos, String gpxPrefix) Filters the tags of the givenDataSetprivate static ConvertFromGpxLayerAction.TagConversionDialogResponseShows the TagConversionDialog asking the user whether to keep all, some or no tagsMethods inherited from class org.openstreetmap.josm.gui.layer.gpx.ConvertToDataLayerAction
actionPerformedMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
GPX_SETTING
- See Also:
-
-
Constructor Details
-
ConvertFromGpxLayerAction
Creates a newFromGpxLayer.- Parameters:
layer- the source layer
-
-
Method Details
-
convert
Description copied from class:ConvertToDataLayerActionPerforms the conversion to aDataSet.- Specified by:
convertin classConvertToDataLayerAction<GpxLayer>- Returns:
- the resulting dataset
-
convert
- Parameters:
data- GPX data to convertconvertTags- "list", "ask" or "no"gpxPrefix- GPX prefix for tags- Returns:
- the converted dataset
- Since:
- 18078
-
addAttributes
private static void addAttributes(Map<String, Object> attr, OsmPrimitive p, List<String> keys, boolean check, boolean none, String gpxPrefix) -
addExtensions
private static void addExtensions(GpxExtensionCollection exts, OsmPrimitive p, boolean seg, List<String> keys, boolean check, String gpxPrefix) -
filterDataSet
Filters the tags of the givenDataSet -
showTagConversionDialog
private static ConvertFromGpxLayerAction.TagConversionDialogResponse showTagConversionDialog(List<String> keys, List<String> listPos, List<String> listNeg) Shows the TagConversionDialog asking the user whether to keep all, some or no tags- Parameters:
keys- The keys present during the current conversionlistPos- The keys that were previously selectedlistNeg- The keys that were previously unselected- Returns:
ConvertFromGpxLayerAction.TagConversionDialogResponsecontaining the selection
-