SaveProgressMonitor.java from PovClipse at Krugle
Show SaveProgressMonitor.java syntax highlighted
/* PovClipse - Eclipse plugin for editing and rendering Povray sceene files.
* Copyright (C) 2006-2007 Wolfgang Moestl wmoestl@web.de
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
package com.wm.povclipse.actionsets.render;
import org.eclipse.core.runtime.IProgressMonitor;
/**
* <p>Monitor used for finishing indication.</p>
* <p>Use the <code>isFinished()</code> method to query
* whether the monitored task has been completed or is still running.
* @author Wolfgang Möstl
*/
public class SaveProgressMonitor implements IProgressMonitor {
private boolean isFinished = false;
private boolean canceled = false;
/**
* Constructor.
*/
public SaveProgressMonitor() {
isFinished = false;
}
/**
* @see org.eclipse.core.runtime.IProgressMonitor#beginTask(java.lang.String, int)
*/
public void beginTask(String name, int totalWork) {
isFinished = false;
}
/**
* @see org.eclipse.core.runtime.IProgressMonitor#done()
*/
public void done() {
isFinished = true;
}
/**
* Does nothing.
* @see org.eclipse.core.runtime.IProgressMonitor#internalWorked(double)
*/
public void internalWorked(double work) {
// nothing to do
}
/**
* @see org.eclipse.core.runtime.IProgressMonitor#isCanceled()
*/
public boolean isCanceled() {
return canceled;
}
/**
* @see org.eclipse.core.runtime.IProgressMonitor#setCanceled(boolean)
*/
public void setCanceled(boolean value) {
canceled = value;
}
/**
* Does nothing.
* @see org.eclipse.core.runtime.IProgressMonitor#setTaskName(java.lang.String)
*/
public void setTaskName(String name) {
// nothing to do
}
/**
* Does nothing.
* @see org.eclipse.core.runtime.IProgressMonitor#subTask(java.lang.String)
*/
public void subTask(String name) {
// nothing to do
}
/**
* Does nothing.
* @see org.eclipse.core.runtime.IProgressMonitor#worked(int)
*/
public void worked(int work) {
// nothing to do
}
/**
* @return <code>true</code> if the monitored taks has been completed,
* <code>false</code> if it still running.
*/
public boolean isFinished() {
return isFinished;
}
}
See more files for this project here