MaintainArchiveUsersAction.java :  » Source-Control » sourcejammer » org » sourcejammer » client » gui » action » Java Open Source

Java Open Source » Source Control » sourcejammer 
sourcejammer » org » sourcejammer » client » gui » action » MaintainArchiveUsersAction.java
/*
 *  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: MaintainArchiveUsersAction.java$
 * $FileID: 4042$
 *
 * 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 org.sourcejammer.client.DisplayTextLibrary;
import java.awt.event.ActionEvent;
import javax.swing.*;
import org.sourcejammer.project.view.UserInfo;
import org.sourcejammer.client.gui.dialog.ArchiveUsersDialog;
import org.sourcejammer.client.gui.CommandCentral;
import org.sourcejammer.client.gui.MessageBoxUtil;

/**
 * Title:    $FileName: MaintainArchiveUsersAction.java$
 * @version $VerNum: 4$
 * @author $AuthorName: Rob MacGrogan$<br><br>
 * 
 * $Description: $<br>
 * $KeyWordsOff: $<br>
 */
public class MaintainArchiveUsersAction extends AbstractAction {

  public MaintainArchiveUsersAction() {
    super(DisplayTextLibrary.getInstance().getDisplayText(DisplayTextLibrary.ACT_MAINT_ARCH_USERS));
  }

  public void actionPerformed(ActionEvent ev) {
    try {
      CommandCentral oCommand = CommandCentral.getInstance();
      UserInfo[] users = oCommand.getCompleteUserList();
      UserInfo[] controllers = oCommand.getArchiveControllerList();
      UserInfo[] archiveUsers = oCommand.getArchiveUserList();

      ArchiveUsersDialog dialog = new ArchiveUsersDialog(oCommand.getRootAppFrame(),
              users, controllers, archiveUsers);
      dialog.showDialog(oCommand.getRootAppFrame());
    }
    catch (Throwable thr){
      MessageBoxUtil.displayErrorMessage(thr.getMessage(), true);
    }

  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.