ilog.views.maps.export
Class IlvKMLExporter

java.lang.Object
  extended by ilog.views.maps.export.IlvKMLExporter
All Implemented Interfaces:
IlvMapExportManager.IlvMapExporter

public class IlvKMLExporter
extends Object
implements IlvMapExportManager.IlvMapExporter

An 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);
 

Since:
JViews 8.0

Constructor Summary
IlvKMLExporter()
          Constructs an IlvKMLExporter.
 
Method Summary
 void exportFeature(IlvMapFeature feature, IlvMapLayer mapLayer)
          Export one IlvMapFeature
 void finishExport()
          This method is called by the IlvMapExportManager when all features are exported.
 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)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvKMLExporter

public IlvKMLExporter()
Constructs an IlvKMLExporter.

Method Detail

toString

public String toString()
Returns A String describing this exporter (displayable in a combo box in the maps exporter GUI)

Specified by:
toString in interface IlvMapExportManager.IlvMapExporter
Overrides:
toString in class Object
Returns:
A String describing this exporter (displayable in a combo box in the maps exporter GUI)
See Also:
IlvMapExportManager.IlvMapExporter.toString()

exportFeature

public void exportFeature(IlvMapFeature feature,
                          IlvMapLayer mapLayer)
Export one IlvMapFeature

Specified by:
exportFeature in interface IlvMapExportManager.IlvMapExporter
Parameters:
feature - the IlvMapFeature to export.
mapLayer - the IlvMapLayer containing the IlvMapFeature in parameter
See Also:
IlvMapExportManager.IlvMapExporter.exportFeature(ilog.views.maps.IlvMapFeature, ilog.views.maps.beans.IlvMapLayer)

initExport

public void initExport(IlvMapLayer[] ml)
Prepare this exporter to export a collection of IlvMapFeature objects.

Specified by:
initExport in interface IlvMapExportManager.IlvMapExporter
Parameters:
ml - an array of IlvMapLayer whose objects are going to be exported through the exportFeature method.
See Also:
IlvMapExportManager.IlvMapExporter.initExport(ilog.views.maps.beans.IlvMapLayer[])

finishExport

public void finishExport()
This method is called by the IlvMapExportManager when all features are exported. This method could close opened file input streams, for instance.

Specified by:
finishExport in interface IlvMapExportManager.IlvMapExporter
See Also:
IlvMapExportManager.IlvMapExporter.finishExport()

showConfigurationDialog

public void showConfigurationDialog(JDialog parent)
Shows a configuration dialog for this exporter

Specified by:
showConfigurationDialog in interface IlvMapExportManager.IlvMapExporter
Parameters:
parent - the JDialog that should be used as a parent when displaying a sub dialog
See Also:
IlvMapExportManager.IlvMapExporter.showConfigurationDialog(javax.swing.JDialog)

setFileName

public void setFileName(String fName)
Sets the exporter output file name.

Parameters:
fName - The KML output file name.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.