Hello!

To see the file structure, click on "tree".

Note that updates take place every 10 minutes, commits may not be seen immediately.
Saving as a zip file functionality. Done by Nikhil.
authorlingutln <lingutln@localhost>
Mon, 5 Mar 2012 21:08:08 +0000 (21:08 +0000)
committerlingutln <lingutln@localhost>
Mon, 5 Mar 2012 21:08:08 +0000 (21:08 +0000)
svn path=/; revision=306

Annotation/src/ie/dcu/apps/ist/actions/ExportImageMapAction.java
Annotation/src/ie/dcu/apps/ist/actions/OpenAction.java
Annotation/src/ie/dcu/apps/ist/export/imagemap/ImageMap.java

index 196d8697447201052baab40b0cda0957b70e98b3..191e737fe027d2f9b27b7edd60f598e50db45cb0 100644 (file)
@@ -20,6 +20,11 @@ import org.eclipse.swt.program.Program;
  */
 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);
        }
@@ -44,9 +49,12 @@ public class ExportImageMapAction extends AppAction{
                                        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);
index 823f1766b319385943b47824e8d236d1a7380655..5c956b668901e56d46dd7a6c76d22d73558b878f 100644 (file)
@@ -83,7 +83,7 @@ public class OpenAction extends AppAction {
                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());
                }
        }
index 2a3e1c420eaff6d5e753c2c475c57b90691fab77..f09ba48072aff8f864c890558cc835bb9aa78dd4 100644 (file)
@@ -200,9 +200,7 @@ public class ImageMap {
        }
        
        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();