    001package org.cpsolver.ifs.util;
    002
    003/**
    004 * Progress bar listener.
    005 *
    006 * @author  Tomáš Müller
    007 * @version IFS 1.3 (Iterative Forward Search)<br>
    008 *          Copyright (C) 2006 - 2014 Tomáš Müller<br>
    009 *          <a href="mailto:muller@unitime.org">muller@unitime.org</a><br>
    010 *          <a href="http://muller.unitime.org">http://muller.unitime.org</a><br>
    011 * <br>
    012 *          This library is free software; you can redistribute it and/or modify
    013 *          it under the terms of the GNU Lesser General Public License as
    014 *          published by the Free Software Foundation; either version 3 of the
    015 *          License, or (at your option) any later version. <br>
    016 * <br>
    017 *          This library is distributed in the hope that it will be useful, but
    018 *          WITHOUT ANY WARRANTY; without even the implied warranty of
    019 *          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    020 *          Lesser General Public License for more details. <br>
    021 * <br>
    022 *          You should have received a copy of the GNU Lesser General Public
    023 *          License along with this library; if not see
    024 *          <a href='http://www.gnu.org/licenses/'>http://www.gnu.org/licenses/</a>.
    025 */
    026public interface ProgressListener {
    027    /**
    028     * Progress status is changed
    029     *
    030     * @param status
    031     *            current status name
    032     */
    033    public void statusChanged(String status);
    034
    035    /**
    036     * Progress phase is changed
    037     *
    038     * @param phase
    039     *            current phase name
    040     */
    041    public void phaseChanged(String phase);
    042
    043    /**
    044     * Progress bar is changed
    045     *
    046     * @param currentProgress
    047     *            current progress
    048     * @param maxProgress
    049     *            maximum progress in this phase
    050     */
    051    public void progressChanged(long currentProgress, long maxProgress);
    052
    053    /** Progress is saved */
    054    public void progressSaved();
    055
    056    /** Progress is restored */
    057    public void progressRestored();
    058
    059    /** Progress message is printed
    060     * @param message a message to print
    061     **/
    062    public void progressMessagePrinted(Progress.Message message);
    063}