2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2008 - INRIA - Vincent Couvert
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13 package org.scilab.modules.gui.waitbar;
15 import org.scilab.modules.gui.bridge.waitbar.SwingScilabWaitBar;
18 * Bridge dedicated to Scilab Wait Bars
19 * @author Vincent COUVERT
21 public class ScilabWaitBarBridge {
26 protected ScilabWaitBarBridge() {
27 throw new UnsupportedOperationException(); /* Prevents calls from subclass */
31 * Create a new WaitBar
32 * @return the created WaitBar
34 public static SimpleWaitBar createWaitBar() {
35 return new SwingScilabWaitBar();
39 * Set the title of the WaitBar
40 * @param waitBar the WaitBar
41 * @param title the title to set
43 public static void setTitle(WaitBar waitBar, String title) {
44 waitBar.getAsSimpleWaitBar().setTitle(title);
48 * Set the message of the WaitBar
49 * @param waitBar the WaitBar
50 * @param message the message to set
52 public static void setMessage(WaitBar waitBar, String[] message) {
53 waitBar.getAsSimpleWaitBar().setMessage(message);
57 * Set the current value of the WaitBar
58 * @param waitBar the WaitBar
59 * @param value the value to set
61 public static void setValue(WaitBar waitBar, int value) {
62 waitBar.getAsSimpleWaitBar().setValue(value);
67 * @param waitBar the WaitBar
69 public static void close(WaitBar waitBar) {
70 waitBar.getAsSimpleWaitBar().close();
74 * Indicates if the total execution time is known
75 * @param waitBar the WaitBar
76 * @param status true if the total progress time in unknown
78 public static void setIndeterminateMode(WaitBar waitBar, boolean status) {
79 waitBar.getAsSimpleWaitBar().setIndeterminateMode(status);