*/
public class ExportImageMapAction extends AppAction{
+ /**
+ * The file extension given to a this object when it is saved on a disk
+ */
+ public static final String IMGMAP_EXTENSION = ".imgmap";
+
public ExportImageMapAction(ActionManager m) {
super(m);
}
Exporter exporter = new Exporter(image);
exporter.setEffect(result.effect);
exporter.setHtmlFile(result.html);
+
+ // Taking html file name and making the same as filename of imagemap
int dotIndex = result.html.indexOf('.');
String zipFile = result.html.substring(0, dotIndex);
- exporter.setZipFile(zipFile+".zip");
+ exporter.setZipFile(zipFile+IMGMAP_EXTENSION);
+
exporter.setImageFile(result.image);
exporter.setObjectLink(result.link);
exporter.setExportShape(result.shape);
if (dialog == null) {
dialog = new FileDialog(window.getShell(), SWT.OPEN | SWT.SHEET);
dialog.setText(property("OpenAction.dialog.text"));
- dialog.setFilterExtensions(getFilters());
+ //dialog.setFilterExtensions(getFilters());
dialog.setFilterNames(getFilterNames());
}
}
}
public void exportToFile(ZipOutputStream o) throws IOException {
- DataOutputStream out = new DataOutputStream(
- new BufferedOutputStream(o));
- System.out.println("Exxporting content : "+export());
+ DataOutputStream out = new DataOutputStream(new BufferedOutputStream(o));
out.writeBytes(export());
// Flush
out.flush();