All pastes #497196 Raw Edit

Stuff

public text v1 · immutable
·published 2007-05-19 18:07 UTC
rendered paste body
/*   **********************************************************************  **
 **   Copyright notice                                                       **
 **                                                                          **
 **   (c) 2005-2006 RSSOwl Development Team                                  **
 **   http://www.rssowl.org/                                                 **
 **                                                                          **
 **   All rights reserved                                                    **
 **                                                                          **
 **   This program and the accompanying materials are made available under   **
 **   the terms of the Eclipse Public License v1.0 which accompanies this    **
 **   distribution, and is available at:                                     **
 **   http://www.rssowl.org/legal/epl-v10.html                               **
 **                                                                          **
 **   A copy is found in the file epl-v10.html and important notices to the  **
 **   license from the team is found in the textfile LICENSE.txt distributed **
 **   in this package.                                                       **
 **                                                                          **
 **   This copyright notice MUST APPEAR in all copies of the file!           **
 **                                                                          **
 **   Contributors:                                                          **
 **     RSSOwl Development Team - initial API and implementation             **
 **                                                                          **
 **  **********************************************************************  */

package org.rssowl.core.util;

import org.eclipse.core.runtime.IProgressMonitor;

public abstract class CallbackMonitor implements IProgressMonitor {
  private final IProgressMonitor fMonitor;

  /**
   * @param monitor
   */
  public CallbackMonitor(IProgressMonitor monitor) {
    fMonitor = monitor;
  }

  /**
   *
   */
  public abstract void longOperationStarting();

  /*
   * @see org.eclipse.core.runtime.IProgressMonitor#beginTask(java.lang.String,
   * int)
   */
  public void beginTask(String name, int totalWork) {
    fMonitor.beginTask(name, totalWork);
  }

  /*
   * @see org.eclipse.core.runtime.IProgressMonitor#done()
   */
  public void done() {
    fMonitor.done();
  }

  /*
   * @see org.eclipse.core.runtime.IProgressMonitor#internalWorked(double)
   */
  public void internalWorked(double work) {
    fMonitor.internalWorked(work);
  }

  /*
   * @see org.eclipse.core.runtime.IProgressMonitor#isCanceled()
   */
  public boolean isCanceled() {
    return fMonitor.isCanceled();
  }

  /*
   * @see org.eclipse.core.runtime.IProgressMonitor#setCanceled(boolean)
   */
  public void setCanceled(boolean value) {
    fMonitor.setCanceled(value);
  }

  /*
   * @see org.eclipse.core.runtime.IProgressMonitor#setTaskName(java.lang.String)
   */
  public void setTaskName(String name) {
    fMonitor.setTaskName(name);
  }

  /*
   * @see org.eclipse.core.runtime.IProgressMonitor#subTask(java.lang.String)
   */
  public void subTask(String name) {
    fMonitor.subTask(name);
  }

  /*
   * @see org.eclipse.core.runtime.IProgressMonitor#worked(int)
   */
  public void worked(int work) {
    fMonitor.worked(work);
  }
}