Class ExportRelationToGpxAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.actions.JosmAction
-
- org.openstreetmap.josm.actions.DiskAccessAction
-
- org.openstreetmap.josm.actions.GpxExportAction
-
- org.openstreetmap.josm.actions.relation.ExportRelationToGpxAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action,IPrimitiveAction,Destroyable
public class ExportRelationToGpxAction extends GpxExportAction implements IPrimitiveAction
Exports the current relation to a single GPX track, currently for type=route and type=superroute relations only.- Since:
- 13210
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExportRelationToGpxAction.ModeEnumeration of export variants-
Nested classes/interfaces inherited from class org.openstreetmap.josm.actions.JosmAction
JosmAction.ActiveLayerChangeAdapter, JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<ExportRelationToGpxAction.Mode>modeMode of this ExportToGpxActionprotected java.util.Collection<Relation>relationsPrimitives this action works on-
Fields inherited from class org.openstreetmap.josm.actions.JosmAction
sc
-
-
Constructor Summary
Constructors Constructor Description ExportRelationToGpxAction()Construct a new ExportRelationToGpxAction with default modeExportRelationToGpxAction(java.util.Set<ExportRelationToGpxAction.Mode> mode)Constructs a newExportRelationToGpxAction
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)protected LayergetLayer()Get the layer to export.private <T> java.util.Iterator<T>modeAwareIterator(java.util.List<T> list)private static java.lang.Stringname(java.util.Set<ExportRelationToGpxAction.Mode> mode)voidsetPrimitives(java.util.Collection<? extends IPrimitive> primitives)Specifies the working set of primitives.private static java.lang.Stringtooltip(java.util.Set<ExportRelationToGpxAction.Mode> mode)protected voidupdateEnabledState()Refreshes the enabled state-
Methods inherited from class org.openstreetmap.josm.actions.GpxExportAction
export, listenToSelectionChange
-
Methods inherited from class org.openstreetmap.josm.actions.DiskAccessAction
createAndOpenFileChooser, createAndOpenFileChooser, createAndOpenFileChooser, createAndOpenFileChooser, createAndOpenFileChooser, showSavedNotification, showSavingNotification
-
Methods inherited from class org.openstreetmap.josm.actions.JosmAction
buildActiveLayerChangeAdapter, buildLayerChangeAdapter, checkAndConfirmOutlyingOperation, destroy, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, setHelpId, setToolbarId, setTooltip, updateEnabledState, updateEnabledStateOnCurrentSelection, updateEnabledStateOnCurrentSelection, updateEnabledStateOnModifiableSelection, waitFuture
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
mode
protected final java.util.Set<ExportRelationToGpxAction.Mode> mode
Mode of this ExportToGpxAction
-
-
Constructor Detail
-
ExportRelationToGpxAction
public ExportRelationToGpxAction()
Construct a new ExportRelationToGpxAction with default mode
-
ExportRelationToGpxAction
public ExportRelationToGpxAction(java.util.Set<ExportRelationToGpxAction.Mode> mode)
Constructs a newExportRelationToGpxAction- Parameters:
mode- which mode to use, seeExportRelationToGpxAction.Mode
-
-
Method Detail
-
name
private static java.lang.String name(java.util.Set<ExportRelationToGpxAction.Mode> mode)
-
tooltip
private static java.lang.String tooltip(java.util.Set<ExportRelationToGpxAction.Mode> mode)
-
getLayer
protected Layer getLayer()
Description copied from class:GpxExportActionGet the layer to export.- Overrides:
getLayerin classGpxExportAction- Returns:
- The layer to export, if supported, otherwise
null.
-
modeAwareIterator
private <T> java.util.Iterator<T> modeAwareIterator(java.util.List<T> list)
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Overrides:
actionPerformedin classGpxExportAction- Parameters:
e- the ActionEvent
-
setPrimitives
public void setPrimitives(java.util.Collection<? extends IPrimitive> primitives)
Description copied from interface:IPrimitiveActionSpecifies the working set of primitives.- Specified by:
setPrimitivesin interfaceIPrimitiveAction- Parameters:
primitives- The new working set of primitives. Can be null or empty
-
updateEnabledState
protected void updateEnabledState()
Description copied from class:GpxExportActionRefreshes the enabled state- Overrides:
updateEnabledStatein classGpxExportAction- See Also:
JosmAction.updateEnabledState(Collection),JosmAction.initEnabledState(),JosmAction.listenToLayerChange()
-
-