ilog.views.maps.export
Class IlvShapeExporter

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

public class IlvShapeExporter
extends Object
implements IlvMapExportManager.IlvMapExporter

A IlvMapExporter specialized in exporting shape files. This class is supposed to 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 IlvShapeExporter());
     exportDialog.setVisible(true);
   }
 }
 

Since:
JViews 7.5

Constructor Summary
IlvShapeExporter()
          Constructs a IlvShapeExporter
 
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.
 String getExportDirectory()
          Returns the directory where shape files will be written.
 void initExport(IlvMapLayer[] mapLayers)
          Prepare this exporter to export a collection of IlvMapFeature objects.
 boolean isConcatParentLayerName()
          Tells if this exporter concatenates parent layer name when creating filenames when exporting a layer.
 boolean isOverwriteFiles()
          Tells if this exporter is overwriting existing files.
 boolean isWriteDBF()
          Returns whether DBF file are written along with SHP files or not.
 void setConcatParentLayerName(boolean concatParentLayerName)
          Tells this exported if it should concatenate parent layer name when creating filenames when exporting a layer.
 void setExportDirectory(String exportDirectory)
          Sets the directory where shape files will be written.
 void setOverwriteFiles(boolean overwriteFiles)
          Tells this exporter if it should overwrite files.
 void setWriteDBF(boolean writeDBF)
          Sets whether DBF file are written along with SHP files or not.
 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

IlvShapeExporter

public IlvShapeExporter()
Constructs a IlvShapeExporter

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[] mapLayers)
Prepare this exporter to export a collection of IlvMapFeature objects.

Specified by:
initExport in interface IlvMapExportManager.IlvMapExporter
Parameters:
mapLayers - 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)

isConcatParentLayerName

public boolean isConcatParentLayerName()
Tells if this exporter concatenates parent layer name when creating filenames when exporting a layer.

Returns:
true if it concatenates and false otherwise.

setConcatParentLayerName

public void setConcatParentLayerName(boolean concatParentLayerName)
Tells this exported if it should concatenate parent layer name when creating filenames when exporting a layer.

Parameters:
concatParentLayerName - true if it should concatenate and false otherwise.

isOverwriteFiles

public boolean isOverwriteFiles()
Tells if this exporter is overwriting existing files.

Returns:
true if overwriting existing files and false otherwise.

setOverwriteFiles

public void setOverwriteFiles(boolean overwriteFiles)
Tells this exporter if it should overwrite files.

Parameters:
overwriteFiles - true to overwrite files, false otherwise.

getExportDirectory

public String getExportDirectory()
Returns the directory where shape files will be written.

Returns:
Returns the directory where shape files will be written.
Since:
JViews 7.5

setExportDirectory

public void setExportDirectory(String exportDirectory)
Sets the directory where shape files will be written.

Parameters:
exportDirectory - the directory where to write
Since:
JViews 7.5

isWriteDBF

public boolean isWriteDBF()
Returns whether DBF file are written along with SHP files or not.

Returns:
Returns whether DBF file are written along with SHP files or not.
Since:
JViews 7.5

setWriteDBF

public void setWriteDBF(boolean writeDBF)
Sets whether DBF file are written along with SHP files or not.

Parameters:
writeDBF - true to write DBF files.
Since:
JViews 7.5


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