Author: Michael R. Crusoe <crusoe@debian.org>
Description: Drop JNLP parts
Forwarded: not-needed
Debian isn't distributing this as an applet.
--- jaligner.orig/src/jaligner/ui/filechooser/FileChooserJNLP.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-
-package jaligner.ui.filechooser;
-
-import java.io.InputStream;
-import java.util.logging.Logger;
-
-import javax.jnlp.FileContents;
-import javax.jnlp.FileOpenService;
-import javax.jnlp.FileSaveService;
-import javax.jnlp.ServiceManager;
-
-/**
- * Opens and saves files.
- * 
- * @author Ahmed Moustafa
- */
-
-public class FileChooserJNLP extends FileChooser {
-    private static final Logger logger = Logger.getLogger(FileChooserJNLP.class.getName());
-    
-	/**
-	 * Shows a dialog to select a file.
-	 * 
-	 * @return InputStream
-	 * @throws FileChooserException
-	 */
-	public NamedInputStream open() throws FileChooserException {
-		try {
-		    FileOpenService fos = (FileOpenService) ServiceManager.lookup(FileOpenService.class.getName());
-			FileContents fc = null;
-			if ((fc = fos.openFileDialog(getUserDirectory(), null)) != null) {
-			    logger.info("Loaded: " + fc.getName());
-				return new NamedInputStream(fc.getName(), fc.getInputStream());
-			} else {
-				return null;
-			}
-		} catch (Exception e) {
-		    String message = "Failed open: " + e.getMessage();
-		    logger.warning(message);
-		    throw new FileChooserException(message);
-		}
-	}
-
-	/**
-	 * Saves an input stream to a file.
-	 * 
-	 * @param is
-	 * @param fileName
-	 * @return Boolean
-	 * @throws FileChooserException
-	 */
-	public boolean save(InputStream is, String fileName) throws FileChooserException {
-		try {
-		    FileSaveService fss = (FileSaveService) ServiceManager.lookup(FileSaveService.class.getName());
-		    FileContents fc = fss.saveFileDialog(getUserDirectory(), null, is, fileName);
-		    if (fc != null) {
-		        logger.info("Saved: " + fc.getName());
-		        return true;
-		    } else {
-		        return false;
-		    }
-		} catch (Exception e) {
-		    String message = "Failed save: " + e.getMessage();
-		    logger.warning(message);
-		    throw new FileChooserException(message);
-		}
-	} 
-}
\ No newline at end of file
--- jaligner.orig/src/jaligner/ui/filechooser/FileChooserTrusted.java
+++ jaligner/src/jaligner/ui/filechooser/FileChooserTrusted.java
@@ -33,7 +33,7 @@
  */
 
 public class FileChooserTrusted extends FileChooser {
-    private static final Logger logger = Logger.getLogger(FileChooserJNLP.class.getName());
+    private static final Logger logger = Logger.getLogger(FileChooserTrusted.class.getName());
     
 	/**
 	 * Shows a dialog to select a file.
@@ -99,4 +99,4 @@
 		    throw new FileChooserException(message);
 		}
 	}
-}
\ No newline at end of file
+}
--- jaligner.orig/src/jaligner/ui/clipboard/ClipboardHandlerFactory.java
+++ jaligner/src/jaligner/ui/clipboard/ClipboardHandlerFactory.java
@@ -43,12 +43,8 @@
      */
     public static ClipboardHandler getClipboardHandler( ) {
     	if (instance == null) {
-    		 if (Commons.isJnlp()) {
-    		 	instance = new ClipboardHandlerJNLP();
-    		 } else {
-    		 	instance = new ClipboardHandlerAWT();
-    		 }
+    		 instance = new ClipboardHandlerAWT();
     	}
     	return instance;
     }
-}
\ No newline at end of file
+}
--- jaligner.orig/src/jaligner/ui/clipboard/ClipboardHandlerJNLP.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-
-package jaligner.ui.clipboard;
-
-import java.awt.datatransfer.DataFlavor;
-import java.awt.datatransfer.StringSelection;
-import java.awt.datatransfer.Transferable;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.jnlp.ClipboardService;
-import javax.jnlp.ServiceManager;
-
-/**
- * Sets and gets the contents of the system clipboard.  
- * 
- * @author Ahmed Moustafa
- */
-
-public class ClipboardHandlerJNLP implements ClipboardHandler {
-	private static Logger logger = Logger.getLogger(ClipboardHandlerJNLP.class.getName());
-	
-	/**
-	 * Gets the contents of the system clipboard
-	 * 
-	 * @return The text system clipboad contents 
-	 */
-	public String getContents() {
-		String contents = null;
-		try {
-			ClipboardService cs = (ClipboardService)ServiceManager.lookup(ClipboardService.class.getName());
-			Transferable data = cs.getContents();
-			if (data != null && data.isDataFlavorSupported(DataFlavor.stringFlavor)) {
-				contents = ((String)(data.getTransferData(DataFlavor.stringFlavor)));
-			}
-		} catch (Exception e) {
-			logger.log(Level.WARNING, "Failed getting the clipboard contents: " + e.getMessage(), e );
-		}
-		return contents;
-	}
-
-	/**
-	 * Sets the contents of the system clipboard
-	 * 
-	 * @param s clipboard contents to set
-	 */
-	public void setContents(String s) {
-		try {
-			ClipboardService cs = (ClipboardService)ServiceManager.lookup(ClipboardService.class.getName());
-			cs.setContents(new StringSelection(s));
-		} catch (Exception e) {
-			logger.log(Level.WARNING, "Failed setting the clipboard contents: " + e.getMessage(), e );
-		}
-	}
-}
\ No newline at end of file
--- jaligner.orig/src/jaligner/ui/filechooser/FileChooserFactory.java
+++ jaligner/src/jaligner/ui/filechooser/FileChooserFactory.java
@@ -43,12 +43,8 @@
      */
     public static FileChooser getFileChooser( ) {
     	if (instance == null) {
-    		 if (Commons.isJnlp()) {
-    		 	instance = new FileChooserJNLP();
-    		 } else {
-    		 	instance = new FileChooserTrusted();
-    		 }
+    	    instance = new FileChooserTrusted();
     	}
     	return instance;
     }
-}
\ No newline at end of file
+}
