Java tutorial
/* * $Id: RefreshAction.java,v 1.1 2004/11/28 12:17:00 amunoz Exp $ * * Copyright (C) 2003 Antonio G. Muoz Conejo <amunoz@tomby.homelinux.org> * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ package tk.tomby.tedit.plugins.explorer.actions; import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import tk.tomby.tedit.plugins.explorer.Explorer; import tk.tomby.tedit.services.PluginManager; /** * DOCUMENT ME! * * @author $Author: amunoz $ * @version $Revision: 1.1 $ */ public class RefreshAction extends AbstractAction { //~ Static fields/initializers ***************************************************************** /** DOCUMENT ME! */ private static Log log = LogFactory.getLog(RefreshAction.class); //~ Constructors ******************************************************************************* /** * Creates a new RefreshAction object. */ public RefreshAction() { super("refresh"); } //~ Methods ************************************************************************************ /** * DOCUMENT ME! * * @param e DOCUMENT ME! */ public void actionPerformed(ActionEvent e) { if (log.isDebugEnabled()) { log.debug("Refreshing directory"); } Explorer explorer = (Explorer) PluginManager.getPlugin("explorer"); explorer.refresh(); } }