/*
* 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: MakeLabelProcess.java$
* $FileID: 4125$
*
* Last change:
* $AuthorName: Rob MacGrogan$
* $Date: 6/24/03 12:52 AM$
* $Comment: Moved message box/error dialog methods to MessageBoxUtil.$
*/
package org.sourcejammer.client.gui.process;
import java.awt.Cursor;
import org.sourcejammer.client.gui.CommandCentral;
import org.sourcejammer.client.gui.MessageBoxUtil;
import org.sourcejammer.client.gui.action.ActionCentral;
import org.sourcejammer.client.gui.process.info.LabelProcessInfo;
/**
* Title: $FileName: MakeLabelProcess.java$
* @version $VerNum: 4$
* @author $AuthorName: Rob MacGrogan$<br><br>
*
* $Description: A process for making labeled versions on the server.$<br>
* $KeyWordsOff: $<br>
*/
public class MakeLabelProcess extends AbstractProcess {
public MakeLabelProcess(){}
/**
* @see org.sourcejammer.client.gui.process.AbstractProcess#process(Object)
*/
public void process(Object info) {
CommandCentral central = CommandCentral.getInstance();
try {
if (info instanceof LabelProcessInfo){
central.getRootAppFrame().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
LabelProcessInfo oInfo = (LabelProcessInfo)info;
central.makeLabel(oInfo.getParentID(), oInfo.getName(), oInfo.getDescription());
ActionCentral.getInstance().fireActionInvokeLater(ActionCentral.act_REFRESH_PROJECT);
}
}
catch (Exception ex){
ex.printStackTrace();
MessageBoxUtil.displayErrorMessage(ex.getMessage());
}
finally {
CommandCentral.getInstance().getRootAppFrame().setCursor(Cursor.getDefaultCursor());
}
}
}
|