public class GpxExporter extends FileExporter implements GpxConstants
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
GPL_WARNING |
private static java.lang.String[] |
LICENSES |
private static java.lang.String[] |
URLS |
filter
FIX_VALUES, GPX_CMT, GPX_DESC, GPX_NAME, GPX_SRC, JOSM_EXTENSIONS_NAMESPACE_URI, META_AUTHOR_EMAIL, META_AUTHOR_LINK, META_AUTHOR_NAME, META_BOUNDS, META_COPYRIGHT_AUTHOR, META_COPYRIGHT_LICENSE, META_COPYRIGHT_YEAR, META_DESC, META_EXTENSIONS, META_KEYWORDS, META_LINKS, META_NAME, META_PREFIX, META_TIME, PT_AGEOFDGPSDATA, PT_DGPSID, PT_ELE, PT_FIX, PT_GEOIDHEIGHT, PT_HDOP, PT_MAGVAR, PT_PDOP, PT_SAT, PT_SYM, PT_TIME, PT_TYPE, PT_VDOP, RTE_TRK_KEYS, WPT_KEYS
Constructor and Description |
---|
GpxExporter()
Constructs a new
GpxExporter . |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptFile(java.io.File pathname,
Layer layer)
Check if this exporter can export a certain layer to a certain file.
|
private static void |
addDependencies(GpxData data,
javax.swing.JCheckBox author,
JosmTextField authorName,
JosmTextField email,
JosmTextField copyright,
javax.swing.JButton predefined,
JosmTextField copyrightYear,
javax.swing.JLabel nameLabel,
javax.swing.JLabel emailLabel,
javax.swing.JLabel copyrightLabel,
javax.swing.JLabel copyrightYearLabel,
javax.swing.JLabel warning)
Add all those listeners to handle the enable state of the fields.
|
private static void |
enableCopyright(GpxData data,
JosmTextField copyright,
javax.swing.JButton predefined,
JosmTextField copyrightYear,
javax.swing.JLabel copyrightLabel,
javax.swing.JLabel copyrightYearLabel,
javax.swing.JLabel warning,
boolean enable) |
void |
exportData(java.io.File file,
Layer layer)
Execute the data export.
|
activeOrEditLayerChanged, isCanceled, isEnabled, setCanceled, setEnabled
private static final java.lang.String GPL_WARNING
private static final java.lang.String[] LICENSES
private static final java.lang.String[] URLS
public GpxExporter()
GpxExporter
.public boolean acceptFile(java.io.File pathname, Layer layer)
FileExporter
acceptFile
in class FileExporter
pathname
- the target file name (check file extension using the FileExporter.filter
layer
- the layer requested for exportpublic void exportData(java.io.File file, Layer layer) throws java.io.IOException
FileExporter
exportData
in class FileExporter
file
- target filelayer
- the layer to exportjava.io.IOException
- in case of an IO errorprivate static void enableCopyright(GpxData data, JosmTextField copyright, javax.swing.JButton predefined, JosmTextField copyrightYear, javax.swing.JLabel copyrightLabel, javax.swing.JLabel copyrightYearLabel, javax.swing.JLabel warning, boolean enable)
private static void addDependencies(GpxData data, javax.swing.JCheckBox author, JosmTextField authorName, JosmTextField email, JosmTextField copyright, javax.swing.JButton predefined, JosmTextField copyrightYear, javax.swing.JLabel nameLabel, javax.swing.JLabel emailLabel, javax.swing.JLabel copyrightLabel, javax.swing.JLabel copyrightYearLabel, javax.swing.JLabel warning)
data
- GPX dataauthor
- Author checkboxauthorName
- Author name textfieldemail
- E-mail textfieldcopyright
- Copyright textfieldpredefined
- Predefined buttoncopyrightYear
- Copyright year textfieldnameLabel
- Name labelemailLabel
- E-mail labelcopyrightLabel
- Copyright labelcopyrightYearLabel
- Copyright year labelwarning
- Warning label