public class GpxExporter extends FileExporter implements GpxConstants
GpxConstants.ColorFormat
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
EXTENSION_ABBREVIATIONS, FIX_VALUES, GARMIN_COLORS, GPX_CMT, GPX_DESC, GPX_NAME, GPX_PREFIX, GPX_SRC, META_AUTHOR_EMAIL, META_AUTHOR_LINK, META_AUTHOR_NAME, META_BOUNDS, META_COPYRIGHT_AUTHOR, META_COPYRIGHT_LICENSE, META_COPYRIGHT_YEAR, META_DESC, 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, RTKLIB_AGE, RTKLIB_Q, RTKLIB_RATIO, RTKLIB_SDE, RTKLIB_SDEU, RTKLIB_SDN, RTKLIB_SDNE, RTKLIB_SDU, RTKLIB_SDUN, WPT_KEYS, XML_URI_EXTENSIONS_DRAWING, XML_URI_EXTENSIONS_GARMIN, XML_URI_EXTENSIONS_JOSM, XML_URI_XSD, XML_XSD_EXTENSIONS_DRAWING, XML_XSD_EXTENSIONS_GARMIN, XML_XSD_EXTENSIONS_JOSM
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.
|
private void |
exportData(java.io.File file,
Layer layer,
boolean quiet) |
void |
exportDataQuiet(java.io.File file,
Layer layer)
Execute the data export without prompting the user.
|
private static GpxData |
getGpxData(Layer layer,
java.io.File file) |
activeOrEditLayerChanged, isCanceled, isEnabled, setCanceled, setEnabled
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getExtensionAbbreviations, getGarminColors
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 errorpublic void exportDataQuiet(java.io.File file, Layer layer) throws java.io.IOException
FileExporter
exportDataQuiet
in class FileExporter
file
- target filelayer
- the layer to exportjava.io.IOException
- in case of an IO errorprivate void exportData(java.io.File file, Layer layer, boolean quiet) throws java.io.IOException
java.io.IOException
private static GpxData getGpxData(Layer layer, java.io.File file)
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)
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