/*
* Copyright (C) 2001, 2002 Robert MacGrogan
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
* $Archive: SourceJammer$
* $FileName: ListArchivesAction.java$
* $FileID: 4085$
*
* Last change:
* $AuthorName: Rob MacGrogan$
* $Date: 6/24/03 12:53 AM$
* $Comment: Moved message box/error dialog methods to MessageBoxUtil.$
*/
package org.sourcejammer.client.gui.action;
import java.awt.event.ActionEvent;
import javax.swing.*;
import org.sourcejammer.client.gui.CommandCentral;
import org.sourcejammer.client.gui.MessageBoxUtil;
import org.sourcejammer.client.gui.dialog.ListArchivesDialog;
import org.sourcejammer.client.gui.icons.IconBank;
import org.sourcejammer.client.gui.conf.ArchiveConf;
import org.sourcejammer.client.DisplayTextLibrary;
/**
* Title: $FileName: ListArchivesAction.java$
* @version $VerNum: 4$
* @author $AuthorName: Rob MacGrogan$<br><br>
*
* $Description: $<br>
* $KeyWordsOff: $<br>
*/
public class ListArchivesAction extends AbstractAction {
public ListArchivesAction() {
super(DisplayTextLibrary.getInstance().getDisplayText(DisplayTextLibrary.ACT_MAINTAIN_CONNECTIONS),
IconBank.getInstance().getIcon(IconBank.BLANK_TOOL));
}
public ListArchivesAction(String s){
super(s);
}
public void actionPerformed(ActionEvent ev) {
try {
JFrame root = CommandCentral.getInstance().getRootAppFrame();
ListArchivesDialog dialog = new ListArchivesDialog(root, ArchiveConf.getAllArchives());
dialog.showDialog(root);
}
catch(Exception ex){
MessageBoxUtil.displayErrorMessage(ex.getMessage(), true);
}
}
}
|