public class IlvKMLExporter extends Object implements IlvMapExportManager.IlvMapExporter
IlvMapExporter specialized in exporting KML files. This
class should be used with the IlvMapExportManager and
the IlvMapExportDialog classes.
exportBtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
IlvMapExportDialog exportDialog = new IlvMapExportDialog(view);
exportDialog.registerVectorExporter(new IlvKMLExporter());
exportDialog.setVisible(true);
}
}
You can also use a GUI-less approach:
IlvKMLExporter kmlExport = new IlvKMLExporter();
kmlExport.setFileName("output.kml");
IlvMapExportManager exportManager = new IlvMapExportManager();
exportManager.setVectorialExporter(exporter);
exportManager.exportMapLayers(mapLayers);
| Constructor and Description |
|---|
IlvKMLExporter()
Constructs an
IlvKMLExporter. |
| Modifier and Type | Method and Description |
|---|---|
void |
exportFeature(IlvMapFeature feature,
IlvMapLayer mapLayer)
Export one
IlvMapFeature |
void |
finishExport()
This method is called by the
IlvMapExportManager when all features are exported. |
String |
getDialogTitle()
Returns the parameter settings dialog box title.
|
String |
getSettingsLabel()
Returns the label summarizing parameter settings for this exporter.
|
void |
initExport(IlvMapLayer[] ml)
Prepare this exporter to export a collection of
IlvMapFeature objects. |
void |
setFileName(String fName)
Sets the exporter output file name.
|
void |
showConfigurationDialog(JDialog parent)
Shows a configuration dialog for this exporter
|
String |
toString()
Returns A String describing this exporter (displayable in a combo box in the maps exporter GUI)
|
public String toString()
toString in interface IlvMapExportManager.IlvMapExportertoString in class ObjectIlvMapExportManager.IlvMapExporter.toString()public void exportFeature(IlvMapFeature feature, IlvMapLayer mapLayer)
IlvMapFeatureexportFeature in interface IlvMapExportManager.IlvMapExporterfeature - the IlvMapFeature to export.mapLayer - the IlvMapLayer containing the IlvMapFeature in parameterIlvMapExportManager.IlvMapExporter.exportFeature(ilog.views.maps.IlvMapFeature,
ilog.views.maps.beans.IlvMapLayer)public void initExport(IlvMapLayer[] ml)
IlvMapFeature objects.initExport in interface IlvMapExportManager.IlvMapExporterml - an array of IlvMapLayer whose objects are going to be exported through the
exportFeature method.IlvMapExportManager.IlvMapExporter.initExport(ilog.views.maps.beans.IlvMapLayer[])public void finishExport()
IlvMapExportManager when all features are exported. This method could close
opened file input streams, for instance.finishExport in interface IlvMapExportManager.IlvMapExporterIlvMapExportManager.IlvMapExporter.finishExport()public void showConfigurationDialog(JDialog parent)
showConfigurationDialog in interface IlvMapExportManager.IlvMapExporterparent - the JDialog that should be used as a parent when displaying a sub dialogIlvMapExportManager.IlvMapExporter.showConfigurationDialog(javax.swing.JDialog)public void setFileName(String fName)
fName - The KML output file name.public String getDialogTitle()
getDialogTitle in interface IlvMapExportManager.IlvMapExporterpublic String getSettingsLabel()
getSettingsLabel in interface IlvMapExportManager.IlvMapExporter© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.