From ad1b96133f83769b3a17654a6f2f692b85cbc46f Mon Sep 17 00:00:00 2001 From: Bruno JOFRET Date: Fri, 3 Aug 2012 12:15:06 +0200 Subject: [PATCH] [Delete] old waitbar bridge capabilities. Change-Id: I608ca31733b72e09c3a2bd0102a64aa7af099391 --- .../modules/gui/bridge/CallScilabBridge.java | 11 -- .../scilab/modules/gui/bridge/ScilabBridge.java | 59 -------- .../scilab/modules/gui/waitbar/ScilabWaitBar.java | 146 -------------------- .../modules/gui/waitbar/ScilabWaitBarBridge.java | 82 ----------- 4 files changed, 298 deletions(-) delete mode 100644 scilab/modules/gui/src/java/org/scilab/modules/gui/waitbar/ScilabWaitBar.java delete mode 100644 scilab/modules/gui/src/java/org/scilab/modules/gui/waitbar/ScilabWaitBarBridge.java diff --git a/scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/CallScilabBridge.java b/scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/CallScilabBridge.java index 1268456..39acb51 100644 --- a/scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/CallScilabBridge.java +++ b/scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/CallScilabBridge.java @@ -118,7 +118,6 @@ import org.scilab.modules.gui.utils.ScilabRelief; import org.scilab.modules.gui.utils.Size; import org.scilab.modules.gui.utils.UIElementMapper; import org.scilab.modules.gui.utils.WebBrowser; -import org.scilab.modules.gui.waitbar.ScilabWaitBar; import org.scilab.modules.gui.waitbar.WaitBar; import org.scilab.modules.gui.widget.Widget; import org.scilab.modules.gui.window.ScilabWindow; @@ -330,16 +329,6 @@ public class CallScilabBridge { } /** - * Create a new WaitBar in Scilab GUIs - * @return the ID of the WaitBar in the UIElementMapper - */ - // TODO REMOVE ME (NO MORE USED IN JNI) - public static int newWaitBar() { - WaitBar waitBar = ScilabWaitBar.createWaitBar(); - return UIElementMapper.add(waitBar); - } - - /** * Create a new PushButton in Scilab GUIs * @return the ID of the PushButton in the UIElementMapper */ diff --git a/scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/ScilabBridge.java b/scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/ScilabBridge.java index 869b8c5..6047b2a 100644 --- a/scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/ScilabBridge.java +++ b/scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/ScilabBridge.java @@ -114,9 +114,6 @@ import org.scilab.modules.gui.uitable.SimpleUiTable; import org.scilab.modules.gui.uitable.UiTable; import org.scilab.modules.gui.utils.Position; import org.scilab.modules.gui.utils.Size; -import org.scilab.modules.gui.waitbar.ScilabWaitBarBridge; -import org.scilab.modules.gui.waitbar.SimpleWaitBar; -import org.scilab.modules.gui.waitbar.WaitBar; import org.scilab.modules.gui.window.ScilabWindowBridge; import org.scilab.modules.gui.window.SimpleWindow; import org.scilab.modules.gui.window.Window; @@ -5090,62 +5087,6 @@ public class ScilabBridge { ScilabMessageBoxBridge.setParentForLocation(messageBox, parent); } - /******************/ - /* WaitBar Bridge */ - /******************/ - - /** - * Create a new WaitBar - * @return the created WaitBar - */ - public static SimpleWaitBar createWaitBar() { - return ScilabWaitBarBridge.createWaitBar(); - } - - /** - * Set the title of the WaitBar - * @param waitBar the WaitBar - * @param title the title to set - */ - public static void setTitle(WaitBar waitBar, String title) { - ScilabWaitBarBridge.setTitle(waitBar, title); - } - - /** - * Set the message of the WaitBar - * @param waitBar the WaitBar - * @param message the message to set - */ - public static void setMessage(WaitBar waitBar, String[] message) { - ScilabWaitBarBridge.setMessage(waitBar, message); - } - - /** - * Set the current value of the WaitBar - * @param waitBar the WaitBar - * @param value the value to set - */ - public static void setValue(WaitBar waitBar, int value) { - ScilabWaitBarBridge.setValue(waitBar, value); - }; - - /** - * Close the WaitBar - * @param waitBar the WaitBar - */ - public static void close(WaitBar waitBar) { - ScilabWaitBarBridge.close(waitBar); - } - - /** - * Indicates if the total execution time is known - * @param waitBar the WaitBar - * @param status true if the total progress time in unknown - */ - public static void setIndeterminateMode(WaitBar waitBar, boolean status) { - ScilabWaitBarBridge.setIndeterminateMode(waitBar, status); - } - /***********************/ /* Help Browser Bridge */ /***********************/ diff --git a/scilab/modules/gui/src/java/org/scilab/modules/gui/waitbar/ScilabWaitBar.java b/scilab/modules/gui/src/java/org/scilab/modules/gui/waitbar/ScilabWaitBar.java deleted file mode 100644 index b00044e..0000000 --- a/scilab/modules/gui/src/java/org/scilab/modules/gui/waitbar/ScilabWaitBar.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Vincent Couvert - * - * This file must be used under the terms of the CeCILL. - * This source file is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at - * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt - * - */ - -package org.scilab.modules.gui.waitbar; - -import org.scilab.modules.gui.bridge.ScilabBridge; -import org.scilab.modules.gui.uielement.ScilabUIElement; -import org.scilab.modules.gui.utils.Position; -import org.scilab.modules.gui.utils.Size; -import org.scilab.modules.gui.utils.UIElementMapper; - -/** - * WaitBars/ProgressBars used by Scilab - * @author Vincent COUVERT - */ -public class ScilabWaitBar extends ScilabUIElement implements WaitBar { - - private SimpleWaitBar component; - - /** - * Constructor - */ - protected ScilabWaitBar() { - component = ScilabBridge.createWaitBar(); - component.setElementId(UIElementMapper.add(this)); - } - - /** - * Creates a Scilab WaitBar - * @return the created WaitBar - */ - public static WaitBar createWaitBar() { - return new ScilabWaitBar(); - } - - /** - * Gets this Bridge component object - * @return this Bridge component object - */ - public SimpleWaitBar getAsSimpleWaitBar() { - return component; - } - - /** - * Set the title of the WaitBar - * @param title the title to set - */ - public void setTitle(String title) { - ScilabBridge.setTitle(this, title); - } - - /** - * Set the message of the WaitBar - * @param message the message to set - */ - public void setMessage(String[] message) { - ScilabBridge.setMessage(this, message); - } - - /** - * Set the current value of the WaitBar - * @param value the value to set - */ - public void setValue(int value) { - ScilabBridge.setValue(this, value); - }; - - /** - * Close the WaitBar - */ - public void close() { - ScilabBridge.close(this); - } - - /** - * Indicates if the total execution time is known - * @param status true if the total progress time in unknown - */ - public void setIndeterminateMode(boolean status) { - ScilabBridge.setIndeterminateMode(this, status); - } - - /** - * Should not be used, just here to implemeent org.scilab.modules.gui.UIElement#draw() - */ - public void draw() { - throw new UnsupportedOperationException(); - } - - /** - * Should not be used, just here to implemeent org.scilab.modules.gui.UIElement#getDims() - * @return nothing - */ - public Size getDims() { - throw new UnsupportedOperationException(); - } - - /** - * Should not be used, just here to implemeent org.scilab.modules.gui.UIElement#draw() - * @return nothing - */ - public Position getPosition() { - throw new UnsupportedOperationException(); - } - - /** - * Should not be used, just here to implemeent org.scilab.modules.gui.UIElement#draw() - * @return nothing - */ - public boolean isVisible() { - throw new UnsupportedOperationException(); - } - - /** - * Should not be used, just here to implemeent org.scilab.modules.gui.UIElement#draw() - * @param newSize is never used - */ - public void setDims(Size newSize) { - throw new UnsupportedOperationException(); - } - - /** - * Should not be used, just here to implemeent org.scilab.modules.gui.UIElement#draw() - * @param newPosition is never used - */ - public void setPosition(Position newPosition) { - throw new UnsupportedOperationException(); - } - - /** - * Should not be used, just here to implemeent org.scilab.modules.gui.UIElement#draw() - * @param newVisibleState is never used - */ - public void setVisible(boolean newVisibleState) { - throw new UnsupportedOperationException(); - } -} diff --git a/scilab/modules/gui/src/java/org/scilab/modules/gui/waitbar/ScilabWaitBarBridge.java b/scilab/modules/gui/src/java/org/scilab/modules/gui/waitbar/ScilabWaitBarBridge.java deleted file mode 100644 index 43dfa15..0000000 --- a/scilab/modules/gui/src/java/org/scilab/modules/gui/waitbar/ScilabWaitBarBridge.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008 - INRIA - Vincent Couvert - * - * This file must be used under the terms of the CeCILL. - * This source file is licensed as described in the file COPYING, which - * you should have received as part of this distribution. The terms - * are also available at - * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt - * - */ - -package org.scilab.modules.gui.waitbar; - -import org.scilab.modules.gui.bridge.waitbar.SwingScilabWaitBar; - -/** - * Bridge dedicated to Scilab Wait Bars - * @author Vincent COUVERT - */ -public class ScilabWaitBarBridge { - - /** - * Constructor - */ - protected ScilabWaitBarBridge() { - throw new UnsupportedOperationException(); /* Prevents calls from subclass */ - } - - /** - * Create a new WaitBar - * @return the created WaitBar - */ - public static SimpleWaitBar createWaitBar() { - return new SwingScilabWaitBar(); - } - - /** - * Set the title of the WaitBar - * @param waitBar the WaitBar - * @param title the title to set - */ - public static void setTitle(WaitBar waitBar, String title) { - waitBar.getAsSimpleWaitBar().setTitle(title); - } - - /** - * Set the message of the WaitBar - * @param waitBar the WaitBar - * @param message the message to set - */ - public static void setMessage(WaitBar waitBar, String[] message) { - waitBar.getAsSimpleWaitBar().setMessage(message); - } - - /** - * Set the current value of the WaitBar - * @param waitBar the WaitBar - * @param value the value to set - */ - public static void setValue(WaitBar waitBar, int value) { - waitBar.getAsSimpleWaitBar().setValue(value); - }; - - /** - * Close the WaitBar - * @param waitBar the WaitBar - */ - public static void close(WaitBar waitBar) { - waitBar.getAsSimpleWaitBar().close(); - } - - /** - * Indicates if the total execution time is known - * @param waitBar the WaitBar - * @param status true if the total progress time in unknown - */ - public static void setIndeterminateMode(WaitBar waitBar, boolean status) { - waitBar.getAsSimpleWaitBar().setIndeterminateMode(status); - } - -} -- 1.7.9.5