Author: tchemit Date: 2008-02-11 14:52:27 +0000 (Mon, 11 Feb 2008) New Revision: 810 Removed: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/DeleteAttachmentAction.java Log: action inutile, pas de suppression d'attachment possible Deleted: trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/DeleteAttachmentAction.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/DeleteAttachmentAction.java 2008-02-11 14:51:49 UTC (rev 809) +++ trunk/simexplorer-is/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/DeleteAttachmentAction.java 2008-02-11 14:52:27 UTC (rev 810) @@ -1,77 +0,0 @@ -/* -* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin, -* Tony Chemit, Gabriel Landais -* -* 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 fr.cemagref.simexplorer.is.ui.swing.actions; - -import fr.cemagref.simexplorer.is.attachment.Attachment; -import fr.cemagref.simexplorer.is.ui.swing.actions.util.DeleteAbstractAction; -import fr.cemagref.simexplorer.is.ui.swing.model.DetailTabModel; -import fr.cemagref.simexplorer.is.ui.SimExplorerRuntimeException; - -import java.awt.event.ActionEvent; - -/** - * Action pour downloader un résultat ou une librairie - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "deleteAttachment", - name = "simexplorer.action.deleteAttachment", - shortDescription = "simexplorer.action.deleteAttachment.tooltip", - longDescription = "simexplorer.action.deleteAttachment.help", - smallIcon = "action/delete.png", - mnemonic = 'x', - hideActionText = true -) -public class DeleteAttachmentAction extends DeleteAbstractAction { - - protected Attachment attachment; - private static final long serialVersionUID = 7535647131305304738L; - - @Override - protected String getDeleteMessage() { - return attachment.toString(); - } - - public DeleteAttachmentAction(String name) { - super(name); - } - - @Override - protected boolean beforeAction(ActionEvent e) throws Exception { - return super.beforeAction(e) && attachment != null; - } - - @Override - protected void initModel(DetailTabModel model) { - super.initModel(model); - attachment = model.getSelectedAttachment(); - } - - @Override - protected void doAction(ActionEvent e) throws Exception { - super.doAction(e); - } - - @Override - protected void clear() { - super.clear(); - attachment = null; - } -} \ No newline at end of file
participants (1)
-
tchemit@users.labs.libre-entreprise.org