2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2007 - INRIA - Vincent Couvert
4 * Copyright (C) 2007 - INRIA - Bruno Jofret
5 * Copyright (C) 2010 - DIGITEO - Vincent COUVERT
7 * This file must be used under the terms of the CeCILL.
8 * This source file is licensed as described in the file COPYING, which
9 * you should have received as part of this distribution. The terms
10 * are also available at
11 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
16 package org.scilab.modules.gui.bridge;
18 import java.awt.Color;
19 import java.awt.Cursor;
21 import java.awt.image.BufferedImage;
23 import javax.media.opengl.GL;
25 import org.scilab.modules.gui.canvas.Canvas;
26 import org.scilab.modules.gui.canvas.ScilabCanvas;
27 import org.scilab.modules.gui.canvas.ScilabCanvasBridge;
28 import org.scilab.modules.gui.canvas.SimpleCanvas;
29 import org.scilab.modules.gui.checkbox.CheckBox;
30 import org.scilab.modules.gui.checkbox.ScilabCheckBoxBridge;
31 import org.scilab.modules.gui.checkbox.SimpleCheckBox;
32 import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
33 import org.scilab.modules.gui.checkboxmenuitem.ScilabCheckBoxMenuItemBridge;
34 import org.scilab.modules.gui.checkboxmenuitem.SimpleCheckBoxMenuItem;
35 import org.scilab.modules.gui.colorchooser.ColorChooser;
36 import org.scilab.modules.gui.colorchooser.ScilabColorChooserBridge;
37 import org.scilab.modules.gui.colorchooser.SimpleColorChooser;
38 import org.scilab.modules.gui.console.Console;
39 import org.scilab.modules.gui.console.ScilabConsole;
40 import org.scilab.modules.gui.console.ScilabConsoleBridge;
41 import org.scilab.modules.gui.console.SimpleConsole;
42 import org.scilab.modules.gui.contextmenu.ContextMenu;
43 import org.scilab.modules.gui.contextmenu.ScilabContextMenuBridge;
44 import org.scilab.modules.gui.contextmenu.SimpleContextMenu;
45 import org.scilab.modules.gui.editbox.EditBox;
46 import org.scilab.modules.gui.editbox.ScilabEditBoxBridge;
47 import org.scilab.modules.gui.editbox.SimpleEditBox;
48 import org.scilab.modules.gui.events.callback.CommonCallBack;
49 import org.scilab.modules.gui.filechooser.FileChooser;
50 import org.scilab.modules.gui.filechooser.ScilabFileChooserBridge;
51 import org.scilab.modules.gui.filechooser.SimpleFileChooser;
52 import org.scilab.modules.gui.fontchooser.FontChooser;
53 import org.scilab.modules.gui.fontchooser.ScilabFontChooserBridge;
54 import org.scilab.modules.gui.fontchooser.SimpleFontChooser;
55 import org.scilab.modules.gui.frame.Frame;
56 import org.scilab.modules.gui.frame.ScilabFrameBridge;
57 import org.scilab.modules.gui.frame.SimpleFrame;
58 import org.scilab.modules.gui.helpbrowser.HelpBrowser;
59 import org.scilab.modules.gui.helpbrowser.ScilabHelpBrowserBridge;
60 import org.scilab.modules.gui.helpbrowser.SimpleHelpBrowser;
61 import org.scilab.modules.gui.label.Label;
62 import org.scilab.modules.gui.label.ScilabLabelBridge;
63 import org.scilab.modules.gui.label.SimpleLabel;
64 import org.scilab.modules.gui.layout.BorderLayout;
65 import org.scilab.modules.gui.layout.FlowLayout;
66 import org.scilab.modules.gui.layout.ScilabBorderLayoutBridge;
67 import org.scilab.modules.gui.layout.ScilabFlowLayoutBridge;
68 import org.scilab.modules.gui.listbox.ListBox;
69 import org.scilab.modules.gui.listbox.ScilabListBoxBridge;
70 import org.scilab.modules.gui.listbox.SimpleListBox;
71 import org.scilab.modules.gui.menu.Menu;
72 import org.scilab.modules.gui.menu.ScilabMenuBridge;
73 import org.scilab.modules.gui.menu.SimpleMenu;
74 import org.scilab.modules.gui.menubar.MenuBar;
75 import org.scilab.modules.gui.menubar.ScilabMenuBarBridge;
76 import org.scilab.modules.gui.menubar.SimpleMenuBar;
77 import org.scilab.modules.gui.menuitem.MenuItem;
78 import org.scilab.modules.gui.menuitem.ScilabMenuItemBridge;
79 import org.scilab.modules.gui.menuitem.SimpleMenuItem;
80 import org.scilab.modules.gui.messagebox.MessageBox;
81 import org.scilab.modules.gui.messagebox.ScilabMessageBoxBridge;
82 import org.scilab.modules.gui.messagebox.SimpleMessageBox;
83 import org.scilab.modules.gui.popupmenu.PopupMenu;
84 import org.scilab.modules.gui.popupmenu.ScilabPopupMenuBridge;
85 import org.scilab.modules.gui.popupmenu.SimplePopupMenu;
86 import org.scilab.modules.gui.pushbutton.PushButton;
87 import org.scilab.modules.gui.pushbutton.ScilabPushButtonBridge;
88 import org.scilab.modules.gui.pushbutton.SimplePushButton;
89 import org.scilab.modules.gui.radiobutton.RadioButton;
90 import org.scilab.modules.gui.radiobutton.ScilabRadioButtonBridge;
91 import org.scilab.modules.gui.radiobutton.SimpleRadioButton;
92 import org.scilab.modules.gui.separator.ScilabSeparatorBridge;
93 import org.scilab.modules.gui.separator.Separator;
94 import org.scilab.modules.gui.slider.ScilabSliderBridge;
95 import org.scilab.modules.gui.slider.SimpleSlider;
96 import org.scilab.modules.gui.slider.Slider;
97 import org.scilab.modules.gui.tab.ScilabTabBridge;
98 import org.scilab.modules.gui.tab.SimpleTab;
99 import org.scilab.modules.gui.tab.Tab;
100 import org.scilab.modules.gui.textbox.ScilabTextBoxBridge;
101 import org.scilab.modules.gui.textbox.SimpleTextBox;
102 import org.scilab.modules.gui.textbox.TextBox;
103 import org.scilab.modules.gui.toolbar.ScilabToolBarBridge;
104 import org.scilab.modules.gui.toolbar.SimpleToolBar;
105 import org.scilab.modules.gui.toolbar.ToolBar;
106 import org.scilab.modules.gui.tree.ScilabTreeBridge;
107 import org.scilab.modules.gui.tree.SimpleTree;
108 import org.scilab.modules.gui.tree.Tree;
109 import org.scilab.modules.gui.uidisplaytree.ScilabUiDisplayTreeBridge;
110 import org.scilab.modules.gui.uidisplaytree.SimpleUiDisplayTree;
111 import org.scilab.modules.gui.uidisplaytree.UiDisplayTree;
112 import org.scilab.modules.gui.uitable.ScilabUiTableBridge;
113 import org.scilab.modules.gui.uitable.SimpleUiTable;
114 import org.scilab.modules.gui.uitable.UiTable;
115 import org.scilab.modules.gui.utils.Position;
116 import org.scilab.modules.gui.utils.Size;
117 import org.scilab.modules.gui.window.ScilabWindowBridge;
118 import org.scilab.modules.gui.window.SimpleWindow;
119 import org.scilab.modules.gui.window.Window;
122 * Main bridge for Scilab Java GUIs
123 * @author Vincent COUVERT
124 * @author Bruno Jofret
126 public class ScilabBridge {
129 * Constructor for ScilabBridge class
131 protected ScilabBridge() {
132 throw new UnsupportedOperationException(); /* Prevents calls from subclass */
140 * Creates a new window
141 * @return the created window
143 public static SimpleWindow createWindow() {
144 return ScilabWindowBridge.createWindow();
148 * Draws a window on screen
149 * @param window the window to be drawn
151 public static void draw(Window window) {
152 ScilabWindowBridge.draw(window);
156 * Deiconify the window and put it in front of other window
157 * @param window the window to raise
159 public static void raise(Window window) {
160 ScilabWindowBridge.raise(window);
164 * Gets the dimensions (width and height) of a window
165 * @param window the window we want to get the dimensions of
166 * @return dimensions of the window
168 public static Size getDims(Window window) {
169 return ScilabWindowBridge.getDims(window);
173 * Sets the dimensions (width and height) of a window
174 * @param window the window we want to set the dimensions of
175 * @param newWindowSize new dimensions of the window
177 public static void setDims(Window window, Size newWindowSize) {
178 ScilabWindowBridge.setDims(window, newWindowSize);
182 * Gets the position (X-coordinate and Y-coordinate) of a window
183 * @param window the window we want to get the position of
184 * @return position of the window
186 public static Position getPosition(Window window) {
187 return ScilabWindowBridge.getPosition(window);
191 * Sets the position (X-coordinate and Y-coordinate) of a window
192 * @param window the window we want to set the position of
193 * @param newWindowPosition new position of the window
195 public static void setPosition(Window window, Position newWindowPosition) {
196 ScilabWindowBridge.setPosition(window, newWindowPosition);
200 * Gets the title of a window
201 * @param window the window we want to get the title of
202 * @return the title of the window
204 public static String getTitle(Window window) {
205 return ScilabWindowBridge.getTitle(window);
209 * Sets the title of a window
210 * @param window the window we want to set the title of
211 * @param newWindowTitle the title to set for the window
213 public static void setTitle(Window window, String newWindowTitle) {
214 ScilabWindowBridge.setTitle(window, newWindowTitle);
218 * Gets the visibility status of a window
219 * @param window the window we want to get the status of
220 * @return visibility status (true if the window is visible, false if not)
222 public static boolean isVisible(Window window) {
223 return ScilabWindowBridge.isVisible(window);
227 * Sets the visibility status for a window
228 * @param window the window we want to set the visibility status of
229 * @param newVisibleState new visibility status for the window
230 * (true set the window visible, false to set the window invisible)
232 public static void setVisible(Window window, boolean newVisibleState) {
233 ScilabWindowBridge.setVisible(window, newVisibleState);
237 * Add a tab to a window
238 * @param window the window which we want to add the tab to
239 * @param newTab the tab to add to the window
241 public static void addTab(Window window, Tab newTab) {
242 ScilabWindowBridge.addTab(window, newTab);
246 * Add a tab to a window
247 * @param window the window which we want to remove the tab from
248 * @param newTab the tab to add to the window
250 public static void removeTab(Window window, Tab newTab) {
251 ScilabWindowBridge.removeTab(window, newTab);
255 * Sets a MenuBar to a window
256 * @param window the window which we want to add the MeunBar to
257 * @param newMenuBar the MeunBar to add to the window
259 public static void addMenuBar(Window window, MenuBar newMenuBar) {
260 ScilabWindowBridge.addMenuBar(window, newMenuBar);
264 * Sets a ToolBar to a window
265 * @param window the window which we want to add the ToolBar to
266 * @param newToolBar the ToolBar to add to the window
268 public static void addToolBar(Window window, ToolBar newToolBar) {
269 ScilabWindowBridge.addToolBar(window, newToolBar);
273 * Sets a InfoBar to a window
274 * @param window the window which we want to add the InfoBar to
275 * @param newInfoBar the InfoBar to add to the window
277 public static void addInfoBar(Window window, TextBox newInfoBar) {
278 ScilabWindowBridge.addInfoBar(window, newInfoBar);
282 * @param window window from which we want the information
283 * @return number of objects (tabs) docked in this window
285 public static int getNbDockedObjects(Window window) {
286 return ScilabWindowBridge.getNbDockedObjects(window);
290 * Update the dimension of the window and its component.
291 * Only useful when the window is not yet visible
292 * @param window window to update
294 public static void updateDimensions(Window window) {
295 ScilabWindowBridge.updateDimensions(window);
300 * @param window window to update
302 public static void windowDeiconified(Window window) {
303 ScilabWindowBridge.windowDeiconified(window);
308 * @param window window to update
310 public static void windowIconified(Window window) {
311 ScilabWindowBridge.windowIconified(window);
316 * @param window window to update
318 public static void windowMaximized(Window window) {
319 ScilabWindowBridge.windowMaximized(window);
323 * Window is in the "normal" state.
324 * @param window window to update
326 public static void windowNormal(Window window) {
327 ScilabWindowBridge.windowNormal(window);
337 * Creates a new ToolBar
338 * @return the created ToolBar
340 public static SimpleToolBar createToolBar() {
341 return ScilabToolBarBridge.createToolBar();
345 * Add a PushButton to the ToolBar.
346 * @param toolBar the toolBar which we want to add the PushButton to
347 * @param pushButton the PushButton to add.
349 public static void add(ToolBar toolBar, PushButton pushButton) {
350 ScilabToolBarBridge.add(toolBar, pushButton);
354 * Add a Separator to a Toolbar
355 * @param toolbar the Toolbar which we want to add the Separator to
357 public static void addSeparator(ToolBar toolbar) {
358 ScilabToolBarBridge.addSeparator(toolbar);
362 * Set the visibility of the Toolbar
363 * @param toolbar the ToolBar
364 * @param newVisibleState true to set the toolbar visible
366 public static void setVisible(ToolBar toolbar, boolean newVisibleState) {
367 ScilabToolBarBridge.setVisible(toolbar, newVisibleState);
371 * Get the visibility of the TooBar
372 * @param toolbar the ToolBar
373 * @return true if the ToolBar is Visible
375 public static boolean isVisible(ToolBar toolbar) {
376 return ScilabToolBarBridge.isVisible(toolbar);
385 * Creates a new Frame
386 * @return the created Frame
388 public static SimpleFrame createFrame() {
389 return ScilabFrameBridge.createFrame();
393 * Sets the Text of a Frame
394 * @param frame the Frame we want to set the Text of
395 * @param newText the Text to set for the Frame
397 public static void setText(Frame frame, String newText) {
398 ScilabFrameBridge.setText(frame, newText);
402 * Gets the text of an Frame
403 * @param frame the Frame we want to get the text of
404 * @return the text of the Frame
406 public static String getText(Frame frame) {
407 return ScilabFrameBridge.getText(frame);
411 * Draws a Scilab Frame
412 * @param frame the Frame to draw
413 * @see org.scilab.modules.ihm.UIElement#draw()
415 public static void draw(Frame frame) {
416 ScilabFrameBridge.draw(frame);
420 * Gets the dimensions (width and height) of a Scilab Frame
421 * @param frame the Frame we want to get the dimensions of
422 * @return the size of the frame
423 * @see org.scilab.modules.ihm.UIElement#getDims()
425 public static Size getDims(Frame frame) {
426 return ScilabFrameBridge.getDims(frame);
430 * Gets the position (X-coordinate and Y-coordinate) of a Scilab frame
431 * @param frame the frame we want to get the position of
432 * @return the position of the frame
433 * @see org.scilab.modules.ihm.UIElement#getPosition()
435 public static Position getPosition(Frame frame) {
436 return ScilabFrameBridge.getPosition(frame);
440 * Gets the visibility status of a Scilab Frame
441 * @param frame the frame we want to get the visiblity status of
442 * @return the visibility status of the frame (true if the frame is visible, false if not)
443 * @see org.scilab.modules.ihm.UIElement#isVisible()
445 public static boolean isVisible(Frame frame) {
446 return ScilabFrameBridge.isVisible(frame);
450 * Sets the dimensions (width and height) of a Scilab Frame
451 * @param frame the frame we want to set the dimensions of
452 * @param newSize the size we want to set to the frame
453 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
455 public static void setDims(Frame frame, Size newSize) {
456 ScilabFrameBridge.setDims(frame, newSize);
460 * Sets the position (X-coordinate and Y-coordinate) of a Scilab frame
461 * @param frame the frame we want to set the position of
462 * @param newPosition the position we want to set to the frame
463 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
465 public static void setPosition(Frame frame, Position newPosition) {
466 ScilabFrameBridge.setPosition(frame, newPosition);
470 * Sets the visibility status of a Scilab Frame
471 * @param frame the frame we want to set the visiblity status of
472 * @param newVisibleState the visibility status we want to set to the frame (true to set the frame visible, false else)
473 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
475 public static void setVisible(Frame frame, boolean newVisibleState) {
476 ScilabFrameBridge.setVisible(frame, newVisibleState);
480 * Set the Background color of the Frame
481 * @param frame the Frame we want to set the background of
482 * @param color the Color
484 public static void setBackground(Frame frame, Color color) {
485 ScilabFrameBridge.setBackground(frame, color);
489 * Get the Background color of the Frame
490 * @param frame the Frame we want to get the background of
493 public static Color getBackground(Frame frame) {
494 return ScilabFrameBridge.getBackground(frame);
498 * Set the Foreground color of the Frame
499 * @param frame the Frame we want to set the foreground of
500 * @param color the Color
502 public static void setForeground(Frame frame, Color color) {
503 ScilabFrameBridge.setForeground(frame, color);
507 * Get the Foreground color of the Frame
508 * @param frame the Frame we want to get the foreground of
511 public static Color getForeground(Frame frame) {
512 return ScilabFrameBridge.getForeground(frame);
516 * Set the font of the Frame.
517 * @param frame the Frame we want to set the font of
518 * @param font the font
520 public static void setFont(Frame frame, Font font) {
521 ScilabFrameBridge.setFont(frame, font);
525 * Get the font of the Frame.
526 * @param frame the Frame we want to get the font of
529 public static Font getFont(Frame frame) {
530 return ScilabFrameBridge.getFont(frame);
534 * Set if the Frame is enabled or not
535 * @param frame the Frame we want to set the status of
536 * @param status true if the Frame is enabled
538 public static void setEnabled(Frame frame, boolean status) {
539 ScilabFrameBridge.setEnabled(frame, status);
543 * Gets the enable status of the Frame
544 * @param frame the Frame we want to get the status of
545 * @return the enable status of the Frame (true if the Frame is enabled, false if not)
547 public static boolean isEnabled(Frame frame) {
548 return ScilabFrameBridge.isEnabled(frame);
552 * Add a callback to the Frame
553 * @param frame the Frame we want to set the callback of
554 * @param callback the callback to set
556 public static void setCallback(Frame frame, CommonCallBack callback) {
557 ScilabFrameBridge.setCallback(frame, callback);
561 * Set the Relief of the Frame
562 * @param frame the Frame we want to set the Relief of
563 * @param reliefType the type of the relief to set (See ScilabRelief.java)
565 public static void setRelief(Frame frame, String reliefType) {
566 ScilabFrameBridge.setRelief(frame, reliefType);
571 * @param frame the Frame to be destroyed
573 public static void destroy(Frame frame) {
574 ScilabFrameBridge.destroy(frame);
578 * Give the focus to the Frame
579 * @param frame the Frame
581 public static void requestFocus(Frame frame) {
582 ScilabFrameBridge.requestFocus(frame);
590 * Creates a Scilab tab
591 * @param name the name of the tab (used to identify it)
592 * @return the created tab
594 public static SimpleTab createTab(String name) {
595 return ScilabTabBridge.createTab(name);
599 * Creates a Scilab tab
600 * @param name the name of the tab
601 * @param uuid an uuid to identify the tab
602 * @return the created tab
604 public static SimpleTab createTab(String name, String uuid) {
605 return ScilabTabBridge.createTab(name, uuid);
609 * Creates a Scilab tab able to create graphics
610 * @param name the name of the tab (used to identify it)
611 * @param figureId index of the created figure
612 * @return the created tab
614 public static SimpleTab createTab(String name, int figureId) {
615 return ScilabTabBridge.createTab(name, figureId);
619 * Draws a tab on screen
620 * @param tab the tab to be drawn
622 public static void draw(Tab tab) {
623 ScilabTabBridge.draw(tab);
627 * Gets the dimensions (width and height) of a tab
628 * @param tab the tab we want to get the dimensions of
629 * @return the dimensions of the tab
631 public static Size getDims(Tab tab) {
632 return ScilabTabBridge.getDims(tab);
636 * Sets the dimensions (width and height) of a tab
637 * @param tab the tab we want to set the dimensions of
638 * @param newTabSize new dimensions of the tab
640 public static void setDims(Tab tab, Size newTabSize) {
641 ScilabTabBridge.setDims(tab, newTabSize);
645 * Gets the position (X-coordinate and Y-coordinate) of a tab
646 * @param tab the tab we want to get the position of
647 * @return position of the tab
649 public static Position getPosition(Tab tab) {
650 return ScilabTabBridge.getPosition(tab);
654 * Sets the position (X-coordinate and Y-coordinate) of a tab
655 * @param tab the tab we want to set the position of
656 * @param newTabPosition new position of the tab
658 public static void setPosition(Tab tab, Position newTabPosition) {
659 ScilabTabBridge.setPosition(tab, newTabPosition);
663 * Gets the Name of a tab
664 * @param tab the tab we want to get the Name of
665 * @return the Name of the tab
667 public static String getName(Tab tab) {
668 return ScilabTabBridge.getName(tab);
672 * Sets the name of a tab
673 * @param tab the tab we want to set the name of
674 * @param newTabName the name to set for the tab
676 public static void setName(Tab tab, String newTabName) {
677 ScilabTabBridge.setName(tab, newTabName);
681 * Gets the visibility status of a tab
682 * @param tab the tab we want to get the status of
683 * @return visibility status (true if the tab is visible, false if not)
685 public static boolean isVisible(Tab tab) {
686 return ScilabTabBridge.isVisible(tab);
690 * Sets the visibility status of a tab
691 * @param tab the tab we want to set the visibility status of
692 * @param newVisibleState new visibility status for the tab
693 * (true set the tab visible, false to set the tab invisible)
695 public static void setVisible(Tab tab, boolean newVisibleState) {
696 ScilabTabBridge.setVisible(tab, newVisibleState);
700 * Add a member (dockable element) to a tab and returns the index of this member
701 * @param tab the tab where we want to add the member
702 * @param member the member to add
703 * @return index of member
705 public static int addMember(Tab tab, Frame member) {
706 return ScilabTabBridge.addMember(tab, member);
710 * Remove a Frame member from a tab
711 * @param tab the tab which we want to remove the Frame from
712 * @param member the Frame to remove
714 public static void removeMember(Tab tab, Frame member) {
715 ScilabTabBridge.removeMember(tab, member);
719 * Add a member (dockable element) to a tab and returns the index of this member
720 * @param tab the tab where we want to add the member
721 * @param member the member to add
722 * @return index of member
724 public static int addMember(Tab tab, Console member) {
725 return ScilabTabBridge.addMember(tab, member);
729 * We want to be able to add directly a HelpBrowser in a Tab.
730 * @param tab the tab where we want to add the member
731 * @param member the member to add
732 * @return the position of the HelpBrowser in the member list.
734 public static int addMember(Tab tab, HelpBrowser member) {
735 return ScilabTabBridge.addMember(tab, member);
739 * Add a member (dockable element) to a tab and returns the index of this member
740 * @param tab the tab where we want to add the member
741 * @param member the member to add
742 * @return index of member
744 public static int addMember(Tab tab, Canvas member) {
745 return ScilabTabBridge.addMember(tab, member);
749 * Sets a MenuBar to a tab
750 * @param tab the tab which we want to add the MenuBar to
751 * @param newMenuBar the MenuBar to add to the tab
753 public static void addMenuBar(Tab tab, MenuBar newMenuBar) {
754 ScilabTabBridge.addMenuBar(tab, newMenuBar);
758 * Add a member (dockable element) to a tab and returns the index of this member
759 * @param tab the tab which we want to add the Tree Overview to
760 * @param member the Tree Overview to add
761 * @return the position of the Tree Overview in the member list.
763 public static int addMember(Tab tab, Tree member) {
764 return ScilabTabBridge.addMember(tab, member);
768 * Add a member (dockable element) to a tab and returns the index of this member
769 * @param tab the tab which we want to add the pushbutton to
770 * @param member the pushbutton to add
771 * @return the position of the pushbutton in the member list.
773 public static int addMember(Tab tab, PushButton member) {
774 return ScilabTabBridge.addMember(tab, member);
778 * Remove a PushButton member from a tab
779 * @param tab the tab which we want to remove the PushButton from
780 * @param member the PushButton to remove
782 public static void removeMember(Tab tab, PushButton member) {
783 ScilabTabBridge.removeMember(tab, member);
787 * Add a member (dockable element) to a tab and returns the index of this member
788 * @param tab the tab which we want to add the EditBox to
789 * @param member the editbox to add
790 * @return the position of the editbox in the member list.
792 public static int addMember(Tab tab, EditBox member) {
793 return ScilabTabBridge.addMember(tab, member);
797 * Remove an EditBox member from a tab
798 * @param tab the tab which we want to remove the EditBox from
799 * @param member the EditBox to remove
801 public static void removeMember(Tab tab, EditBox member) {
802 ScilabTabBridge.removeMember(tab, member);
806 * Add a member (dockable element) to a tab and returns the index of this member
807 * @param tab the tab which we want to add the Label to
808 * @param member the label to add
809 * @return the position of the label in the member list.
811 public static int addMember(Tab tab, Label member) {
812 return ScilabTabBridge.addMember(tab, member);
816 * Remove a Label member from a tab
817 * @param tab the tab which we want to remove the Label from
818 * @param member the Label to remove
820 public static void removeMember(Tab tab, Label member) {
821 ScilabTabBridge.removeMember(tab, member);
825 * Add a member (dockable element) to a tab and returns the index of this member
826 * @param tab the tab which we want to add the CheckBox to
827 * @param member the checkbox to add
828 * @return the position of the checkbox in the member list.
830 public static int addMember(Tab tab, CheckBox member) {
831 return ScilabTabBridge.addMember(tab, member);
835 * Remove a CheckBox member from a tab
836 * @param tab the tab which we want to remove the CheckBox from
837 * @param member the CheckBox to remove
839 public static void removeMember(Tab tab, CheckBox member) {
840 ScilabTabBridge.removeMember(tab, member);
844 * Add a member (dockable element) to a tab and returns the index of this member
845 * @param tab the tab which we want to add the RadioButton to
846 * @param member the RadioButton to add
847 * @return the position of the RadioButton in the member list.
849 public static int addMember(Tab tab, RadioButton member) {
850 return ScilabTabBridge.addMember(tab, member);
854 * Remove a RadioButton member from a tab
855 * @param tab the tab which we want to remove the RadioButton from
856 * @param member the RadioButton to remove
858 public static void removeMember(Tab tab, RadioButton member) {
859 ScilabTabBridge.removeMember(tab, member);
863 * Add a member (dockable element) to a tab and returns the index of this member
864 * @param tab the tab which we want to add the UiTable to
865 * @param member the UiTable to add
866 * @return the position of the UiTable in the member list.
868 public static int addMember(Tab tab, UiTable member) {
869 return ScilabTabBridge.addMember(tab, member);
873 * Remove a UiTable member from a tab
874 * @param tab the tab which we want to remove the UiTable from
875 * @param member the UiTable to remove
877 public static void removeMember(Tab tab, UiTable member) {
878 ScilabTabBridge.removeMember(tab, member);
881 public static int addMember(Tab tab, UiDisplayTree member) {
882 return ScilabTabBridge.addMember(tab, member);
884 public static void removeMember(Tab tab, UiDisplayTree member) {
885 ScilabTabBridge.removeMember(tab, member);
889 * Add a member (dockable element) to a tab and returns the index of this member
890 * @param tab the tab which we want to add the Slider to
891 * @param member the Slider to add
892 * @return the position of the Slider in the member list.
894 public static int addMember(Tab tab, Slider member) {
895 return ScilabTabBridge.addMember(tab, member);
899 * Remove a Slider member from a tab
900 * @param tab the tab which we want to remove the Slider from
901 * @param member the Slider to remove
903 public static void removeMember(Tab tab, Slider member) {
904 ScilabTabBridge.removeMember(tab, member);
908 * Add a member (dockable element) to a tab and returns the index of this member
909 * @param tab the tab which we want to add the ListBox to
910 * @param member the ListBox to add
911 * @return the position of the ListBox in the member list.
913 public static int addMember(Tab tab, ListBox member) {
914 return ScilabTabBridge.addMember(tab, member);
918 * Remove a ListBox member from a tab
919 * @param tab the tab which we want to remove the ListBox from
920 * @param member the ListBox to remove
922 public static void removeMember(Tab tab, ListBox member) {
923 ScilabTabBridge.removeMember(tab, member);
927 * Add a member (dockable element) to a tab and returns the index of this member
928 * @param tab the tab which we want to add the PopupMenu to
929 * @param member the PopupMenu to add
930 * @return the position of the PopupMenu in the member list.
932 public static int addMember(Tab tab, PopupMenu member) {
933 return ScilabTabBridge.addMember(tab, member);
937 * Remove a PopupMenu member from a tab
938 * @param tab the tab which we want to remove the PopupMenu from
939 * @param member the PopupMenu to remove
941 public static void removeMember(Tab tab, PopupMenu member) {
942 ScilabTabBridge.removeMember(tab, member);
946 * Remove a member (dockable element) to a tab and returns the index of this member
947 * @param tab the tab where we want to add the member
948 * @param member the member to add
950 public static void removeMember(Tab tab, Canvas member) {
951 ScilabTabBridge.removeMember(tab, member);
955 * Get the current status of the Tab in its parent
956 * @param tab the tab we want to get the status of
957 * @return true is the tab is the tab currently displayed in its parent
959 public static boolean isCurrentTab(Tab tab) {
960 return ScilabTabBridge.isCurrentTab(tab);
964 * Set the parent window id for this tab
965 * @param tab the tab we want to set the parent window id of
966 * @param id the id of the parent window
968 public static void setParentWindowId(Tab tab, int id) {
969 ScilabTabBridge.setParentWindowId(tab, id);
973 * Get the parent window id for this tab
974 * @param tab the tab we want to get the parent window id of
975 * @return the id of the parent window
977 public static int getParentWindowId(Tab tab) {
978 return ScilabTabBridge.getParentWindowId(tab);
982 * Set the callback of the tab
983 * @param tab the tab which we want to set the callback of
984 * @param callback the CallBack to set
986 public static void setCallback(Tab tab, CommonCallBack callback) {
987 ScilabTabBridge.setCallback(tab, callback);
991 * Set this tab as the current tab of its parent Window
994 public static void setCurrent(Tab tab) {
995 ScilabTabBridge.setCurrent(tab);
999 * Set the background color of a tab.
1000 * @param tab tab to modify
1001 * @param red red channel of the color
1002 * @param green green channel
1003 * @param blue blue channel
1005 public static void setBackground(Tab tab, double red, double green, double blue) {
1006 ScilabTabBridge.setBackground(tab, red, green, blue);
1010 * Specify whether the canvas should fit the parent tab size
1011 * (and consequently the scrollpane size) or not
1012 * @param tab tab to modify
1013 * @param onOrOff true to enable autoresize mode
1015 public static void setAutoResizeMode(Tab tab, boolean onOrOff) {
1016 ScilabTabBridge.setAutoResizeMode(tab, onOrOff);
1020 * @param tab tab to modify
1021 * @return whether the resize mode is on or off
1023 public static boolean getAutoResizeMode(Tab tab) {
1024 return ScilabTabBridge.getAutoResizeMode(tab);
1028 * Get the part of the axes which is currently viewed
1029 * @param tab tab to modify
1030 * @return [x,y,w,h] array
1032 public static int[] getViewingRegion(Tab tab) {
1033 return ScilabTabBridge.getViewingRegion(tab);
1037 * Specify a new viewport for the axes
1038 * Only works if autoresize mode is off
1039 * @param tab tab to modify
1040 * @param posX X coordinate of upper left point of the viewport within the canvas
1041 * @param posY Y coordinate of upper left point of the viewport within the canvas
1042 * @param width width of the viewport
1043 * @param height height of the viewport
1045 public static void setViewingRegion(Tab tab, int posX, int posY, int width, int height) {
1046 ScilabTabBridge.setViewingRegion(tab, posX, posY, width, height);
1051 * @param tab tab to modify
1052 * @return size of the axes in pixels
1054 public static Size getAxesSize(Tab tab) {
1055 return ScilabTabBridge.getAxesSize(tab);
1060 * @param tab tab to modify
1061 * @param newSize set a new axes size
1063 public static void setAxesSize(Tab tab, Size newSize) {
1064 ScilabTabBridge.setAxesSize(tab, newSize);
1068 * Set the event handler of the Axes
1069 * @param tab tab to modify
1070 * @param command the name of the Scilab function to call
1072 public static void setEventHandler(Tab tab, String command) {
1073 ScilabTabBridge.setEventHandler(tab, command);
1077 * Set the status of the event handler of the Axes
1078 * @param tab tab to modify
1079 * @param status is true to set the event handler active
1081 public static void setEventHandlerEnabled(Tab tab, boolean status) {
1082 ScilabTabBridge.setEventHandlerEnabled(tab, status);
1087 /******************/
1088 /* Console Bridge */
1089 /******************/
1092 * Creates a Scilab Console
1093 * @return the created console
1095 public static SimpleConsole createConsole() {
1096 return ScilabConsoleBridge.createConsole();
1100 * Displays data in the console
1101 * @param console the console to display the data in
1102 * @param dataToDisplay the data to be displayed
1103 * @see org.scilab.modules.console.HelpBrowser#display()
1105 public static void display(Console console, String dataToDisplay) {
1106 ScilabConsoleBridge.display(console, dataToDisplay);
1110 * Reads input data in the console
1111 * @param console the console to read the data from
1112 * @return the data entered by the user
1113 * @see org.scilab.modules.console.HelpBrowser#readLine()
1115 public static String readLine(Console console) {
1116 return ScilabConsoleBridge.readLine(console);
1121 * @param console the console to draw
1122 * @see org.scilab.modules.ihm.UIElement#draw()
1124 public static void draw(Console console) {
1125 ScilabConsoleBridge.draw(console);
1129 * Gets the dimensions (width and height) of a Scilab console
1130 * @param console the console which we want to get the dimensions of
1131 * @return the size of the console
1132 * @see org.scilab.modules.ihm.UIElement#getDims()
1134 public static Size getDims(Console console) {
1135 return ScilabConsoleBridge.getDims(console);
1139 * Gets the position (X-coordinate and Y-coordinates) of a Scilab console
1140 * @param console the console which we want to get the position of
1141 * @return the position of the console
1142 * @see org.scilab.modules.ihm.UIElement#getPosition()
1144 public static Position getPosition(Console console) {
1145 return ScilabConsoleBridge.getPosition(console);
1149 * Gets the visibility status of a console
1150 * @param console the console which we want to get the visibility status of
1151 * @return the visibility status of the console (true if the console is visible, false if not)
1152 * @see org.scilab.modules.ihm.UIElement#isVisible()
1154 public static boolean isVisible(Console console) {
1155 return ScilabConsoleBridge.isVisible(console);
1159 * Sets the visibility status of a console
1160 * @param console the console which we want to get the visibility status of
1161 * @param newVisibleState the visibility status we want to set to the console (true to set the console visible, false else)
1162 * @see org.scilab.modules.ihm.UIElement#isVisible()
1164 public static void setVisible(Console console, boolean newVisibleState) {
1165 ScilabConsoleBridge.setVisible(console, newVisibleState);
1169 * Sets the dimensions (width and height) of a Scilab console
1170 * @param console the console which we want to set the dimensions of
1171 * @param newSize the size we want to set to the console
1172 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
1174 public static void setDims(Console console, Size newSize) {
1175 ScilabConsoleBridge.setDims(console, newSize);
1179 * Sets the position (X-coordinate and Y-coordinate) of a Scilab console
1180 * @param console the console which we want to set the position of
1181 * @param newPosition the position we want to set to the console
1182 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
1184 public static void setPosition(Console console, Position newPosition) {
1185 ScilabConsoleBridge.setPosition(console, newPosition);
1189 * Sets the visibility status of a Scilab console
1190 * @param console the console which we want to set the visibility status of
1191 * @param newVisibleState the visibility status we want to set to the console
1192 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
1194 public static void setPosition(Console console, boolean newVisibleState) {
1195 ScilabConsoleBridge.setVisible(console, newVisibleState);
1199 * Clears the console (no more scroll history and prompt on top left corner)
1200 * @param console the console to be cleared
1202 public static void clear(Console console) {
1203 ScilabConsoleBridge.clear(console);
1207 * Clears lines from the end of the output view
1208 * @param console the console to be cleared
1209 * @param nbLines the number of lines to be deleted
1211 public static void clear(Console console, int nbLines) {
1212 ScilabConsoleBridge.clear(console, nbLines);
1216 * Puts the prompt in the top left corner of the console
1217 * @param console the console used
1219 public static void toHome(Console console) {
1220 ScilabConsoleBridge.toHome(console);
1224 * Reads one user input char
1225 * @param console the console used to get the char
1226 * @return the data entered by the user
1227 * @see fr.scilab.console.HelpBrowser#getCharWithoutOutput()
1229 public static int getCharWithoutOutput(Console console) {
1230 return ScilabConsoleBridge.getCharWithoutOutput(console);
1234 * Sets the prompt displayed in the console
1235 * @param console the console where the prompt is set
1236 * @param prompt the prompt to be displayed in the console
1238 public static void setPrompt(Console console, String prompt) {
1239 ScilabConsoleBridge.setPrompt(console, prompt);
1243 * Updates Scilab internal variables containing the size of the console
1244 * These variables are used to format data before displaying it
1245 * @param console object we want to get the size of
1247 public static void scilabLinesUpdate(Console console) {
1248 ScilabConsoleBridge.scilabLinesUpdate(console);
1252 * Get the current status of the console
1253 * If the prompt view is visible, Scilab is waiting for commands
1254 * @param console object we want to get the status of
1255 * @return true is Scilab is waiting for commands
1257 public static boolean isWaitingForInput(Console console) {
1258 return ScilabConsoleBridge.isWaitingForInput(console);
1262 * Clear the commands history
1263 * @param console the console we want to clear the history of
1265 public static void clearHistory(Console console) {
1266 ScilabConsoleBridge.clearHistory(console);
1270 * Select all the console contents
1271 * @param console the console
1273 public static void selectAll(Console console) {
1274 ScilabConsoleBridge.selectAll(console);
1278 * Put the console selected text in the clipboard
1279 * @param console the console
1281 public static void copyToClipboard(Console console) {
1282 ScilabConsoleBridge.copyToClipboard(console);
1286 * Paste clipboard contents in Console input line
1287 * @param console the console
1289 public static void pasteClipboard(Console console) {
1290 ScilabConsoleBridge.pasteClipboard(console);
1294 * Cut selected text in the Console input line
1295 * @param console the console
1297 public static void cutSelection(Console console) {
1298 ScilabConsoleBridge.cutSelection(console);
1302 * Set the font of the Console
1303 * @param console the console
1304 * @param font the font to set
1306 public static void setFont(Console console, Font font) {
1307 ScilabConsoleBridge.setFont(console, font);
1311 * Get the font of the Console
1312 * @param console the console
1315 public static Font getFont(Console console) {
1316 return ScilabConsoleBridge.getFont(console);
1320 * Get the Foreground Color of the Console
1321 * @param console the console
1322 * @return the Foreground Color
1324 public static Color getForeground(Console console) {
1325 return ScilabConsoleBridge.getForeground(console);
1329 * Get the Background Color of the Console
1330 * @param console the console
1331 * @return the Background Color
1333 public static Color getBackground(Console console) {
1334 return ScilabConsoleBridge.getBackground(console);
1338 * Set the Foreground Color of the Console
1339 * @param console the console
1340 * @param color the Foreground Color
1342 public static void setForeground(Console console, Color color) {
1343 ScilabConsoleBridge.setForeground(console, color);
1347 * Set the Background Color of the Console
1348 * @param console the console
1349 * @param color the Background Color
1351 public static void setBackground(Console console, Color color) {
1352 ScilabConsoleBridge.setBackground(console, color);
1356 * Set the maximum number of lines stored in the Output
1357 * @param console the console
1358 * @param nbLines the number of lines
1360 public static void setMaxOutputSize(Console console, int nbLines) {
1361 ScilabConsoleBridge.setMaxOutputSize(console, nbLines);
1365 * Set the cursor pointer over the Console
1366 * @param console the console
1367 * @param cursor the Cursor to set
1369 public static void setCursor(Console console, Cursor cursor) {
1370 ScilabConsoleBridge.setCursor(console, cursor);
1378 * Creates a Scilab Canvas
1379 * @param figureIndex index of the displayed figure
1380 * @param antialiasingQuality Specify the number of pass to use for antialiasing.
1381 * If its value is 0, then antialiasing is disable.
1382 * @return the created canvas
1384 public static SimpleCanvas createCanvas(int figureIndex, int antialiasingQuality) {
1385 return ScilabCanvasBridge.createCanvas(figureIndex, antialiasingQuality);
1389 * Draws a Scilab canvas
1390 * @param canvas the canvas to draw
1391 * @see org.scilab.modules.ihm.UIElement#draw()
1393 public static void draw(Canvas canvas) {
1394 ScilabCanvasBridge.draw(canvas);
1398 * Gets the dimensions (width and height) of a Scilab Canvas
1399 * @param canvas the canvas we want to get the dimensions of
1400 * @return the size of the canvas
1401 * @see org.scilab.modules.ihm.UIElement#getDims()
1403 public static Size getDims(Canvas canvas) {
1404 return ScilabCanvasBridge.getDims(canvas);
1408 * Gets the position (X-coordinate and Y-coordinate) of a Scilab canvas
1409 * @param canvas the canvas we want to get the position of
1410 * @return the position of the canvas
1411 * @see org.scilab.modules.ihm.UIElement#getPosition()
1413 public static Position getPosition(Canvas canvas) {
1414 return ScilabCanvasBridge.getPosition(canvas);
1418 * Gets the visibility status of a Scilab Canvas
1419 * @param canvas the canvas we want to get the visiblity status of
1420 * @return the visibility status of the canvas (true if the canvas is visible, false if not)
1421 * @see org.scilab.modules.ihm.UIElement#isVisible()
1423 public static boolean isVisible(Canvas canvas) {
1424 return ScilabCanvasBridge.isVisible(canvas);
1428 * Sets the dimensions (width and height) of a Scilab Canvas
1429 * @param canvas the canvas we want to set the dimensions of
1430 * @param newSize the size we want to set to the canvas
1431 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
1433 public static void setDims(Canvas canvas, Size newSize) {
1434 ScilabCanvasBridge.setDims(canvas, newSize);
1438 * Sets the position (X-coordinate and Y-coordinate) of a Scilab canvas
1439 * @param canvas the canvas we want to set the position of
1440 * @param newPosition the position we want to set to the canvas
1441 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
1443 public static void setPosition(Canvas canvas, Position newPosition) {
1444 ScilabCanvasBridge.setPosition(canvas, newPosition);
1448 * Sets the visibility status of a Scilab Canvas
1449 * @param canvas the canvas we want to set the visiblity status of
1450 * @param newVisibleState the visibility status we want to set to the canvas (true to set the canvas visible, false else)
1451 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
1453 public static void setVisible(Canvas canvas, boolean newVisibleState) {
1454 ScilabCanvasBridge.setVisible(canvas, newVisibleState);
1458 * @param canvas the canvas we want to display
1460 public static void display(Canvas canvas) {
1461 ScilabCanvasBridge.display(canvas);
1465 * @param canvas the canvas we want to get the GL object from
1466 * @return a GL object
1468 public static GL getGL(Canvas canvas) {
1469 return ScilabCanvasBridge.getGL(canvas);
1473 * @param canvas the canvas of which we want to set the swap buffer mode.
1474 * @param onOrOff set wether the swap buffer mode is on or off.
1476 public static void setAutoSwapBufferMode(Canvas canvas, boolean onOrOff) {
1477 ScilabCanvasBridge.setAutoSwapBufferMode(canvas, onOrOff);
1481 * @param canvas the canvas from which we want to retrieve the swap buffer mode.
1482 * @return set wether the swap buffer mode is on or off.
1484 public static boolean getAutoSwapBufferMode(Canvas canvas) {
1485 return ScilabCanvasBridge.getAutoSwapBufferMode(canvas);
1489 * @param canvas the canvas we want to repaint
1491 public static void repaint(Canvas canvas) {
1492 ScilabCanvasBridge.repaint(canvas);
1497 * Set the background of the Canvas.
1498 * @param canvas the canvas we want to modify
1499 * @param red red channel
1500 * @param green green channel
1501 * @param blue blue channel
1503 public static void setBackgroundColor(Canvas canvas, double red, double green, double blue) {
1504 ScilabCanvasBridge.setBackgroundColor(canvas, red, green, blue);
1508 * Disable the canvas before closing
1509 * @param canvas canvas to close
1511 public static void close(Canvas canvas) {
1512 ScilabCanvasBridge.close(canvas);
1516 * Dump the scilabCanvas to an BufferedImage
1517 * @param scilabCanvas ScilabCanvas
1518 * @return a BufferedImage
1520 public static BufferedImage dumpAsBufferedImage(ScilabCanvas scilabCanvas) {
1521 return ScilabCanvasBridge.dumpAsBufferedImage(scilabCanvas);
1525 * Set double buffer mode on or Off
1526 * @param useSingleBuffer if true use single buffer if false use double buffering
1527 * @param canvas canvas to modify
1529 public static void setSingleBuffered(Canvas canvas, boolean useSingleBuffer) {
1530 ScilabCanvasBridge.setSingleBuffered(canvas, useSingleBuffer);
1534 /* MenuBar Bridge */
1538 * Creates a new MenuBar
1539 * @return the created MenuBar
1541 public static SimpleMenuBar createMenuBar() {
1542 return ScilabMenuBarBridge.createMenuBar();
1546 * Append a Menu to a MenuBar
1547 * @param menuBar the MenuBar which we want to add the newMenu to
1548 * @param newMenu the Menu to add to the MenuBar
1550 public static void add(MenuBar menuBar, Menu newMenu) {
1551 ScilabMenuBarBridge.add(menuBar, newMenu);
1555 /* MenuItem Bridge */
1559 * Creates a new MenuItem
1560 * @return the created MenuItem
1562 public static SimpleMenuItem createMenuItem() {
1563 return createMenuItem(true);
1567 * Creates a new MenuItem
1568 * @param autoCheckedMode if false, menu checking is managed by the user (and not automatically by Java)
1569 * @return the created MenuItem
1571 public static SimpleMenuItem createMenuItem(boolean autoCheckedMode) {
1572 return ScilabMenuItemBridge.createMenuItem(autoCheckedMode);
1576 * Sets the Text of a MenuItem
1577 * @param menuItem the MenuItem we want to set the Text of
1578 * @param newText the Text to set for the MenuItem
1580 public static void setText(MenuItem menuItem, String newText) {
1581 ScilabMenuItemBridge.setText(menuItem, newText);
1585 * set a mnemonic to a MenuItem
1586 * @param menuItem the MenuItem which we want to add the mnemonic to
1587 * @param mnemonic the mnemonic to add to the MenuItem
1589 public static void setMnemonic(MenuItem menuItem, char mnemonic) {
1590 ScilabMenuItemBridge.setMnemonic(menuItem, mnemonic);
1594 * Add a callback to the menu, this callback is a Scilab command
1595 * @param menuItem the MenuItem which we want to add the mnemonic to
1596 * @param callback the CallBack to set.
1598 public static void setCallback(MenuItem menuItem, CommonCallBack callback) {
1599 ScilabMenuItemBridge.setCallback(menuItem, callback);
1603 * Set if the menu item is enabled or not
1604 * @param menuItem the MenuItem which we want to set the status of
1605 * @param status true if the menu item is enabled
1607 public static void setEnabled(MenuItem menuItem, boolean status) {
1608 ScilabMenuItemBridge.setEnabled(menuItem, status);
1612 * Get the enable status of a MenuItem
1613 * @param menuItem the MenuItem which we want to get the status of
1614 * @return the enable status of the MenuItem (true if the MenuItem is enabled, false if not)
1616 public static boolean isEnabled(MenuItem menuItem) {
1617 return ScilabMenuItemBridge.isEnabled(menuItem);
1621 * Get the text to a MenuItem
1622 * @param menuItem the MenuItem which we want to get the text of
1623 * @return the text of the MenuItem
1625 public static String getText(MenuItem menuItem) {
1626 return ScilabMenuItemBridge.getText(menuItem);
1630 * set a mnemonic to a MenuItem
1631 * @param menuItem the MenuItem which we want to set the mnemonic to
1632 * @param mnemonic the new mnemonic to set to the MenuItem
1634 public static void setMnemonic(MenuItem menuItem, int mnemonic) {
1635 ScilabMenuItemBridge.setMnemonic(menuItem, mnemonic);
1639 * Sets the visibility status of a Scilab MenuItem
1640 * @param menuItem the MenuItem we want to set the visiblity status of
1641 * @param newVisibleState the visibility status we want to set to the MenuItem (true to set the MenuItem visible, false else)
1642 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
1644 public static void setVisible(MenuItem menuItem, boolean newVisibleState) {
1645 ScilabMenuItemBridge.setVisible(menuItem, newVisibleState);
1649 * Gets the visibility status of a Scilab MenuItem
1650 * @param menuItem the MenuItem we want to get the visiblity status of
1651 * @return the visibility status of the MenuItem (true if the MenuItem is visible, false if not)
1652 * @see org.scilab.modules.ihm.UIElement#isVisible()
1654 public static boolean isVisible(MenuItem menuItem) {
1655 return ScilabMenuItemBridge.isVisible(menuItem);
1659 * Set the Background color of the MenuItem
1660 * @param menuItem the MenuItem we want to set the background of
1661 * @param color the Color
1663 public static void setBackground(MenuItem menuItem, Color color) {
1664 ScilabMenuItemBridge.setBackground(menuItem, color);
1668 * Get the Background color of the MenuItem
1669 * @param menuItem the MenuItem we want to get the background of
1672 public static Color getBackground(MenuItem menuItem) {
1673 return ScilabMenuItemBridge.getBackground(menuItem);
1677 * Set the Foreground color of the MenuItem
1678 * @param menuItem the MenuItem we want to set the foreground of
1679 * @param color the Color
1681 public static void setForeground(MenuItem menuItem, Color color) {
1682 ScilabMenuItemBridge.setForeground(menuItem, color);
1686 * Get the Foreground color of the MenuItem
1687 * @param menuItem the MenuItem we want to get the foreground of
1690 public static Color getForeground(MenuItem menuItem) {
1691 return ScilabMenuItemBridge.getForeground(menuItem);
1695 * Set the font of the MenuItem.
1696 * @param menuItem the MenuItem we want to set the font of
1697 * @param font the font
1699 public static void setFont(MenuItem menuItem, Font font) {
1700 ScilabMenuItemBridge.setFont(menuItem, font);
1704 * Get the font of the MenuItem.
1705 * @param menuItem the MenuItem we want to get the font of
1708 public static Font getFont(MenuItem menuItem) {
1709 return ScilabMenuItemBridge.getFont(menuItem);
1713 * Set the horizontal alignment for the MenuItem text
1714 * @param menuItem the MenuItem we want to set the alignment of
1715 * @param alignment the value for the alignment (See ScilabAlignment.java)
1717 public static void setHorizontalAlignment(MenuItem menuItem, String alignment) {
1718 ScilabMenuItemBridge.setHorizontalAlignment(menuItem, alignment);
1722 * Set the vertical alignment for the MenuItem text
1723 * @param menuItem the MenuItem we want to set the alignment of
1724 * @param alignment the value for the alignment (See ScilabAlignment.java)
1726 public static void setVerticalAlignment(MenuItem menuItem, String alignment) {
1727 ScilabMenuItemBridge.setVerticalAlignment(menuItem, alignment);
1731 * Set the Relief of the MenuItem
1732 * @param menuItem the MenuItem which we want to set the Relief of
1733 * @param reliefType the type of the relief to set (See ScilabRelief.java)
1735 public static void setRelief(MenuItem menuItem, String reliefType) {
1736 ScilabMenuItemBridge.setRelief(menuItem, reliefType);
1740 * Add a MenuItem to the MenuItem
1741 * @param parentMenuItem the MenuItem where we want to add a MenuItem
1742 * @param childMenuItem the MenuItem we want to add
1744 public static void add(MenuItem parentMenuItem, MenuItem childMenuItem) {
1745 ScilabMenuItemBridge.add(parentMenuItem, childMenuItem);
1749 * Add a Menu to the MenuItem
1750 * @param parentMenuItem the MenuItem where we want to add a MenuItem
1751 * @param childMenu the Menu we want to add
1753 public static void add(MenuItem parentMenuItem, Menu childMenu) {
1754 ScilabMenuItemBridge.add(parentMenuItem, childMenu);
1758 * Destroy the MenuItem
1759 * @param menuItem the MenuItem to be destroyed
1761 public static void destroy(MenuItem menuItem) {
1762 ScilabMenuItemBridge.destroy(menuItem);
1766 * Give the focus to the MenuItem
1767 * @param menuItem the MenuItem
1769 public static void requestFocus(MenuItem menuItem) {
1770 ScilabMenuItemBridge.requestFocus(menuItem);
1774 * Retrieve the CallBack associated to this MenuItem
1775 * @param menuItem the MenuItem
1776 * @return the CallBack
1778 public static CommonCallBack getCallback(MenuItem menuItem) {
1779 return ScilabMenuItemBridge.getCallback(menuItem);
1783 * Set if the MenuItem is checked or not
1784 * @param menuItem the MenuItem
1785 * @param status true if the MenuItem is checked
1787 public static void setChecked(MenuItem menuItem, boolean status) {
1788 ScilabMenuItemBridge.setChecked(menuItem, status);
1792 * Get if the MenuItem is checked or not
1793 * @param menuItem the MenuItem
1794 * @return true if the MenuItem is checked
1796 public static boolean isChecked(MenuItem menuItem) {
1797 return ScilabMenuItemBridge.isChecked(menuItem);
1800 /****************************/
1801 /* CheckBox MenuItem Bridge */
1802 /****************************/
1805 * Creates a new CheckBoxMenuItem
1806 * @return the created CheckBoxMenuItem
1808 public static SimpleCheckBoxMenuItem createCheckBoxMenuItem() {
1809 return createCheckBoxMenuItem(true);
1813 * Creates a new CheckBoxMenuItem
1814 * @param autoCheckedMode if false, menu checking is managed by the user (and not automatically by Java)
1815 * @return the created CheckBoxMenuItem
1817 public static SimpleCheckBoxMenuItem createCheckBoxMenuItem(boolean autoCheckedMode) {
1818 return ScilabCheckBoxMenuItemBridge.createCheckBoxMenuItem(autoCheckedMode);
1822 * Add a MenuItem to the CheckBoxMenuItem
1823 * @param parentMenuItem the MenuItem where we want to add a CheckBoxMenuItem
1824 * @param childMenuItem the MenuItem we want to add
1826 public static void add(CheckBoxMenuItem parentMenuItem, MenuItem childMenuItem) {
1827 ScilabMenuItemBridge.add(parentMenuItem, childMenuItem);
1831 * Sets the Text of a CheckBoxMenuItem
1832 * @param checkBoxMenuItem the CheckBoxMenuItem we want to set the Text of
1833 * @param newText the Text to set for the CheckBoxMenuItem
1835 public static void setText(CheckBoxMenuItem checkBoxMenuItem, String newText) {
1836 ScilabCheckBoxMenuItemBridge.setText(checkBoxMenuItem, newText);
1840 * set a mnemonic to a CheckBoxMenuItem
1841 * @param checkBoxMenuItem the CheckBoxMenuItem which we want to add the mnemonic to
1842 * @param mnemonic the mnemonic to add to the CheckBoxMenuItem
1844 public static void setMnemonic(CheckBoxMenuItem checkBoxMenuItem, char mnemonic) {
1845 ScilabCheckBoxMenuItemBridge.setMnemonic(checkBoxMenuItem, mnemonic);
1849 * Add a callback to the menu, this callback is a Scilab command
1850 * @param checkBoxMenuItem the CheckBoxMenuItem which we want to add the mnemonic to
1851 * @param callback the CallBack to set.
1853 public static void setCallback(CheckBoxMenuItem checkBoxMenuItem, CommonCallBack callback) {
1854 ScilabCheckBoxMenuItemBridge.setCallback(checkBoxMenuItem, callback);
1858 * Set if the menu item is enabled or not
1859 * @param checkBoxMenuItem the CheckBoxMenuItem which we want to set the status of
1860 * @param status true if the menu item is enabled
1862 public static void setEnabled(CheckBoxMenuItem checkBoxMenuItem, boolean status) {
1863 ScilabCheckBoxMenuItemBridge.setEnabled(checkBoxMenuItem, status);
1867 * Get the enable status of a CheckBoxMenuItem
1868 * @param checkBoxMenuItem the CheckBoxMenuItem which we want to get the status of
1869 * @return the enable status of the CheckBoxMenuItem (true if the CheckBoxMenuItem is enabled, false if not)
1871 public static boolean isEnabled(CheckBoxMenuItem checkBoxMenuItem) {
1872 return ScilabCheckBoxMenuItemBridge.isEnabled(checkBoxMenuItem);
1876 * Get the text to a CheckBoxMenuItem
1877 * @param checkBoxMenuItem the CheckBoxMenuItem which we want to get the text of
1878 * @return the text of the CheckBoxMenuItem
1880 public static String getText(CheckBoxMenuItem checkBoxMenuItem) {
1881 return ScilabCheckBoxMenuItemBridge.getText(checkBoxMenuItem);
1885 * set a mnemonic to a CheckBoxMenuItem
1886 * @param checkBoxMenuItem the CheckBoxMenuItem which we want to set the mnemonic to
1887 * @param mnemonic the new mnemonic to set to the CheckBoxMenuItem
1889 public static void setMnemonic(CheckBoxMenuItem checkBoxMenuItem, int mnemonic) {
1890 ScilabCheckBoxMenuItemBridge.setMnemonic(checkBoxMenuItem, mnemonic);
1894 * Sets the visibility status of a Scilab CheckBoxMenuItem
1895 * @param checkBoxMenuItem the CheckBoxMenuItem we want to set the visiblity status of
1896 * @param newVisibleState the visibility status we want to set to the CheckBoxMenuItem (true to set the CheckBoxMenuItem visible, false else)
1897 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
1899 public static void setVisible(CheckBoxMenuItem checkBoxMenuItem, boolean newVisibleState) {
1900 ScilabCheckBoxMenuItemBridge.setVisible(checkBoxMenuItem, newVisibleState);
1904 * Gets the visibility status of a Scilab CheckBoxMenuItem
1905 * @param checkBoxMenuItem the CheckBoxMenuItem we want to get the visiblity status of
1906 * @return the visibility status of the CheckBoxMenuItem (true if the CheckBoxMenuItem is visible, false if not)
1907 * @see org.scilab.modules.ihm.UIElement#isVisible()
1909 public static boolean isVisible(CheckBoxMenuItem checkBoxMenuItem) {
1910 return ScilabCheckBoxMenuItemBridge.isVisible(checkBoxMenuItem);
1914 * Set the Background color of the CheckBoxMenuItem
1915 * @param checkBoxMenuItem the CheckBoxMenuItem we want to set the background of
1916 * @param color the Color
1918 public static void setBackground(CheckBoxMenuItem checkBoxMenuItem, Color color) {
1919 ScilabCheckBoxMenuItemBridge.setBackground(checkBoxMenuItem, color);
1923 * Get the Background color of the CheckBoxMenuItem
1924 * @param checkBoxMenuItem the CheckBoxMenuItem we want to get the background of
1927 public static Color getBackground(CheckBoxMenuItem checkBoxMenuItem) {
1928 return ScilabCheckBoxMenuItemBridge.getBackground(checkBoxMenuItem);
1932 * Set the Foreground color of the CheckBoxMenuItem
1933 * @param checkBoxMenuItem the CheckBoxMenuItem we want to set the foreground of
1934 * @param color the Color
1936 public static void setForeground(CheckBoxMenuItem checkBoxMenuItem, Color color) {
1937 ScilabCheckBoxMenuItemBridge.setForeground(checkBoxMenuItem, color);
1941 * Get the Foreground color of the CheckBoxMenuItem
1942 * @param checkBoxMenuItem the CheckBoxMenuItem we want to get the foreground of
1945 public static Color getForeground(CheckBoxMenuItem checkBoxMenuItem) {
1946 return ScilabCheckBoxMenuItemBridge.getForeground(checkBoxMenuItem);
1950 * Set the font of the CheckBoxMenuItem.
1951 * @param checkBoxMenuItem the CheckBoxMenuItem we want to set the font of
1952 * @param font the font
1954 public static void setFont(CheckBoxMenuItem checkBoxMenuItem, Font font) {
1955 ScilabCheckBoxMenuItemBridge.setFont(checkBoxMenuItem, font);
1959 * Get the font of the CheckBoxMenuItem.
1960 * @param checkBoxMenuItem the CheckBoxMenuItem we want to get the font of
1963 public static Font getFont(CheckBoxMenuItem checkBoxMenuItem) {
1964 return ScilabCheckBoxMenuItemBridge.getFont(checkBoxMenuItem);
1968 * Set the horizontal alignment for the CheckBoxMenuItem text
1969 * @param checkBoxMenuItem the CheckBoxMenuItem we want to set the alignment of
1970 * @param alignment the value for the alignment (See ScilabAlignment.java)
1972 public static void setHorizontalAlignment(CheckBoxMenuItem checkBoxMenuItem, String alignment) {
1973 ScilabCheckBoxMenuItemBridge.setHorizontalAlignment(checkBoxMenuItem, alignment);
1977 * Set the vertical alignment for the CheckBoxMenuItem text
1978 * @param checkBoxMenuItem the CheckBoxMenuItem we want to set the alignment of
1979 * @param alignment the value for the alignment (See ScilabAlignment.java)
1981 public static void setVerticalAlignment(CheckBoxMenuItem checkBoxMenuItem, String alignment) {
1982 ScilabCheckBoxMenuItemBridge.setVerticalAlignment(checkBoxMenuItem, alignment);
1986 * Set the Relief of the CheckBoxMenuItem
1987 * @param checkBoxMenuItem the CheckBoxMenuItem which we want to set the Relief of
1988 * @param reliefType the type of the relief to set (See ScilabRelief.java)
1990 public static void setRelief(CheckBoxMenuItem checkBoxMenuItem, String reliefType) {
1991 ScilabCheckBoxMenuItemBridge.setRelief(checkBoxMenuItem, reliefType);
1995 * Add a CheckBoxMenuItem to the CheckBoxMenuItem
1996 * @param parentCheckBoxMenuItem the CheckBoxMenuItem where we want to add a CheckBoxMenuItem
1997 * @param childCheckBoxMenuItem the CheckBoxMenuItem we want to add
1999 public static void add(CheckBoxMenuItem parentCheckBoxMenuItem, CheckBoxMenuItem childCheckBoxMenuItem) {
2000 ScilabCheckBoxMenuItemBridge.add(parentCheckBoxMenuItem, childCheckBoxMenuItem);
2004 * Add a Menu to the CheckBoxMenuItem
2005 * @param parentCheckBoxMenuItem the CheckBoxMenuItem where we want to add a CheckBoxMenuItem
2006 * @param childMenu the Menu we want to add
2008 public static void add(CheckBoxMenuItem parentCheckBoxMenuItem, Menu childMenu) {
2009 ScilabCheckBoxMenuItemBridge.add(parentCheckBoxMenuItem, childMenu);
2013 * Destroy the CheckBoxMenuItem
2014 * @param checkBoxMenuItem the CheckBoxMenuItem to be destroyed
2016 public static void destroy(CheckBoxMenuItem checkBoxMenuItem) {
2017 ScilabCheckBoxMenuItemBridge.destroy(checkBoxMenuItem);
2021 * Give the focus to the CheckBoxMenuItem
2022 * @param checkBoxMenuItem the CheckBoxMenuItem
2024 public static void requestFocus(CheckBoxMenuItem checkBoxMenuItem) {
2025 ScilabCheckBoxMenuItemBridge.requestFocus(checkBoxMenuItem);
2029 * Retrieve the CallBack associated to this CheckBoxMenuItem
2030 * @param checkBoxMenuItem the CheckBoxMenuItem
2031 * @return the CallBack
2033 public static CommonCallBack getCallback(CheckBoxMenuItem checkBoxMenuItem) {
2034 return ScilabCheckBoxMenuItemBridge.getCallback(checkBoxMenuItem);
2038 * Set if the CheckBoxMenuItem is checked or not
2039 * @param checkBoxMenuItem the CheckBoxMenuItem
2040 * @param status true if the CheckBoxMenuItem is checked
2042 public static void setChecked(CheckBoxMenuItem checkBoxMenuItem, boolean status) {
2043 ScilabCheckBoxMenuItemBridge.setChecked(checkBoxMenuItem, status);
2047 * Get if the CheckBoxMenuItem is checked or not
2048 * @param checkBoxMenuItem the CheckBoxMenuItem
2049 * @return true if the CheckBoxMenuItem is checked
2051 public static boolean isChecked(CheckBoxMenuItem checkBoxMenuItem) {
2052 return ScilabCheckBoxMenuItemBridge.isChecked(checkBoxMenuItem);
2060 * Creates a new Menu
2061 * @return the created Menu
2063 public static SimpleMenu createMenu() {
2064 return ScilabMenuBridge.createMenu();
2068 * Retrieve the CallBack associated to this Menu
2069 * @param menu the Menu
2070 * @return the CallBack
2072 public static CommonCallBack getCallback(Menu menu) {
2073 return ScilabMenuBridge.getCallback(menu);
2077 * Append a MenuItem to a Menu
2078 * @param menu the Menu which we want to add the MenuItem to
2079 * @param newMenuItem the MenuItem to add to the Menu
2081 public static void add(Menu menu, MenuItem newMenuItem) {
2082 ScilabMenuBridge.add(menu, newMenuItem);
2086 * Append a CheckBoxMenuItem to a Menu
2087 * @param menu the Menu which we want to add the CheckBoxMenuItem to
2088 * @param newCheckBoxMenuItem the MenuItem to add to the Menu
2090 public static void add(Menu menu, CheckBoxMenuItem newCheckBoxMenuItem) {
2091 ScilabMenuBridge.add(menu, newCheckBoxMenuItem);
2095 * Append a Menu to a Menu
2096 * @param menu the Menu which we want to append the Menu to
2097 * @param newSubMenu the Menu to append to the Menu
2099 public static void add(Menu menu, Menu newSubMenu) {
2100 ScilabMenuBridge.add(menu, newSubMenu);
2104 * set a text to a menu
2105 * @param menu the Menu which we want to set the text to
2106 * @param newText the new text to set to the menu
2108 public static void setText(Menu menu, String newText) {
2109 ScilabMenuBridge.setText(menu, newText);
2113 * Get the text to a menu
2114 * @param menu the Menu which we want to get the text of
2115 * @return the text of the menu
2117 public static String getText(Menu menu) {
2118 return ScilabMenuBridge.getText(menu);
2122 * set a mnemonic to a menu
2123 * @param menu the Menu which we want to set the mnemonic to
2124 * @param mnemonic the new mnemonic to set to the menu
2126 public static void setMnemonic(Menu menu, int mnemonic) {
2127 ScilabMenuBridge.setMnemonic(menu, mnemonic);
2131 * Add a Separator to a Menu
2132 * @param menu the Menu which we want to add the Separator to
2134 public static void addSeparator(Menu menu) {
2135 ScilabMenuBridge.addSeparator(menu);
2139 * Set if the menu is enabled or not
2140 * @param menu the menu which we want to set the status of
2141 * @param status true if the menu item is enabled
2143 public static void setEnabled(Menu menu, boolean status) {
2144 ScilabMenuBridge.setEnabled(menu, status);
2148 * Gets the enable status of a Menu
2149 * @param menu the menu which we want to get the status of
2150 * @return the enable status of the Menu (true if the Menu is enabled, false if not)
2152 public static boolean isEnabled(Menu menu) {
2153 return ScilabMenuBridge.isEnabled(menu);
2157 * Sets the visibility status of a Scilab menu
2158 * @param menu the menu we want to set the visiblity status of
2159 * @param newVisibleState the visibility status we want to set to the menu (true to set the menu visible, false else)
2160 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
2162 public static void setVisible(Menu menu, boolean newVisibleState) {
2163 ScilabMenuBridge.setVisible(menu, newVisibleState);
2167 * Gets the visibility status of a Scilab Menu
2168 * @param menu the menu we want to get the visiblity status of
2169 * @return the visibility status of the menu (true if the menu is visible, false if not)
2170 * @see org.scilab.modules.ihm.UIElement#isVisible()
2172 public static boolean isVisible(Menu menu) {
2173 return ScilabMenuBridge.isVisible(menu);
2177 * Set the Background color of the menu
2178 * @param menu the menu we want to set the background of
2179 * @param color the Color
2181 public static void setBackground(Menu menu, Color color) {
2182 ScilabMenuBridge.setBackground(menu, color);
2186 * Get the Background color of the menu
2187 * @param menu the menu we want to get the background of
2190 public static Color getBackground(Menu menu) {
2191 return ScilabMenuBridge.getBackground(menu);
2195 * Set the Foreground color of the menu
2196 * @param menu the menu we want to set the foreground of
2197 * @param color the Color
2199 public static void setForeground(Menu menu, Color color) {
2200 ScilabMenuBridge.setForeground(menu, color);
2204 * Get the Foreground color of the menu
2205 * @param menu the menu we want to get the foreground of
2208 public static Color getForeground(Menu menu) {
2209 return ScilabMenuBridge.getForeground(menu);
2213 * Set the font of the menu.
2214 * @param menu the menu we want to set the font of
2215 * @param font the font
2217 public static void setFont(Menu menu, Font font) {
2218 ScilabMenuBridge.setFont(menu, font);
2222 * Get the font of the menu.
2223 * @param menu the menu we want to get the font of
2226 public static Font getFont(Menu menu) {
2227 return ScilabMenuBridge.getFont(menu);
2231 * Add a callback to the menu, this callback is a Scilab command
2232 * @param menu the menu we want to set the callback of
2233 * @param callback the CallBack to set.
2235 public static void setCallback(Menu menu, CommonCallBack callback) {
2236 ScilabMenuBridge.setCallback(menu, callback);
2240 * Set the horizontal alignment for the Menu text
2241 * @param menu the Menu we want to set the alignment of
2242 * @param alignment the value for the alignment (See ScilabAlignment.java)
2244 public static void setHorizontalAlignment(Menu menu, String alignment) {
2245 ScilabMenuBridge.setHorizontalAlignment(menu, alignment);
2249 * Set the vertical alignment for the Menu text
2250 * @param menu the Menu we want to set the alignment of
2251 * @param alignment the value for the alignment (See ScilabAlignment.java)
2253 public static void setVerticalAlignment(Menu menu, String alignment) {
2254 ScilabMenuBridge.setVerticalAlignment(menu, alignment);
2258 * Set the Relief of the Menu
2259 * @param menu the Menu which we want to set the Relief of
2260 * @param reliefType the type of the relief to set (See ScilabRelief.java)
2262 public static void setRelief(Menu menu, String reliefType) {
2263 ScilabMenuBridge.setRelief(menu, reliefType);
2268 * @param menu the Menu to be destroyed
2270 public static void destroy(Menu menu) {
2271 ScilabMenuBridge.destroy(menu);
2275 * Give the focus to the Menu
2276 * @param menu the Menu
2278 public static void requestFocus(Menu menu) {
2279 ScilabMenuBridge.requestFocus(menu);
2283 * Set if the Menu is checked or not
2284 * @param menu the Menu
2285 * @param status true if the Menu is checked
2287 public static void setChecked(Menu menu, boolean status) {
2288 ScilabMenuBridge.setChecked(menu, status);
2292 * Get if the Menu is checked or not
2293 * @param menu the Menu
2294 * @return true if the Menu is checked
2296 public static boolean isChecked(Menu menu) {
2297 return ScilabMenuBridge.isChecked(menu);
2300 /**********************/
2301 /* ContextMenu Bridge */
2302 /**********************/
2305 * Creates a new ContextMenu
2306 * @return the created ContextMenu
2308 public static SimpleContextMenu createContextMenu() {
2309 return ScilabContextMenuBridge.createContextMenu();
2313 * Append a MenuItem to a ContextMenu
2314 * @param contextMenu the ContextMenu which we want to add the MenuItem to
2315 * @param newMenuItem the MenuItem to add to the ContextMenu
2317 public static void add(ContextMenu contextMenu, MenuItem newMenuItem) {
2318 ScilabContextMenuBridge.add(contextMenu, newMenuItem);
2322 * Append a Menu to a ContextMenu
2323 * @param contextMenu the ContextMenu which we want to add the MenuItem to
2324 * @param newMenu the Menu to add to the ContextMenu
2326 public static void add(ContextMenu contextMenu, Menu newMenu) {
2327 ScilabContextMenuBridge.add(contextMenu, newMenu);
2331 * set a text to a ContextMenu
2332 * @param contextMenu the Menu which we want to set the text to
2333 * @param newText the new text to set to the contextMenu
2335 public static void setText(ContextMenu contextMenu, String newText) {
2336 ScilabContextMenuBridge.setText(contextMenu, newText);
2340 * Get the text to a contextMenu
2341 * @param contextMenu the ContextMenu which we want to get the text of
2342 * @return the text of the contextMenu
2344 public static String getText(ContextMenu contextMenu) {
2345 return ScilabContextMenuBridge.getText(contextMenu);
2349 * Set if the contextMenu is enabled or not
2350 * @param contextMenu the contextMenu which we want to set the status of
2351 * @param status true if the contextMenu item is enabled
2353 public static void setEnabled(ContextMenu contextMenu, boolean status) {
2354 ScilabContextMenuBridge.setEnabled(contextMenu, status);
2358 * Gets the enable status of a ContextMenu
2359 * @param contextMenu the contextMenu which we want to get the status of
2360 * @return the enable status of the ContextMenu (true if the ContextMenu is enabled, false if not)
2362 public static boolean isEnabled(ContextMenu contextMenu) {
2363 return ScilabContextMenuBridge.isEnabled(contextMenu);
2367 * Sets the visibility status of a Scilab contextMenu
2368 * @param contextMenu the contextMenu we want to set the visiblity status of
2369 * @param newVisibleState the visibility status we want to set to the contextMenu (true to set the contextMenu visible, false else)
2370 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
2372 public static void setVisible(ContextMenu contextMenu, boolean newVisibleState) {
2373 ScilabContextMenuBridge.setVisible(contextMenu, newVisibleState);
2377 * Gets the visibility status of a Scilab ContextMenu
2378 * @param contextMenu the contextMenu we want to get the visiblity status of
2379 * @return the visibility status of the contextMenu (true if the contextMenu is visible, false if not)
2380 * @see org.scilab.modules.ihm.UIElement#isVisible()
2382 public static boolean isVisible(ContextMenu contextMenu) {
2383 return ScilabContextMenuBridge.isVisible(contextMenu);
2387 * Set the Background color of the contextMenu
2388 * @param contextMenu the contextMenu we want to set the background of
2389 * @param color the Color
2391 public static void setBackground(ContextMenu contextMenu, Color color) {
2392 ScilabContextMenuBridge.setBackground(contextMenu, color);
2396 * Get the Background color of the contextMenu
2397 * @param contextMenu the contextMenu we want to get the background of
2400 public static Color getBackground(ContextMenu contextMenu) {
2401 return ScilabContextMenuBridge.getBackground(contextMenu);
2405 * Set the Foreground color of the contextMenu
2406 * @param contextMenu the contextMenu we want to set the foreground of
2407 * @param color the Color
2409 public static void setForeground(ContextMenu contextMenu, Color color) {
2410 ScilabContextMenuBridge.setForeground(contextMenu, color);
2414 * Get the Foreground color of the contextMenu
2415 * @param contextMenu the contextMenu we want to get the foreground of
2418 public static Color getForeground(ContextMenu contextMenu) {
2419 return ScilabContextMenuBridge.getForeground(contextMenu);
2423 * Set the font of the contextMenu.
2424 * @param contextMenu the contextMenu we want to set the font of
2425 * @param font the font
2427 public static void setFont(ContextMenu contextMenu, Font font) {
2428 ScilabContextMenuBridge.setFont(contextMenu, font);
2432 * Get the font of the contextMenu.
2433 * @param contextMenu the contextMenu we want to get the font of
2436 public static Font getFont(ContextMenu contextMenu) {
2437 return ScilabContextMenuBridge.getFont(contextMenu);
2441 * Add a callback to the contextMenu, this callback is a Scilab command
2442 * @param contextMenu the contextMenu we want to set the callback of
2443 * @param callback the CallBack to set.
2445 public static void setCallback(ContextMenu contextMenu, CommonCallBack callback) {
2446 ScilabContextMenuBridge.setCallback(contextMenu, callback);
2450 * Set the horizontal alignment for the ContextMenu text
2451 * @param contextMenu the ContextMenu we want to set the alignment of
2452 * @param alignment the value for the alignment (See ScilabAlignment.java)
2454 public static void setHorizontalAlignment(ContextMenu contextMenu, String alignment) {
2455 ScilabContextMenuBridge.setHorizontalAlignment(contextMenu, alignment);
2459 * Set the vertical alignment for the ContextMenu text
2460 * @param contextMenu the ContextMenu we want to set the alignment of
2461 * @param alignment the value for the alignment (See ScilabAlignment.java)
2463 public static void setVerticalAlignment(ContextMenu contextMenu, String alignment) {
2464 ScilabContextMenuBridge.setVerticalAlignment(contextMenu, alignment);
2468 * Set the Relief of the ContextMenu
2469 * @param contextMenu the ContextMenu which we want to set the Relief of
2470 * @param reliefType the type of the relief to set (See ScilabRelief.java)
2472 public static void setRelief(ContextMenu contextMenu, String reliefType) {
2473 ScilabContextMenuBridge.setRelief(contextMenu, reliefType);
2477 * Delete the ContextMenu
2478 * @param contextMenu the ContextMenu to be destroyed
2480 public static void destroy(ContextMenu contextMenu) {
2481 ScilabContextMenuBridge.destroy(contextMenu);
2485 * Give the focus to the ContextMenu
2486 * @param contextMenu the ContextMenu
2488 public static void requestFocus(ContextMenu contextMenu) {
2489 ScilabContextMenuBridge.requestFocus(contextMenu);
2492 /********************/
2493 /* Separator Bridge */
2494 /********************/
2497 * Creates a new Separator
2498 * @return the created Separator
2500 public static Separator createSeparator() {
2501 return ScilabSeparatorBridge.createSeparator();
2505 /* PushButton Bridge */
2509 * Creates a new PushButton
2510 * @return the created PushButton
2512 public static SimplePushButton createPushButton() {
2513 return ScilabPushButtonBridge.createPushButton();
2517 * Draws a pushButton on screen
2518 * @param pushButton the pushButton to be drawn
2520 public static void draw(PushButton pushButton) {
2521 ScilabPushButtonBridge.draw(pushButton);
2525 * Gets the dimensions (width and height) of a pushButton
2526 * @param pushButton the pushButton we want to get the dimensions of
2527 * @return dimensions of the pushButton
2529 public static Size getDims(PushButton pushButton) {
2530 return ScilabPushButtonBridge.getDims(pushButton);
2534 * Sets the dimensions (width and height) of a pushButton
2535 * @param pushButton the pushButton we want to set the dimensions of
2536 * @param newSize new dimensions of the pushButton
2538 public static void setDims(PushButton pushButton, Size newSize) {
2539 ScilabPushButtonBridge.setDims(pushButton, newSize);
2543 * Gets the position (X-coordinate and Y-coordinate) of a pushButton
2544 * @param pushButton the pushButton we want to get the position of
2545 * @return position of the pushButton
2547 public static Position getPosition(PushButton pushButton) {
2548 return ScilabPushButtonBridge.getPosition(pushButton);
2552 * Sets the position (X-coordinate and Y-coordinate) of a pushButton
2553 * @param pushButton the pushButton we want to set the position of
2554 * @param newPosition new position of the pushButton
2556 public static void setPosition(PushButton pushButton, Position newPosition) {
2557 ScilabPushButtonBridge.setPosition(pushButton, newPosition);
2561 * Gets the visibility status of a pushButton
2562 * @param pushButton the pushButton we want to get the status of
2563 * @return visibility status (true if the pushButton is visible, false if not)
2565 public static boolean isVisible(PushButton pushButton) {
2566 return ScilabPushButtonBridge.isVisible(pushButton);
2570 * Sets the visibility status for a pushButton
2571 * @param pushButton the pushButton we want to set the visibility status of
2572 * @param newVisibleState new visibility status for the pushButton
2573 * (true set the pushButton visible, false to set the pushButton invisible)
2575 public static void setVisible(PushButton pushButton, boolean newVisibleState) {
2576 ScilabPushButtonBridge.setVisible(pushButton, newVisibleState);
2580 * Sets the Text of a PushButton
2581 * @param pushButton the PushButton we want to set the Text of
2582 * @param newText the Text to set for the PushButton
2584 public static void setText(PushButton pushButton, String newText) {
2585 ScilabPushButtonBridge.setText(pushButton, newText);
2589 * Gets the Text of a PushButton
2590 * @param pushButton the PushButton we want to get the Text of
2591 * @return the Text of the PushButton
2593 public static String getText(PushButton pushButton) {
2594 return ScilabPushButtonBridge.getText(pushButton);
2598 * Sets the icon of a PushButton
2599 * @param pushButton the PushButton we want to set the icon of
2600 * @param filename the path to the icon image to set to the PushButton
2602 public static void setIcon(PushButton pushButton, String filename) {
2603 ScilabPushButtonBridge.setIcon(pushButton, filename);
2607 * Add a callback to the pushbutton
2608 * @param pushButton the PushButton we want to set the callback of
2609 * @param callback the CallBack to set.
2611 public static void setCallback(PushButton pushButton, CommonCallBack callback) {
2612 ScilabPushButtonBridge.setCallback(pushButton, callback);
2616 * Set if the pushbutton is enabled or not
2617 * @param pushButton the PushButton we want to set the status of
2618 * @param status true if the pushbutton is enabled
2620 public static void setEnabled(PushButton pushButton, boolean status) {
2621 ScilabPushButtonBridge.setEnabled(pushButton, status);
2625 * Gets the enable status of a PushButton
2626 * @param pushButton the PushButton we want to get the status of
2627 * @return the enable status of the PushButton (true if the PushButton is enabled, false if not)
2629 public static boolean isEnabled(PushButton pushButton) {
2630 return ScilabPushButtonBridge.isEnabled(pushButton);
2634 * Set the Background color of the pushbutton
2635 * @param pushButton the PushButton we want to set the background of
2636 * @param color the Color
2638 public static void setBackground(PushButton pushButton, Color color) {
2639 ScilabPushButtonBridge.setBackground(pushButton, color);
2643 * Get the Background color of the pushbutton
2644 * @param pushButton the PushButton we want to get the background of
2647 public static Color getBackground(PushButton pushButton) {
2648 return ScilabPushButtonBridge.getBackground(pushButton);
2652 * Set the Foreground color of the pushbutton
2653 * @param pushButton the PushButton we want to set the foreground of
2654 * @param color the Color
2656 public static void setForeground(PushButton pushButton, Color color) {
2657 ScilabPushButtonBridge.setForeground(pushButton, color);
2661 * Get the Foreground color of the pushbutton
2662 * @param pushButton the PushButton we want to get the foreground of
2665 public static Color getForeground(PushButton pushButton) {
2666 return ScilabPushButtonBridge.getForeground(pushButton);
2670 * Set the font of the pushbutton.
2671 * @param pushButton the pushbutton we want to set the font of
2672 * @param font the font
2674 public static void setFont(PushButton pushButton, Font font) {
2675 ScilabPushButtonBridge.setFont(pushButton, font);
2679 * Get the font of the pushbutton.
2680 * @param pushButton the pushbutton we want to get the font of
2683 public static Font getFont(PushButton pushButton) {
2684 return ScilabPushButtonBridge.getFont(pushButton);
2688 * Set the horizontal alignment for the PushButton text
2689 * @param pushButton the PushButton we want to set the alignment of
2690 * @param alignment the value for the alignment (See ScilabAlignment.java)
2692 public static void setHorizontalAlignment(PushButton pushButton, String alignment) {
2693 ScilabPushButtonBridge.setHorizontalAlignment(pushButton, alignment);
2697 * Set the vertical alignment for the PushButton text
2698 * @param pushButton the PushButton we want to set the alignment of
2699 * @param alignment the value for the alignment (See ScilabAlignment.java)
2701 public static void setVerticalAlignment(PushButton pushButton, String alignment) {
2702 ScilabPushButtonBridge.setVerticalAlignment(pushButton, alignment);
2706 * Set the Relief of the PushButton
2707 * @param pushButton the PushButton which we want to set the Relief of
2708 * @param reliefType the type of the relief to set (See ScilabRelief.java)
2710 public static void setRelief(PushButton pushButton, String reliefType) {
2711 ScilabPushButtonBridge.setRelief(pushButton, reliefType);
2715 * Delete the PushButton
2716 * @param pushButton the PushButton to be destroyed
2718 public static void destroy(PushButton pushButton) {
2719 ScilabPushButtonBridge.destroy(pushButton);
2723 * Set the string to be displayed when the mouse cursor is over the PushButton
2724 * @param pushButton the PushButton
2725 * @param toolTipText the string to set
2727 public static void setToolTipText(PushButton pushButton, String toolTipText) {
2728 ScilabPushButtonBridge.setToolTipText(pushButton, toolTipText);
2732 * Give the focus to the PushButton
2733 * @param pushButton the PushButton
2735 public static void requestFocus(PushButton pushButton) {
2736 ScilabPushButtonBridge.requestFocus(pushButton);
2739 /******************/
2740 /* TextBox Bridge */
2741 /******************/
2744 * Creates a new TextBox
2745 * @return the created TextBox
2747 public static SimpleTextBox createTextBox() {
2748 return ScilabTextBoxBridge.createTextBox();
2752 * Sets the Text of a TextBox
2753 * @param textBox the TextBox we want to set the Text of
2754 * @param newText the Text to set for the TextBox
2756 public static void setText(TextBox textBox, String newText) {
2757 ScilabTextBoxBridge.setText(textBox, newText);
2761 * Gets the text of an TextBox
2762 * @param textBox the TextBox we want to get the text of
2763 * @return the text of the TextBox
2765 public static String getText(TextBox textBox) {
2766 return ScilabTextBoxBridge.getText(textBox);
2770 * Draws a Scilab TextBox
2771 * @param textBox the TextBox to draw
2772 * @see org.scilab.modules.ihm.UIElement#draw()
2774 public static void draw(TextBox textBox) {
2775 ScilabTextBoxBridge.draw(textBox);
2779 * Gets the dimensions (width and height) of a Scilab TextBox
2780 * @param textBox the TextBox we want to get the dimensions of
2781 * @return the size of the textBox
2782 * @see org.scilab.modules.ihm.UIElement#getDims()
2784 public static Size getDims(TextBox textBox) {
2785 return ScilabTextBoxBridge.getDims(textBox);
2789 * Gets the position (X-coordinate and Y-coordinate) of a Scilab textBox
2790 * @param textBox the textBox we want to get the position of
2791 * @return the position of the textBox
2792 * @see org.scilab.modules.ihm.UIElement#getPosition()
2794 public static Position getPosition(TextBox textBox) {
2795 return ScilabTextBoxBridge.getPosition(textBox);
2799 * Gets the visibility status of a Scilab TextBox
2800 * @param textBox the textBox we want to get the visiblity status of
2801 * @return the visibility status of the textBox (true if the textBox is visible, false if not)
2802 * @see org.scilab.modules.ihm.UIElement#isVisible()
2804 public static boolean isVisible(TextBox textBox) {
2805 return ScilabTextBoxBridge.isVisible(textBox);
2809 * Set the status of the TextBox
2810 * @param textBox the textBox we want to set the status of
2811 * @param status true if the TextBox is enabled
2812 * @see org.scilab.modules.gui.widget.Widget#setEnabled(boolean)
2814 public static void setEnabled(TextBox textBox, boolean status) {
2815 ScilabTextBoxBridge.setEnabled(textBox, status);
2819 * Gets the enable status of a TextBox
2820 * @param textBox the textBox we want to get the status of
2821 * @return the enable status of the TextBox (true if the TextBox is enabled, false if not)
2823 public static boolean isEnabled(TextBox textBox) {
2824 return ScilabTextBoxBridge.isEnabled(textBox);
2828 * Sets the dimensions (width and height) of a Scilab TextBox
2829 * @param textBox the textBox we want to set the dimensions of
2830 * @param newSize the size we want to set to the textBox
2831 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
2833 public static void setDims(TextBox textBox, Size newSize) {
2834 ScilabTextBoxBridge.setDims(textBox, newSize);
2838 * Sets the position (X-coordinate and Y-coordinate) of a Scilab textBox
2839 * @param textBox the textBox we want to set the position of
2840 * @param newPosition the position we want to set to the textBox
2841 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
2843 public static void setPosition(TextBox textBox, Position newPosition) {
2844 ScilabTextBoxBridge.setPosition(textBox, newPosition);
2848 * Sets the visibility status of a Scilab TextBox
2849 * @param textBox the textBox we want to set the visiblity status of
2850 * @param newVisibleState the visibility status we want to set to the textBox (true to set the textBox visible, false else)
2851 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
2853 public static void setVisible(TextBox textBox, boolean newVisibleState) {
2854 ScilabTextBoxBridge.setVisible(textBox, newVisibleState);
2858 * Set the Background color of the textbox
2859 * @param textBox the textbox we want to set the background of
2860 * @param color the Color
2862 public static void setBackground(TextBox textBox, Color color) {
2863 ScilabTextBoxBridge.setBackground(textBox, color);
2867 * Get the Background color of the textbox
2868 * @param textBox the textbox we want to get the background of
2871 public static Color getBackground(TextBox textBox) {
2872 return ScilabTextBoxBridge.getBackground(textBox);
2876 * Set the Foreground color of the textbox
2877 * @param textBox the textbox we want to set the foreground of
2878 * @param color the Color
2880 public static void setForeground(TextBox textBox, Color color) {
2881 ScilabTextBoxBridge.setForeground(textBox, color);
2885 * Get the Foreground color of the textbox
2886 * @param textBox the textbox we want to get the foreground of
2889 public static Color getForeground(TextBox textBox) {
2890 return ScilabTextBoxBridge.getForeground(textBox);
2894 * Set the font of the textbox.
2895 * @param textBox the textbox we want to set the font of
2896 * @param font the font
2898 public static void setFont(TextBox textBox, Font font) {
2899 ScilabTextBoxBridge.setFont(textBox, font);
2903 * Get the font of the textbox.
2904 * @param textBox the textbox we want to get the font of
2907 public static Font getFont(TextBox textBox) {
2908 return ScilabTextBoxBridge.getFont(textBox);
2912 * Add a callback to the TextBox
2913 * @param textBox the TextBox we want to set the callback of
2914 * @param callback the CallBack to set.
2916 public static void setCallback(TextBox textBox, CommonCallBack callback) {
2917 ScilabTextBoxBridge.setCallback(textBox, callback);
2921 * Set the horizontal alignment for the TextBox text
2922 * @param textBox the TextBox we want to set the alignment of
2923 * @param alignment the value for the alignment (See ScilabAlignment.java)
2925 public static void setHorizontalAlignment(TextBox textBox, String alignment) {
2926 ScilabTextBoxBridge.setHorizontalAlignment(textBox, alignment);
2930 * Set the vertical alignment for the TextBox text
2931 * @param textBox the TextBox we want to set the alignment of
2932 * @param alignment the value for the alignment (See ScilabAlignment.java)
2934 public static void setVerticalAlignment(TextBox textBox, String alignment) {
2935 ScilabTextBoxBridge.setVerticalAlignment(textBox, alignment);
2939 * Set the Relief of the TextBox
2940 * @param textBox the TextBox which we want to set the Relief of
2941 * @param reliefType the type of the relief to set (See ScilabRelief.java)
2943 public static void setRelief(TextBox textBox, String reliefType) {
2944 ScilabTextBoxBridge.setRelief(textBox, reliefType);
2948 * Delete the TextBox
2949 * @param textBox the TextBox to be destroyed
2951 public static void destroy(TextBox textBox) {
2952 ScilabTextBoxBridge.destroy(textBox);
2956 * Give the focus to the TextBox
2957 * @param textBox the TextBox
2959 public static void requestFocus(TextBox textBox) {
2960 ScilabTextBoxBridge.requestFocus(textBox);
2963 /******************/
2964 /* EditBox Bridge */
2965 /******************/
2968 * Creates a new EditBox
2969 * @return the created EditBox
2971 public static SimpleEditBox createEditBox() {
2972 return ScilabEditBoxBridge.createEditBox();
2976 * Sets the Text of a EditBox
2977 * @param editBox the EditBox we want to set the Text of
2978 * @param newText the Text to set for the EditBox
2980 public static void setText(EditBox editBox, String newText) {
2981 ScilabEditBoxBridge.setText(editBox, newText);
2985 * Gets the text of an EditBox
2986 * @param editBox the EditBox we want to get the text of
2987 * @return the text of the EditBox
2989 public static String getText(EditBox editBox) {
2990 return ScilabEditBoxBridge.getText(editBox);
2994 * Draws a Scilab EditBox
2995 * @param editBox the EditBox to draw
2996 * @see org.scilab.modules.ihm.UIElement#draw()
2998 public static void draw(EditBox editBox) {
2999 ScilabEditBoxBridge.draw(editBox);
3003 * Gets the dimensions (width and height) of a Scilab EditBox
3004 * @param editBox the EditBox we want to get the dimensions of
3005 * @return the size of the editBox
3006 * @see org.scilab.modules.ihm.UIElement#getDims()
3008 public static Size getDims(EditBox editBox) {
3009 return ScilabEditBoxBridge.getDims(editBox);
3013 * Gets the position (X-coordinate and Y-coordinate) of a Scilab editBox
3014 * @param editBox the editBox we want to get the position of
3015 * @return the position of the editBox
3016 * @see org.scilab.modules.ihm.UIElement#getPosition()
3018 public static Position getPosition(EditBox editBox) {
3019 return ScilabEditBoxBridge.getPosition(editBox);
3023 * Gets the visibility status of a Scilab EditBox
3024 * @param editBox the editBox we want to get the visiblity status of
3025 * @return the visibility status of the editBox (true if the editBox is visible, false if not)
3026 * @see org.scilab.modules.ihm.UIElement#isVisible()
3028 public static boolean isVisible(EditBox editBox) {
3029 return ScilabEditBoxBridge.isVisible(editBox);
3033 * Sets the dimensions (width and height) of a Scilab EditBox
3034 * @param editBox the editBox we want to set the dimensions of
3035 * @param newSize the size we want to set to the editBox
3036 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
3038 public static void setDims(EditBox editBox, Size newSize) {
3039 ScilabEditBoxBridge.setDims(editBox, newSize);
3043 * Sets the position (X-coordinate and Y-coordinate) of a Scilab editBox
3044 * @param editBox the editBox we want to set the position of
3045 * @param newPosition the position we want to set to the editBox
3046 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
3048 public static void setPosition(EditBox editBox, Position newPosition) {
3049 ScilabEditBoxBridge.setPosition(editBox, newPosition);
3053 * Sets the visibility status of a Scilab EditBox
3054 * @param editBox the editBox we want to set the visiblity status of
3055 * @param newVisibleState the visibility status we want to set to the editBox (true to set the editBox visible, false else)
3056 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
3058 public static void setVisible(EditBox editBox, boolean newVisibleState) {
3059 ScilabEditBoxBridge.setVisible(editBox, newVisibleState);
3063 * Set the Background color of the EditBox
3064 * @param editBox the EditBox we want to set the background of
3065 * @param color the Color
3067 public static void setBackground(EditBox editBox, Color color) {
3068 ScilabEditBoxBridge.setBackground(editBox, color);
3072 * Get the Background color of the EditBox
3073 * @param editBox the EditBox we want to get the background of
3076 public static Color getBackground(EditBox editBox) {
3077 return ScilabEditBoxBridge.getBackground(editBox);
3081 * Set the Foreground color of the EditBox
3082 * @param editBox the EditBox we want to set the foreground of
3083 * @param color the Color
3085 public static void setForeground(EditBox editBox, Color color) {
3086 ScilabEditBoxBridge.setForeground(editBox, color);
3090 * Get the Foreground color of the EditBox
3091 * @param editBox the EditBox we want to get the foreground of
3094 public static Color getForeground(EditBox editBox) {
3095 return ScilabEditBoxBridge.getForeground(editBox);
3099 * Set the font of the EditBox.
3100 * @param editBox the EditBox we want to set the font of
3101 * @param font the font
3103 public static void setFont(EditBox editBox, Font font) {
3104 ScilabEditBoxBridge.setFont(editBox, font);
3108 * Get the font of the EditBox.
3109 * @param editBox the EditBox we want to get the font of
3112 public static Font getFont(EditBox editBox) {
3113 return ScilabEditBoxBridge.getFont(editBox);
3117 * Set if the EditBox is enabled or not
3118 * @param editBox the EditBox we want to set the status of
3119 * @param status true if the EditBox is enabled
3121 public static void setEnabled(EditBox editBox, boolean status) {
3122 ScilabEditBoxBridge.setEnabled(editBox, status);
3126 * Gets the enable status of an EditBox
3127 * @param editBox the EditBox we want to get the status of
3128 * @return the enable status of the EditBox (true if the EditBox is enabled, false if not)
3130 public static boolean isEnabled(EditBox editBox) {
3131 return ScilabEditBoxBridge.isEnabled(editBox);
3135 * Add a callback to the EditBox
3136 * @param editBox the EditBox we want to set the callback of
3137 * @param callback the Callback to set.
3139 public static void setCallback(EditBox editBox, CommonCallBack callback) {
3140 ScilabEditBoxBridge.setCallback(editBox, callback);
3144 * Set the horizontal alignment for the EditBox text
3145 * @param editBox the EditBox we want to set the alignment of
3146 * @param alignment the value for the alignment (See ScilabAlignment.java)
3148 public static void setHorizontalAlignment(EditBox editBox, String alignment) {
3149 ScilabEditBoxBridge.setHorizontalAlignment(editBox, alignment);
3153 * Set the vertical alignment for the EditBox text
3154 * @param editBox the EditBox we want to set the alignment of
3155 * @param alignment the value for the alignment (See ScilabAlignment.java)
3157 public static void setVerticalAlignment(EditBox editBox, String alignment) {
3158 ScilabEditBoxBridge.setVerticalAlignment(editBox, alignment);
3162 * Set the Relief of the EditBox
3163 * @param editBox the EditBox which we want to set the Relief of
3164 * @param reliefType the type of the relief to set (See ScilabRelief.java)
3166 public static void setRelief(EditBox editBox, String reliefType) {
3167 ScilabEditBoxBridge.setRelief(editBox, reliefType);
3171 * Delete the EditBox
3172 * @param editBox the EditBox to be destroyed
3174 public static void destroy(EditBox editBox) {
3175 ScilabEditBoxBridge.destroy(editBox);
3179 * Give the focus to the EditBox
3180 * @param editBox the EditBox
3182 public static void requestFocus(EditBox editBox) {
3183 ScilabEditBoxBridge.requestFocus(editBox);
3191 * Creates a new Label
3192 * @return the created Label
3194 public static SimpleLabel createLabel() {
3195 return ScilabLabelBridge.createLabel();
3199 * Sets the Text of a Label
3200 * @param label the Label we want to set the Text of
3201 * @param newText the Text to set for the Label
3203 public static void setText(Label label, String newText) {
3204 ScilabLabelBridge.setText(label, newText);
3208 * Gets the text of an Label
3209 * @param label the Label we want to get the text of
3210 * @return the text of the Label
3212 public static String getText(Label label) {
3213 return ScilabLabelBridge.getText(label);
3217 * Draws a Scilab Label
3218 * @param label the Label to draw
3219 * @see org.scilab.modules.ihm.UIElement#draw()
3221 public static void draw(Label label) {
3222 ScilabLabelBridge.draw(label);
3226 * Gets the dimensions (width and height) of a Scilab Label
3227 * @param label the Label we want to get the dimensions of
3228 * @return the size of the label
3229 * @see org.scilab.modules.ihm.UIElement#getDims()
3231 public static Size getDims(Label label) {
3232 return ScilabLabelBridge.getDims(label);
3236 * Gets the position (X-coordinate and Y-coordinate) of a Scilab label
3237 * @param label the label we want to get the position of
3238 * @return the position of the label
3239 * @see org.scilab.modules.ihm.UIElement#getPosition()
3241 public static Position getPosition(Label label) {
3242 return ScilabLabelBridge.getPosition(label);
3246 * Gets the visibility status of a Scilab Label
3247 * @param label the label we want to get the visiblity status of
3248 * @return the visibility status of the label (true if the label is visible, false if not)
3249 * @see org.scilab.modules.ihm.UIElement#isVisible()
3251 public static boolean isVisible(Label label) {
3252 return ScilabLabelBridge.isVisible(label);
3256 * Sets the dimensions (width and height) of a Scilab Label
3257 * @param label the label we want to set the dimensions of
3258 * @param newSize the size we want to set to the label
3259 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
3261 public static void setDims(Label label, Size newSize) {
3262 ScilabLabelBridge.setDims(label, newSize);
3266 * Sets the position (X-coordinate and Y-coordinate) of a Scilab label
3267 * @param label the label we want to set the position of
3268 * @param newPosition the position we want to set to the label
3269 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
3271 public static void setPosition(Label label, Position newPosition) {
3272 ScilabLabelBridge.setPosition(label, newPosition);
3276 * Sets the visibility status of a Scilab Label
3277 * @param label the label we want to set the visiblity status of
3278 * @param newVisibleState the visibility status we want to set to the label (true to set the label visible, false else)
3279 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
3281 public static void setVisible(Label label, boolean newVisibleState) {
3282 ScilabLabelBridge.setVisible(label, newVisibleState);
3286 * Set the Background color of the Label
3287 * @param label the Label we want to set the background of
3288 * @param color the Color
3290 public static void setBackground(Label label, Color color) {
3291 ScilabLabelBridge.setBackground(label, color);
3295 * Get the Background color of the Label
3296 * @param label the Label we want to get the background of
3299 public static Color getBackground(Label label) {
3300 return ScilabLabelBridge.getBackground(label);
3304 * Set the Foreground color of the Label
3305 * @param label the Label we want to set the foreground of
3306 * @param color the Color
3308 public static void setForeground(Label label, Color color) {
3309 ScilabLabelBridge.setForeground(label, color);
3313 * Get the Foreground color of the Label
3314 * @param label the Label we want to get the foreground of
3317 public static Color getForeground(Label label) {
3318 return ScilabLabelBridge.getForeground(label);
3322 * Set the font of the Label.
3323 * @param label the Label we want to set the font of
3324 * @param font the font
3326 public static void setFont(Label label, Font font) {
3327 ScilabLabelBridge.setFont(label, font);
3331 * Get the font of the Label.
3332 * @param label the Label we want to get the font of
3335 public static Font getFont(Label label) {
3336 return ScilabLabelBridge.getFont(label);
3340 * Set if the Label is enabled or not
3341 * @param label the Label we want to set the status of
3342 * @param status true if the Label is enabled
3344 public static void setEnabled(Label label, boolean status) {
3345 ScilabLabelBridge.setEnabled(label, status);
3349 * Gets the enable status of a Label
3350 * @param label the Label we want to get the status of
3351 * @return the enable status of the Label (true if the Label is enabled, false if not)
3353 public static boolean isEnabled(Label label) {
3354 return ScilabLabelBridge.isEnabled(label);
3358 * Add a callback to the Label
3359 * @param label the Label we want to set the callback of
3360 * @param callback the Callback to set.
3362 public static void setCallback(Label label, CommonCallBack callback) {
3363 ScilabLabelBridge.setCallback(label, callback);
3367 * Set the horizontal alignment for the Label text
3368 * @param label the Label we want to set the alignment of
3369 * @param alignment the value for the alignment (See ScilabAlignment.java)
3371 public static void setHorizontalAlignment(Label label, String alignment) {
3372 ScilabLabelBridge.setHorizontalAlignment(label, alignment);
3376 * Set the vertical alignment for the Label text
3377 * @param label the Label we want to set the alignment of
3378 * @param alignment the value for the alignment (See ScilabAlignment.java)
3380 public static void setVerticalAlignment(Label label, String alignment) {
3381 ScilabLabelBridge.setVerticalAlignment(label, alignment);
3385 * Set the Relief of the Label
3386 * @param label the Label which we want to set the Relief of
3387 * @param reliefType the type of the relief to set (See ScilabRelief.java)
3389 public static void setRelief(Label label, String reliefType) {
3390 ScilabLabelBridge.setRelief(label, reliefType);
3395 * @param label the Label to be destroyed
3397 public static void destroy(Label label) {
3398 ScilabLabelBridge.destroy(label);
3402 * Give the focus to the Label
3403 * @param label the Label
3405 public static void requestFocus(Label label) {
3406 ScilabLabelBridge.requestFocus(label);
3409 /*******************/
3410 /* CheckBox Bridge */
3411 /*******************/
3414 * Creates a new CheckBox
3415 * @return the created CheckBox
3417 public static SimpleCheckBox createCheckBox() {
3418 return ScilabCheckBoxBridge.createCheckBox();
3422 * Sets the Text of a CheckBox
3423 * @param checkBox the CheckBox we want to set the Text of
3424 * @param newText the Text to set for the CheckBox
3426 public static void setText(CheckBox checkBox, String newText) {
3427 ScilabCheckBoxBridge.setText(checkBox, newText);
3431 * Gets the text of an CheckBox
3432 * @param checkBox the CheckBox we want to get the text of
3433 * @return the text of the CheckBox
3435 public static String getText(CheckBox checkBox) {
3436 return ScilabCheckBoxBridge.getText(checkBox);
3440 * Draws a Scilab CheckBox
3441 * @param checkBox the CheckBox to draw
3442 * @see org.scilab.modules.ihm.UIElement#draw()
3444 public static void draw(CheckBox checkBox) {
3445 ScilabCheckBoxBridge.draw(checkBox);
3449 * Gets the dimensions (width and height) of a Scilab CheckBox
3450 * @param checkBox the CheckBox we want to get the dimensions of
3451 * @return the size of the checkBox
3452 * @see org.scilab.modules.ihm.UIElement#getDims()
3454 public static Size getDims(CheckBox checkBox) {
3455 return ScilabCheckBoxBridge.getDims(checkBox);
3459 * Gets the position (X-coordinate and Y-coordinate) of a Scilab checkBox
3460 * @param checkBox the checkBox we want to get the position of
3461 * @return the position of the checkBox
3462 * @see org.scilab.modules.ihm.UIElement#getPosition()
3464 public static Position getPosition(CheckBox checkBox) {
3465 return ScilabCheckBoxBridge.getPosition(checkBox);
3469 * Gets the visibility status of a Scilab CheckBox
3470 * @param checkBox the checkBox we want to get the visiblity status of
3471 * @return the visibility status of the checkBox (true if the checkBox is visible, false if not)
3472 * @see org.scilab.modules.ihm.UIElement#isVisible()
3474 public static boolean isVisible(CheckBox checkBox) {
3475 return ScilabCheckBoxBridge.isVisible(checkBox);
3479 * Sets the dimensions (width and height) of a Scilab CheckBox
3480 * @param checkBox the checkBox we want to set the dimensions of
3481 * @param newSize the size we want to set to the checkBox
3482 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
3484 public static void setDims(CheckBox checkBox, Size newSize) {
3485 ScilabCheckBoxBridge.setDims(checkBox, newSize);
3489 * Sets the position (X-coordinate and Y-coordinate) of a Scilab checkBox
3490 * @param checkBox the checkBox we want to set the position of
3491 * @param newPosition the position we want to set to the checkBox
3492 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
3494 public static void setPosition(CheckBox checkBox, Position newPosition) {
3495 ScilabCheckBoxBridge.setPosition(checkBox, newPosition);
3499 * Sets the visibility status of a Scilab CheckBox
3500 * @param checkBox the checkBox we want to set the visiblity status of
3501 * @param newVisibleState the visibility status we want to set to the checkBox (true to set the checkBox visible, false else)
3502 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
3504 public static void setVisible(CheckBox checkBox, boolean newVisibleState) {
3505 ScilabCheckBoxBridge.setVisible(checkBox, newVisibleState);
3509 * Set the Background color of the CheckBox
3510 * @param checkBox the CheckBox we want to set the background of
3511 * @param color the Color
3513 public static void setBackground(CheckBox checkBox, Color color) {
3514 ScilabCheckBoxBridge.setBackground(checkBox, color);
3518 * Get the Background color of the CheckBox
3519 * @param checkBox the CheckBox we want to get the background of
3522 public static Color getBackground(CheckBox checkBox) {
3523 return ScilabCheckBoxBridge.getBackground(checkBox);
3527 * Set the Foreground color of the CheckBox
3528 * @param checkBox the CheckBox we want to set the foreground of
3529 * @param color the Color
3531 public static void setForeground(CheckBox checkBox, Color color) {
3532 ScilabCheckBoxBridge.setForeground(checkBox, color);
3536 * Get the Foreground color of the CheckBox
3537 * @param checkBox the CheckBox we want to get the foreground of
3540 public static Color getForeground(CheckBox checkBox) {
3541 return ScilabCheckBoxBridge.getForeground(checkBox);
3545 * Set the font of the CheckBox.
3546 * @param checkBox the CheckBox we want to set the font of
3547 * @param font the font
3549 public static void setFont(CheckBox checkBox, Font font) {
3550 ScilabCheckBoxBridge.setFont(checkBox, font);
3554 * Get the font of the CheckBox.
3555 * @param checkBox the CheckBox we want to get the font of
3558 public static Font getFont(CheckBox checkBox) {
3559 return ScilabCheckBoxBridge.getFont(checkBox);
3563 * Set if the CheckBox is enabled or not
3564 * @param checkBox the CheckBox we want to set the status of
3565 * @param status true if the CheckBox is enabled
3567 public static void setEnabled(CheckBox checkBox, boolean status) {
3568 ScilabCheckBoxBridge.setEnabled(checkBox, status);
3572 * Gets the enable status of the CheckBox
3573 * @param checkBox the CheckBox we want to get the status of
3574 * @return the enable status of the CheckBox (true if the CheckBox is enabled, false if not)
3576 public static boolean isEnabled(CheckBox checkBox) {
3577 return ScilabCheckBoxBridge.isEnabled(checkBox);
3581 * Add a callback to the CheckBox
3582 * @param checkBox the CheckBox we want to set the callback of
3583 * @param callback the CallBack to set.
3585 public static void setCallback(CheckBox checkBox, CommonCallBack callback) {
3586 ScilabCheckBoxBridge.setCallback(checkBox, callback);
3590 * Set the horizontal alignment for the CheckBox text
3591 * @param checkBox the CheckBox we want to set the alignment of
3592 * @param alignment the value for the alignment (See ScilabAlignment.java)
3594 public static void setHorizontalAlignment(CheckBox checkBox, String alignment) {
3595 ScilabCheckBoxBridge.setHorizontalAlignment(checkBox, alignment);
3599 * Set the vertical alignment for the CheckBox text
3600 * @param checkBox the CheckBox we want to set the alignment of
3601 * @param alignment the value for the alignment (See ScilabAlignment.java)
3603 public static void setVerticalAlignment(CheckBox checkBox, String alignment) {
3604 ScilabCheckBoxBridge.setVerticalAlignment(checkBox, alignment);
3608 * Set if the CheckBox is checked or not
3609 * @param checkBox the CheckBox we want to set the status of
3610 * @param status true to set the CheckBox checked
3612 public static void setChecked(CheckBox checkBox, boolean status) {
3613 ScilabCheckBoxBridge.setChecked(checkBox, status);
3617 * Get the status of the CheckBox
3618 * @param checkBox the CheckBox we want to get the status of
3619 * @return true if the CheckBox is checked
3621 public static boolean isChecked(CheckBox checkBox) {
3622 return ScilabCheckBoxBridge.isChecked(checkBox);
3626 * Set the Relief of the CheckBox
3627 * @param checkBox the CheckBox which we want to set the Relief of
3628 * @param reliefType the type of the relief to set (See ScilabRelief.java)
3630 public static void setRelief(CheckBox checkBox, String reliefType) {
3631 ScilabCheckBoxBridge.setRelief(checkBox, reliefType);
3635 * Delete the CheckBox
3636 * @param checkBox the CheckBox to be destroyed
3638 public static void destroy(CheckBox checkBox) {
3639 ScilabCheckBoxBridge.destroy(checkBox);
3643 * Give the focus to the CheckBox
3644 * @param checkBox the CheckBox
3646 public static void requestFocus(CheckBox checkBox) {
3647 ScilabCheckBoxBridge.requestFocus(checkBox);
3650 /**********************/
3651 /* RadioButton Bridge */
3652 /**********************/
3655 * Creates a new RadioButton
3656 * @return the created RadioButton
3658 public static SimpleRadioButton createRadioButton() {
3659 return ScilabRadioButtonBridge.createRadioButton();
3663 * Sets the Text of a RadioButton
3664 * @param radioButton the RadioButton we want to set the Text of
3665 * @param newText the Text to set for the RadioButton
3667 public static void setText(RadioButton radioButton, String newText) {
3668 ScilabRadioButtonBridge.setText(radioButton, newText);
3672 * Gets the text of an RadioButton
3673 * @param radioButton the RadioButton we want to get the text of
3674 * @return the text of the RadioButton
3676 public static String getText(RadioButton radioButton) {
3677 return ScilabRadioButtonBridge.getText(radioButton);
3681 * Draws a Scilab RadioButton
3682 * @param radioButton the RadioButton to draw
3683 * @see org.scilab.modules.ihm.UIElement#draw()
3685 public static void draw(RadioButton radioButton) {
3686 ScilabRadioButtonBridge.draw(radioButton);
3690 * Gets the dimensions (width and height) of a Scilab RadioButton
3691 * @param radioButton the RadioButton we want to get the dimensions of
3692 * @return the size of the radioButton
3693 * @see org.scilab.modules.ihm.UIElement#getDims()
3695 public static Size getDims(RadioButton radioButton) {
3696 return ScilabRadioButtonBridge.getDims(radioButton);
3700 * Gets the position (X-coordinate and Y-coordinate) of a Scilab radioButton
3701 * @param radioButton the radioButton we want to get the position of
3702 * @return the position of the radioButton
3703 * @see org.scilab.modules.ihm.UIElement#getPosition()
3705 public static Position getPosition(RadioButton radioButton) {
3706 return ScilabRadioButtonBridge.getPosition(radioButton);
3710 * Gets the visibility status of a Scilab RadioButton
3711 * @param radioButton the radioButton we want to get the visiblity status of
3712 * @return the visibility status of the radioButton (true if the radioButton is visible, false if not)
3713 * @see org.scilab.modules.ihm.UIElement#isVisible()
3715 public static boolean isVisible(RadioButton radioButton) {
3716 return ScilabRadioButtonBridge.isVisible(radioButton);
3720 * Sets the dimensions (width and height) of a Scilab RadioButton
3721 * @param radioButton the radioButton we want to set the dimensions of
3722 * @param newSize the size we want to set to the radioButton
3723 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
3725 public static void setDims(RadioButton radioButton, Size newSize) {
3726 ScilabRadioButtonBridge.setDims(radioButton, newSize);
3730 * Sets the position (X-coordinate and Y-coordinate) of a Scilab radioButton
3731 * @param radioButton the radioButton we want to set the position of
3732 * @param newPosition the position we want to set to the radioButton
3733 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
3735 public static void setPosition(RadioButton radioButton, Position newPosition) {
3736 ScilabRadioButtonBridge.setPosition(radioButton, newPosition);
3740 * Sets the visibility status of a Scilab RadioButton
3741 * @param radioButton the radioButton we want to set the visiblity status of
3742 * @param newVisibleState the visibility status we want to set to the radioButton (true to set the radioButton visible, false else)
3743 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
3745 public static void setVisible(RadioButton radioButton, boolean newVisibleState) {
3746 ScilabRadioButtonBridge.setVisible(radioButton, newVisibleState);
3750 * Set the Background color of the RadioButton
3751 * @param radioButton the RadioButton we want to set the background of
3752 * @param color the Color
3754 public static void setBackground(RadioButton radioButton, Color color) {
3755 ScilabRadioButtonBridge.setBackground(radioButton, color);
3759 * Get the Background color of the RadioButton
3760 * @param radioButton the RadioButton we want to get the background of
3763 public static Color getBackground(RadioButton radioButton) {
3764 return ScilabRadioButtonBridge.getBackground(radioButton);
3768 * Set the Foreground color of the RadioButton
3769 * @param radioButton the RadioButton we want to set the foreground of
3770 * @param color the Color
3772 public static void setForeground(RadioButton radioButton, Color color) {
3773 ScilabRadioButtonBridge.setForeground(radioButton, color);
3777 * Get the Foreground color of the RadioButton
3778 * @param radioButton the RadioButton we want to get the foreground of
3781 public static Color getForeground(RadioButton radioButton) {
3782 return ScilabRadioButtonBridge.getForeground(radioButton);
3786 * Set the font of the RadioButton.
3787 * @param radioButton the RadioButton we want to set the font of
3788 * @param font the font
3790 public static void setFont(RadioButton radioButton, Font font) {
3791 ScilabRadioButtonBridge.setFont(radioButton, font);
3795 * Get the font of the RadioButton.
3796 * @param radioButton the RadioButton we want to get the font of
3799 public static Font getFont(RadioButton radioButton) {
3800 return ScilabRadioButtonBridge.getFont(radioButton);
3804 * Set if the RadioButton is enabled or not
3805 * @param radioButton the RadioButton we want to set the status of
3806 * @param status true if the RadioButton is enabled
3808 public static void setEnabled(RadioButton radioButton, boolean status) {
3809 ScilabRadioButtonBridge.setEnabled(radioButton, status);
3813 * Gets the enable status of a RadioButton
3814 * @param radioButton the RadioButton we want to get the status of
3815 * @return the enable status of the RadioButton (true if the RadioButton is enabled, false if not)
3817 public static boolean isEnabled(RadioButton radioButton) {
3818 return ScilabRadioButtonBridge.isEnabled(radioButton);
3822 * Add a callback to the RadioButton
3823 * @param radioButton the RadioButton we want to set the callback of
3824 * @param callback the callback to set.
3826 public static void setCallback(RadioButton radioButton, CommonCallBack callback) {
3827 ScilabRadioButtonBridge.setCallback(radioButton, callback);
3831 * Set the horizontal alignment for the RadioButton text
3832 * @param radioButton the RadioButton we want to set the alignment of
3833 * @param alignment the value for the alignment (See ScilabAlignment.java)
3835 public static void setHorizontalAlignment(RadioButton radioButton, String alignment) {
3836 ScilabRadioButtonBridge.setHorizontalAlignment(radioButton, alignment);
3840 * Set the vertical alignment for the RadioButton text
3841 * @param radioButton the RadioButton we want to set the alignment of
3842 * @param alignment the value for the alignment (See ScilabAlignment.java)
3844 public static void setVerticalAlignment(RadioButton radioButton, String alignment) {
3845 ScilabRadioButtonBridge.setVerticalAlignment(radioButton, alignment);
3849 * Set if the RadioButton is checked or not
3850 * @param radioButton the RadioButton we want to set the status of
3851 * @param status true to set the RadioButon checked
3853 public static void setChecked(RadioButton radioButton, boolean status) {
3854 ScilabRadioButtonBridge.setChecked(radioButton, status);
3858 * Get the status of the RadioButton
3859 * @param radioButton the RadioButton we want to get the status of
3860 * @return true if the RadioButton is checked
3862 public static boolean isChecked(RadioButton radioButton) {
3863 return ScilabRadioButtonBridge.isChecked(radioButton);
3867 * Set the Relief of the RadioButton
3868 * @param radioButton the RadioButton which we want to set the Relief of
3869 * @param reliefType the type of the relief to set (See ScilabRelief.java)
3871 public static void setRelief(RadioButton radioButton, String reliefType) {
3872 ScilabRadioButtonBridge.setRelief(radioButton, reliefType);
3876 * Delete the RadioButton
3877 * @param radioButton the RadioButton to be destroyed
3879 public static void destroy(RadioButton radioButton) {
3880 ScilabRadioButtonBridge.destroy(radioButton);
3884 * Give the focus to the RadioButton
3885 * @param radioButton the RadioButton
3887 public static void requestFocus(RadioButton radioButton) {
3888 ScilabRadioButtonBridge.requestFocus(radioButton);
3896 * Creates a new Slider
3897 * @return the created Slider
3899 public static SimpleSlider createSlider() {
3900 return ScilabSliderBridge.createSlider();
3904 * Sets the Text of a Slider
3905 * @param slider the Slider we want to set the Text of
3906 * @param newText the Text to set for the Slider
3908 public static void setText(Slider slider, String newText) {
3909 ScilabSliderBridge.setText(slider, newText);
3913 * Gets the text of an Slider
3914 * @param slider the Slider we want to get the text of
3915 * @return the text of the Slider
3917 public static String getText(Slider slider) {
3918 return ScilabSliderBridge.getText(slider);
3922 * Draws a Scilab Slider
3923 * @param slider the Slider to draw
3924 * @see org.scilab.modules.ihm.UIElement#draw()
3926 public static void draw(Slider slider) {
3927 ScilabSliderBridge.draw(slider);
3931 * Gets the dimensions (width and height) of a Scilab Slider
3932 * @param slider the Slider we want to get the dimensions of
3933 * @return the size of the slider
3934 * @see org.scilab.modules.ihm.UIElement#getDims()
3936 public static Size getDims(Slider slider) {
3937 return ScilabSliderBridge.getDims(slider);
3941 * Gets the position (X-coordinate and Y-coordinate) of a Scilab slider
3942 * @param slider the slider we want to get the position of
3943 * @return the position of the slider
3944 * @see org.scilab.modules.ihm.UIElement#getPosition()
3946 public static Position getPosition(Slider slider) {
3947 return ScilabSliderBridge.getPosition(slider);
3951 * Gets the visibility status of a Scilab Slider
3952 * @param slider the slider we want to get the visiblity status of
3953 * @return the visibility status of the slider (true if the slider is visible, false if not)
3954 * @see org.scilab.modules.ihm.UIElement#isVisible()
3956 public static boolean isVisible(Slider slider) {
3957 return ScilabSliderBridge.isVisible(slider);
3961 * Sets the dimensions (width and height) of a Scilab Slider
3962 * @param slider the slider we want to set the dimensions of
3963 * @param newSize the size we want to set to the slider
3964 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
3966 public static void setDims(Slider slider, Size newSize) {
3967 ScilabSliderBridge.setDims(slider, newSize);
3971 * Sets the position (X-coordinate and Y-coordinate) of a Scilab slider
3972 * @param slider the slider we want to set the position of
3973 * @param newPosition the position we want to set to the slider
3974 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
3976 public static void setPosition(Slider slider, Position newPosition) {
3977 ScilabSliderBridge.setPosition(slider, newPosition);
3981 * Sets the visibility status of a Scilab Slider
3982 * @param slider the slider we want to set the visiblity status of
3983 * @param newVisibleState the visibility status we want to set to the slider (true to set the slider visible, false else)
3984 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
3986 public static void setVisible(Slider slider, boolean newVisibleState) {
3987 ScilabSliderBridge.setVisible(slider, newVisibleState);
3991 * Set the Background color of the Slider
3992 * @param slider the Slider we want to set the background of
3993 * @param color the Color
3995 public static void setBackground(Slider slider, Color color) {
3996 ScilabSliderBridge.setBackground(slider, color);
4000 * Get the Background color of the Slider
4001 * @param slider the Slider we want to get the background of
4004 public static Color getBackground(Slider slider) {
4005 return ScilabSliderBridge.getBackground(slider);
4009 * Set the Foreground color of the Slider
4010 * @param slider the Slider we want to set the foreground of
4011 * @param color the Color
4013 public static void setForeground(Slider slider, Color color) {
4014 ScilabSliderBridge.setForeground(slider, color);
4018 * Get the Foreground color of the Slider
4019 * @param slider the Slider we want to get the foreground of
4022 public static Color getForeground(Slider slider) {
4023 return ScilabSliderBridge.getForeground(slider);
4027 * Set the font of the Slider.
4028 * @param slider the Slider we want to set the font of
4029 * @param font the font
4031 public static void setFont(Slider slider, Font font) {
4032 ScilabSliderBridge.setFont(slider, font);
4036 * Get the font of the Slider.
4037 * @param slider the Slider we want to get the font of
4040 public static Font getFont(Slider slider) {
4041 return ScilabSliderBridge.getFont(slider);
4045 * Set if the Slider is enabled or not
4046 * @param slider the Slider we want to set the status of
4047 * @param status true if the Slider is enabled
4049 public static void setEnabled(Slider slider, boolean status) {
4050 ScilabSliderBridge.setEnabled(slider, status);
4054 * Gets the enable status of an Slider
4055 * @param slider the Slider we want to get the status of
4056 * @return the enable status of the Slider (true if the Slider is enabled, false if not)
4058 public static boolean isEnabled(Slider slider) {
4059 return ScilabSliderBridge.isEnabled(slider);
4063 * Add a callback to the Slider
4064 * @param slider the Slider we want to set the callback of
4065 * @param callback the CallBack to set.
4067 public static void setCallback(Slider slider, CommonCallBack callback) {
4068 ScilabSliderBridge.setCallback(slider, callback);
4072 * Set the horizontal alignment for the Slider text
4073 * @param slider the Slider we want to set the alignment of
4074 * @param alignment the value for the alignment (See ScilabAlignment.java)
4076 public static void setHorizontalAlignment(Slider slider, String alignment) {
4077 ScilabSliderBridge.setHorizontalAlignment(slider, alignment);
4081 * Set the vertical alignment for the Slider text
4082 * @param slider the Slider we want to set the alignment of
4083 * @param alignment the value for the alignment (See ScilabAlignment.java)
4085 public static void setVerticalAlignment(Slider slider, String alignment) {
4086 ScilabSliderBridge.setVerticalAlignment(slider, alignment);
4090 * Set the minor tick spacing for a Slider
4091 * @param slider the Slider we want to set the spacing of
4092 * @param space the increment value
4094 public static void setMinorTickSpacing(Slider slider, int space) {
4095 ScilabSliderBridge.setMinorTickSpacing(slider, space);
4099 * Set the major tick spacing for a Slider
4100 * @param slider the Slider we want to set the spacing of
4101 * @param space the increment value
4103 public static void setMajorTickSpacing(Slider slider, int space) {
4104 ScilabSliderBridge.setMajorTickSpacing(slider, space);
4108 * Set the minimum value of a Slider
4109 * @param slider the Slider we want to set the minimum value of
4110 * @param value the minimum value
4112 public static void setMinimumValue(Slider slider, int value) {
4113 ScilabSliderBridge.setMinimumValue(slider, value);
4117 * Set the maximum value of a Slider
4118 * @param slider the Slider we want to set the maximum value of
4119 * @param value the maximum value
4121 public static void setMaximumValue(Slider slider, int value) {
4122 ScilabSliderBridge.setMaximumValue(slider, value);
4126 * Get the current value of the Slider
4127 * @param slider the Slider we want to get the value of
4128 * @return the current value of the Slider
4130 public static int getValue(Slider slider) {
4131 return ScilabSliderBridge.getValue(slider);
4135 * Sets the current value of the Slider
4136 * @param slider the Slider we want to set the value of
4137 * @param value the new value
4139 public static void setUserValue(Slider slider, int value) {
4140 ScilabSliderBridge.setUserValue(slider, value);
4144 * Set the Relief of the Slider
4145 * @param slider the Slider which we want to set the Relief of
4146 * @param reliefType the type of the relief to set (See ScilabRelief.java)
4148 public static void setRelief(Slider slider, String reliefType) {
4149 ScilabSliderBridge.setRelief(slider, reliefType);
4153 * Set the slider orientation to vertical
4154 * @param slider the slider we want to set the orientation of
4156 public static void setVertical(Slider slider) {
4157 ScilabSliderBridge.setVertical(slider);
4161 * Set the slider orientation to horizontal
4162 * @param slider the slider we want to set the orientation of
4164 public static void setHorizontal(Slider slider) {
4165 ScilabSliderBridge.setHorizontal(slider);
4170 * @param slider the Slider to be destroyed
4172 public static void destroy(Slider slider) {
4173 ScilabSliderBridge.destroy(slider);
4177 * Give the focus to the Slider
4178 * @param slider the Slider
4180 public static void requestFocus(Slider slider) {
4181 ScilabSliderBridge.requestFocus(slider);
4184 /******************/
4185 /* ListBox Bridge */
4186 /******************/
4189 * Creates a new ListBox
4190 * @return the created ListBox
4192 public static SimpleListBox createListBox() {
4193 return ScilabListBoxBridge.createListBox();
4197 * Sets the Text of a ListBox
4198 * @param listBox the ListBox we want to set the Text of
4199 * @param newText the Text to set for the ListBox
4201 public static void setText(ListBox listBox, String newText) {
4202 ScilabListBoxBridge.setText(listBox, newText);
4206 * Gets the text of an ListBox
4207 * @param listBox the ListBox we want to get the text of
4208 * @return the text of the ListBox
4210 public static String getText(ListBox listBox) {
4211 return ScilabListBoxBridge.getText(listBox);
4215 * Draws a Scilab ListBox
4216 * @param listBox the ListBox to draw
4217 * @see org.scilab.modules.ihm.UIElement#draw()
4219 public static void draw(ListBox listBox) {
4220 ScilabListBoxBridge.draw(listBox);
4224 * Gets the dimensions (width and height) of a Scilab ListBox
4225 * @param listBox the ListBox we want to get the dimensions of
4226 * @return the size of the listBox
4227 * @see org.scilab.modules.ihm.UIElement#getDims()
4229 public static Size getDims(ListBox listBox) {
4230 return ScilabListBoxBridge.getDims(listBox);
4234 * Gets the position (X-coordinate and Y-coordinate) of a Scilab listBox
4235 * @param listBox the listBox we want to get the position of
4236 * @return the position of the listBox
4237 * @see org.scilab.modules.ihm.UIElement#getPosition()
4239 public static Position getPosition(ListBox listBox) {
4240 return ScilabListBoxBridge.getPosition(listBox);
4244 * Gets the visibility status of a Scilab ListBox
4245 * @param listBox the listBox we want to get the visiblity status of
4246 * @return the visibility status of the listBox (true if the listBox is visible, false if not)
4247 * @see org.scilab.modules.ihm.UIElement#isVisible()
4249 public static boolean isVisible(ListBox listBox) {
4250 return ScilabListBoxBridge.isVisible(listBox);
4254 * Sets the dimensions (width and height) of a Scilab ListBox
4255 * @param listBox the listBox we want to set the dimensions of
4256 * @param newSize the size we want to set to the listBox
4257 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
4259 public static void setDims(ListBox listBox, Size newSize) {
4260 ScilabListBoxBridge.setDims(listBox, newSize);
4264 * Sets the position (X-coordinate and Y-coordinate) of a Scilab listBox
4265 * @param listBox the listBox we want to set the position of
4266 * @param newPosition the position we want to set to the listBox
4267 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
4269 public static void setPosition(ListBox listBox, Position newPosition) {
4270 ScilabListBoxBridge.setPosition(listBox, newPosition);
4274 * Sets the visibility status of a Scilab ListBox
4275 * @param listBox the listBox we want to set the visiblity status of
4276 * @param newVisibleState the visibility status we want to set to the listBox (true to set the listBox visible, false else)
4277 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
4279 public static void setVisible(ListBox listBox, boolean newVisibleState) {
4280 ScilabListBoxBridge.setVisible(listBox, newVisibleState);
4284 * Set the Background color of the ListBox
4285 * @param listBox the ListBox we want to set the background of
4286 * @param color the Color
4288 public static void setBackground(ListBox listBox, Color color) {
4289 ScilabListBoxBridge.setBackground(listBox, color);
4293 * Get the Background color of the ListBox
4294 * @param listBox the ListBox we want to get the background of
4297 public static Color getBackground(ListBox listBox) {
4298 return ScilabListBoxBridge.getBackground(listBox);
4302 * Set the Foreground color of the ListBox
4303 * @param listBox the ListBox we want to set the foreground of
4304 * @param color the Color
4306 public static void setForeground(ListBox listBox, Color color) {
4307 ScilabListBoxBridge.setForeground(listBox, color);
4311 * Get the Foreground color of the ListBox
4312 * @param listBox the ListBox we want to get the foreground of
4315 public static Color getForeground(ListBox listBox) {
4316 return ScilabListBoxBridge.getForeground(listBox);
4320 * Set the font of the ListBox.
4321 * @param listBox the ListBox we want to set the font of
4322 * @param font the font
4324 public static void setFont(ListBox listBox, Font font) {
4325 ScilabListBoxBridge.setFont(listBox, font);
4329 * Get the font of the ListBox.
4330 * @param listBox the ListBox we want to get the font of
4333 public static Font getFont(ListBox listBox) {
4334 return ScilabListBoxBridge.getFont(listBox);
4338 * Set if the ListBox is enabled or not
4339 * @param listBox the ListBox we want to set the status of
4340 * @param status true if the ListBox is enabled
4342 public static void setEnabled(ListBox listBox, boolean status) {
4343 ScilabListBoxBridge.setEnabled(listBox, status);
4347 * Gets the enable status of a ListBox
4348 * @param listBox the ListBox we want to get the status of
4349 * @return the enable status of the ListBox (true if the ListBox is enabled, false if not)
4351 public static boolean isEnabled(ListBox listBox) {
4352 return ScilabListBoxBridge.isEnabled(listBox);
4356 * Add a callback to the ListBox
4357 * @param listBox the ListBox we want to set the callback of
4358 * @param callback the Callback to set.
4360 public static void setCallback(ListBox listBox, CommonCallBack callback) {
4361 ScilabListBoxBridge.setCallback(listBox, callback);
4366 * Set the horizontal alignment for the ListBox text
4367 * @param listBox the ListBox we want to set the alignment of
4368 * @param alignment the value for the alignment (See ScilabAlignment.java)
4370 public static void setHorizontalAlignment(ListBox listBox, String alignment) {
4371 ScilabListBoxBridge.setHorizontalAlignment(listBox, alignment);
4375 * Set the vertical alignment for the ListBox text
4376 * @param listBox the ListBox we want to set the alignment of
4377 * @param alignment the value for the alignment (See ScilabAlignment.java)
4379 public static void setVerticalAlignment(ListBox listBox, String alignment) {
4380 ScilabListBoxBridge.setVerticalAlignment(listBox, alignment);
4384 * Set if more than one item can be selected in a ListBox
4385 * @param listBox the ListBox we want to set the status of
4386 * @param status true if multiple selection is enabled
4388 public static void setMultipleSelectionEnabled(ListBox listBox, boolean status) {
4389 ScilabListBoxBridge.setMultipleSelectionEnabled(listBox, status);
4393 * Set the selected indices of the ListBox
4394 * @param listBox the ListBox we want to set the selected indices of
4395 * @param indices the indices of the items to be selected
4397 public static void setSelectedIndices(ListBox listBox, int[] indices) {
4398 ScilabListBoxBridge.setSelectedIndices(listBox, indices);
4402 * Get the selected indices of the ListBox
4403 * @param listBox the ListBox we want to get the selected indices of
4404 * @return the indices of the items selected
4406 public static int[] getSelectedIndices(ListBox listBox) {
4407 return ScilabListBoxBridge.getSelectedIndices(listBox);
4411 * Get the number of items selected in the ListBox
4412 * @param listBox the ListBox we want to get the selection size of
4413 * @return the number of items selected
4415 public static int getSelectionSize(ListBox listBox) {
4416 return ScilabListBoxBridge.getSelectionSize(listBox);
4420 * Get the text of all the list items
4421 * @param listBox the ListBox we want to get the items text of
4422 * @return the text items
4423 * @see org.scilab.modules.gui.listbox.ListBox#getAllItemsText()
4425 public static String[] getAllItemsText(ListBox listBox) {
4426 return ScilabListBoxBridge.getAllItemsText(listBox);
4430 * Get the number of items in the list
4431 * @param listBox the ListBox we want to get the items number of
4432 * @return the number of items
4433 * @see org.scilab.modules.gui.listbox.ListBox#getNumberOfItems()
4435 public static int getNumberOfItems(ListBox listBox) {
4436 return ScilabListBoxBridge.getNumberOfItems(listBox);
4440 * Set the text of the list items
4441 * @param listBox the ListBox we want to set the items text of
4442 * @param text the text of the items
4443 * @see org.scilab.modules.gui.listbox.ListBox#setText(java.lang.String[])
4445 public static void setText(ListBox listBox, String[] text) {
4446 ScilabListBoxBridge.setText(listBox, text);
4450 * Set the Relief of the ListBox
4451 * @param listBox the ListBox which we want to set the Relief of
4452 * @param reliefType the type of the relief to set (See ScilabRelief.java)
4454 public static void setRelief(ListBox listBox, String reliefType) {
4455 ScilabListBoxBridge.setRelief(listBox, reliefType);
4459 * Delete the ListBox
4460 * @param listBox the ListBox to be destroyed
4462 public static void destroy(ListBox listBox) {
4463 ScilabListBoxBridge.destroy(listBox);
4467 * Give the focus to the ListBox
4468 * @param listBox the ListBox
4470 public static void requestFocus(ListBox listBox) {
4471 ScilabListBoxBridge.requestFocus(listBox);
4475 * Adjusts the view so that the element given by index is displayed at the top of the ListBox.
4476 * @param listBox the ListBox
4477 * @param index the index of the element to be displayed at the top of the ListBox.
4479 public static void setListBoxTop(ListBox listBox, int index) {
4480 ScilabListBoxBridge.setListBoxTop(listBox, index);
4484 * Gets the index of the element displayed at the top of the ListBox
4485 * @param listBox the ListBox
4486 * @return the index of the element displayed at the top of the ListBox
4488 public static int getListBoxTop(ListBox listBox) {
4489 return ScilabListBoxBridge.getListBoxTop(listBox);
4492 /********************/
4493 /* PopupMenu Bridge */
4494 /********************/
4497 * Creates a new PopupMenu
4498 * @return the created PopupMenu
4500 public static SimplePopupMenu createPopupMenu() {
4501 return ScilabPopupMenuBridge.createPopupMenu();
4505 * Sets the Text of a PopupMenu
4506 * @param popupMenu the PopupMenu we want to set the Text of
4507 * @param newText the Text to set for the PopupMenu
4509 public static void setText(PopupMenu popupMenu, String newText) {
4510 ScilabPopupMenuBridge.setText(popupMenu, newText);
4514 * Gets the text of an PopupMenu
4515 * @param popupMenu the PopupMenu we want to get the text of
4516 * @return the text of the PopupMenu
4518 public static String getText(PopupMenu popupMenu) {
4519 return ScilabPopupMenuBridge.getText(popupMenu);
4523 * Draws a Scilab PopupMenu
4524 * @param popupMenu the PopupMenu to draw
4525 * @see org.scilab.modules.ihm.UIElement#draw()
4527 public static void draw(PopupMenu popupMenu) {
4528 ScilabPopupMenuBridge.draw(popupMenu);
4532 * Gets the dimensions (width and height) of a Scilab PopupMenu
4533 * @param popupMenu the PopupMenu we want to get the dimensions of
4534 * @return the size of the popupMenu
4535 * @see org.scilab.modules.ihm.UIElement#getDims()
4537 public static Size getDims(PopupMenu popupMenu) {
4538 return ScilabPopupMenuBridge.getDims(popupMenu);
4542 * Gets the position (X-coordinate and Y-coordinate) of a Scilab popupMenu
4543 * @param popupMenu the popupMenu we want to get the position of
4544 * @return the position of the popupMenu
4545 * @see org.scilab.modules.ihm.UIElement#getPosition()
4547 public static Position getPosition(PopupMenu popupMenu) {
4548 return ScilabPopupMenuBridge.getPosition(popupMenu);
4552 * Gets the visibility status of a Scilab PopupMenu
4553 * @param popupMenu the popupMenu we want to get the visiblity status of
4554 * @return the visibility status of the popupMenu (true if the popupMenu is visible, false if not)
4555 * @see org.scilab.modules.ihm.UIElement#isVisible()
4557 public static boolean isVisible(PopupMenu popupMenu) {
4558 return ScilabPopupMenuBridge.isVisible(popupMenu);
4562 * Sets the dimensions (width and height) of a Scilab PopupMenu
4563 * @param popupMenu the popupMenu we want to set the dimensions of
4564 * @param newSize the size we want to set to the popupMenu
4565 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
4567 public static void setDims(PopupMenu popupMenu, Size newSize) {
4568 ScilabPopupMenuBridge.setDims(popupMenu, newSize);
4572 * Sets the position (X-coordinate and Y-coordinate) of a Scilab popupMenu
4573 * @param popupMenu the popupMenu we want to set the position of
4574 * @param newPosition the position we want to set to the popupMenu
4575 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
4577 public static void setPosition(PopupMenu popupMenu, Position newPosition) {
4578 ScilabPopupMenuBridge.setPosition(popupMenu, newPosition);
4582 * Sets the visibility status of a Scilab PopupMenu
4583 * @param popupMenu the popupMenu we want to set the visiblity status of
4584 * @param newVisibleState the visibility status we want to set to the popupMenu (true to set the popupMenu visible, false else)
4585 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
4587 public static void setVisible(PopupMenu popupMenu, boolean newVisibleState) {
4588 ScilabPopupMenuBridge.setVisible(popupMenu, newVisibleState);
4592 * Set the Background color of the PopupMenu
4593 * @param popupMenu the PopupMenu we want to set the background of
4594 * @param color the Color
4596 public static void setBackground(PopupMenu popupMenu, Color color) {
4597 ScilabPopupMenuBridge.setBackground(popupMenu, color);
4601 * Get the Background color of the PopupMenu
4602 * @param popupMenu the PopupMenu we want to get the background of
4605 public static Color getBackground(PopupMenu popupMenu) {
4606 return ScilabPopupMenuBridge.getBackground(popupMenu);
4610 * Set the Foreground color of the PopupMenu
4611 * @param popupMenu the PopupMenu we want to set the foreground of
4612 * @param color the Color
4614 public static void setForeground(PopupMenu popupMenu, Color color) {
4615 ScilabPopupMenuBridge.setForeground(popupMenu, color);
4619 * Get the Foreground color of the PopupMenu
4620 * @param popupMenu the PopupMenu we want to get the foreground of
4623 public static Color getForeground(PopupMenu popupMenu) {
4624 return ScilabPopupMenuBridge.getForeground(popupMenu);
4628 * Set the font of the PopupMenu.
4629 * @param popupMenu the PopupMenu we want to set the font of
4630 * @param font the font
4632 public static void setFont(PopupMenu popupMenu, Font font) {
4633 ScilabPopupMenuBridge.setFont(popupMenu, font);
4637 * Get the font of the PopupMenu.
4638 * @param popupMenu the PopupMenu we want to get the font of
4641 public static Font getFont(PopupMenu popupMenu) {
4642 return ScilabPopupMenuBridge.getFont(popupMenu);
4646 * Set if the PopupMenu is enabled or not
4647 * @param popupMenu the PopupMenu we want to set the status of
4648 * @param status true if the PopupMenu is enabled
4650 public static void setEnabled(PopupMenu popupMenu, boolean status) {
4651 ScilabPopupMenuBridge.setEnabled(popupMenu, status);
4655 * Gets the enable status of a PopupMenu
4656 * @param popupMenu the PopupMenu we want to get the status of
4657 * @return the enable status of the PopupMenu (true if the PopupMenu is enabled, false if not)
4659 public static boolean isEnabled(PopupMenu popupMenu) {
4660 return ScilabPopupMenuBridge.isEnabled(popupMenu);
4664 * Add a callback to the PopupMenu
4665 * @param popupMenu the PopupMenu we want to set the callback of
4666 * @param callback the CallBack to set.
4668 public static void setCallback(PopupMenu popupMenu, CommonCallBack callback) {
4669 ScilabPopupMenuBridge.setCallback(popupMenu, callback);
4673 * Set the horizontal alignment for the PopupMenu text
4674 * @param popupMenu the PopupMenu we want to set the alignment of
4675 * @param alignment the value for the alignment (See ScilabAlignment.java)
4677 public static void setHorizontalAlignment(PopupMenu popupMenu, String alignment) {
4678 ScilabPopupMenuBridge.setHorizontalAlignment(popupMenu, alignment);
4682 * Set the vertical alignment for the PopupMenu text
4683 * @param popupMenu the PopupMenu we want to set the alignment of
4684 * @param alignment the value for the alignment (See ScilabAlignment.java)
4686 public static void setVerticalAlignment(PopupMenu popupMenu, String alignment) {
4687 ScilabPopupMenuBridge.setVerticalAlignment(popupMenu, alignment);
4691 * Set the selected index of the ListBox
4692 * @param popupMenu the PopupMenu we want to set the selected index of
4693 * @param index the index of the item to be selected
4695 public static void setUserSelectedIndex(PopupMenu popupMenu, int index) {
4696 ScilabPopupMenuBridge.setUserSelectedIndex(popupMenu, index);
4700 * Get the selected index of the ListBox
4701 * @param popupMenu the PopupMenu we want to get the selected index of
4702 * @return the index of the item selected
4704 public static int getUserSelectedIndex(PopupMenu popupMenu) {
4705 return ScilabPopupMenuBridge.getUserSelectedIndex(popupMenu);
4709 * Get the text of all the PopupMenu items
4710 * @param popupMenu the PopupMenu we want to get the items of
4711 * @return the text items
4713 public static String[] getAllItemsText(PopupMenu popupMenu) {
4714 return ScilabPopupMenuBridge.getAllItemsText(popupMenu);
4718 * Get the number of items in the PopupMenu
4719 * @param popupMenu the PopupMenu we want to get the items number of
4720 * @return the number of items
4722 public static int getNumberOfItems(PopupMenu popupMenu) {
4723 return ScilabPopupMenuBridge.getNumberOfItems(popupMenu);
4727 * Set the text of the PopupMenu items
4728 * @param popupMenu the PopupMenu we want to set the text items of
4729 * @param text the text of the items
4731 public static void setText(PopupMenu popupMenu, String[] text) {
4732 ScilabPopupMenuBridge.setText(popupMenu, text);
4736 * Set the Relief of the PopupMenu
4737 * @param popupMenu the PopupMenu which we want to set the Relief of
4738 * @param reliefType the type of the relief to set (See ScilabRelief.java)
4740 public static void setRelief(PopupMenu popupMenu, String reliefType) {
4741 ScilabPopupMenuBridge.setRelief(popupMenu, reliefType);
4745 * Delete the PopupMenu
4746 * @param popupMenu the PopupMenu to be destroyed
4748 public static void destroy(PopupMenu popupMenu) {
4749 ScilabPopupMenuBridge.destroy(popupMenu);
4753 * Give the focus to the PopupMenu
4754 * @param popupMenu the PopupMenu
4756 public static void requestFocus(PopupMenu popupMenu) {
4757 ScilabPopupMenuBridge.requestFocus(popupMenu);
4760 /*********************/
4761 /* FlowLayout Bridge */
4762 /*********************/
4764 * Creates a new FlowLayout
4765 * @return the created FlowLayout
4767 public static FlowLayout createFlowLayout() {
4768 return ScilabFlowLayoutBridge.createFlowLayout();
4771 /***********************/
4772 /* BorderLayout Bridge */
4773 /***********************/
4775 * Creates a new BorderLayout
4776 * @return the created BorderLayout
4778 public static BorderLayout createBorderLayout() {
4779 return ScilabBorderLayoutBridge.createBorderLayout();
4782 /***********************/
4783 /* FileChooser Bridge */
4784 /***********************/
4787 * Create a new FileChooser
4788 * @return the created FileChooser
4790 public static SimpleFileChooser createFileChooser() {
4791 return ScilabFileChooserBridge.createFileChooser();
4795 * Create a new ExportFileChooser
4796 * @param figureID exported figure id
4797 * @return the created ExportFileChooser
4799 public static SimpleFileChooser createExportFileChooser(String figureUID) {
4800 return ScilabFileChooserBridge.createExportFileChooser(figureUID);
4804 * Set the title of the file chooser
4805 * @param fileChooser the file chooser we want to set the title of
4806 * @param title the title to set
4808 public static void setTitle(FileChooser fileChooser, String title) {
4809 ScilabFileChooserBridge.setTitle(fileChooser, title);
4813 * Set the initial directory used for file search
4814 * @param fileChooser the file chooser we want to set the initial directory of
4815 * @param path the default path
4817 public static void setInitialDirectory(FileChooser fileChooser, String path) {
4818 ScilabFileChooserBridge.setInitialDirectory(fileChooser, path);
4822 * Display this chooser and wait for user selection
4823 * @param fileChooser the file chooser we want to display
4825 public static void displayAndWait(FileChooser fileChooser) {
4826 ScilabFileChooserBridge.displayAndWait(fileChooser);
4830 * Get the number of files selected
4831 * @param fileChooser the file chooser we want to get the selection size of
4832 * @return the number of files selected
4834 public static int getSelectionSize(FileChooser fileChooser) {
4835 return ScilabFileChooserBridge.getSelectionSize(fileChooser);
4839 * Get the names of selected files
4840 * @param fileChooser the file chooser we want to get the selection of
4841 * @return the names of selected files
4843 public static String[] getSelection(FileChooser fileChooser) {
4844 return ScilabFileChooserBridge.getSelection(fileChooser);
4848 * Get the names of selected files
4849 * @param fileChooser the file chooser we want to get the selection of
4850 * @return the names of selected files
4852 public static String[] getSelectionFileNames(FileChooser fileChooser) {
4853 return ScilabFileChooserBridge.getSelectionFileNames(fileChooser);
4857 * Set the flag indicating that we want only select directories
4858 * @param fileChooser the file chooser we want to set the flag of
4860 public static void setDirectorySelectionOnly(FileChooser fileChooser) {
4861 ScilabFileChooserBridge.setDirectorySelectionOnly(fileChooser);
4865 * We customize the file chooser for the graphic export
4866 * by adding format selection
4868 public static void exportCustomFileChooser() {
4869 ScilabFileChooserBridge.createFileChooser();
4873 * Enable the multiple selection
4874 * @param fileChooser the file chooser we want to get the muliple selection
4875 * @param multipleSelection boolean for the multiple selection
4877 public static void setMultipleSelection(FileChooser fileChooser, boolean multipleSelection) {
4878 ScilabFileChooserBridge.setMultipleSelection(fileChooser, multipleSelection);
4882 * Get the path name of selected files
4883 * @param fileChooser the file chooser we want to get the path of selectd files
4884 * @return the path of selected files
4886 public static String getSelectionPathName(FileChooser fileChooser) {
4887 return ScilabFileChooserBridge.getSelectionPathName(fileChooser);
4891 * Get the filter index
4892 * @param fileChooser the file chooser we want to get the filter indexs
4893 * @return the filter index
4895 public static int getFilterIndex(FileChooser fileChooser) {
4896 return ScilabFileChooserBridge.getFilterIndex(fileChooser);
4900 * Set the dialog type (save or open a file ?)
4901 * @param fileChooser the file chooser we want to get the filter indexs
4902 * @param dialogType the dialog type
4904 public static void setUiDialogType(FileChooser fileChooser, int dialogType) {
4905 ScilabFileChooserBridge.setUiDialogType(fileChooser, dialogType);
4908 /*********************/
4909 /* MessageBox Bridge */
4910 /*********************/
4913 * Create a new MessageBox
4914 * @return the created MessageBox
4916 public static SimpleMessageBox createMessageBox() {
4917 return ScilabMessageBoxBridge.createMessageBox();
4921 * Set the title of the MessageBox
4922 * @param messageBox the MessageBox we want to set the title of
4923 * @param title the title to set
4925 public static void setTitle(MessageBox messageBox, String title) {
4926 ScilabMessageBoxBridge.setTitle(messageBox, title);
4930 * Set the message of the MessageBox
4931 * @param messageBox the MessageBox we want to set the mask of
4932 * @param message the message to set
4934 public static void setMessage(MessageBox messageBox, String message) {
4935 ScilabMessageBoxBridge.setMessage(messageBox, message);
4939 * Set the message of the MessageBox (multi-line)
4940 * @param messageBox the MessageBox we want to set the mask of
4941 * @param message the message to set
4943 public static void setMessage(MessageBox messageBox, String[] message) {
4944 ScilabMessageBoxBridge.setMessage(messageBox, message);
4948 * Display this MessageBox and wait for user selection
4949 * @param messageBox the MessageBox we want to display
4951 public static void displayAndWait(MessageBox messageBox) {
4952 ScilabMessageBoxBridge.displayAndWait(messageBox);
4956 * Get the index of the button clicked
4957 * @param messageBox the MessageBox we want to get the answer of
4958 * @return the index of the button clicked
4960 public static int getSelectedButton(MessageBox messageBox) {
4961 return ScilabMessageBoxBridge.getSelectedButton(messageBox);
4965 * Set the indices of the default selected buttons (x_choices)
4966 * @param messageBox the MessageBox we want to set the defaults of
4967 * @param indices the indices of the default selected buttons
4969 public static void setDefaultSelectedButtons(MessageBox messageBox, int[] indices) {
4970 ScilabMessageBoxBridge.setDefaultSelectedButtons(messageBox, indices);
4974 * Get the indices of the user selected buttons (x_choices)
4975 * @param messageBox the MessageBox we want to set the defaults of
4976 * @return the indices of the default selected buttons
4978 public static int[] getUserSelectedButtons(MessageBox messageBox) {
4979 return ScilabMessageBoxBridge.getUserSelectedButtons(messageBox);
4983 * Set the labels of the buttons in the MessageBox
4984 * @param messageBox the MessageBox we want to set the buttons labels of
4985 * @param labels the labels of the buttons
4987 public static void setButtonsLabels(MessageBox messageBox, String[] labels) {
4988 ScilabMessageBoxBridge.setButtonsLabels(messageBox, labels);
4992 * Set the initial values of the editable zone in the MessageBox
4993 * @param messageBox the MessageBox we want to set the initial value of
4994 * @param value the initial values
4996 public static void setInitialValue(MessageBox messageBox, String[] value) {
4997 ScilabMessageBoxBridge.setInitialValue(messageBox, value);
5001 * Get the value of the editable zone in the MessageBox
5002 * @param messageBox the MessageBox we want to get the value of
5005 public static String[] getValue(MessageBox messageBox) {
5006 return ScilabMessageBoxBridge.getValue(messageBox);
5010 * Get the size of the value of the editable zone in the MessageBox
5011 * @param messageBox the MessageBox we want to get the value size of
5012 * @return the value size
5014 public static int getValueSize(MessageBox messageBox) {
5015 return ScilabMessageBoxBridge.getValueSize(messageBox);
5019 * Set the items of the listbox in the MessageBox
5020 * @param messageBox the MessageBox we want to set the items of
5021 * @param items the items to set
5023 public static void setListBoxItems(MessageBox messageBox, String[] items) {
5024 ScilabMessageBoxBridge.setListBoxItems(messageBox, items);
5028 * Get the index of the selected item in the listbox in the MessageBox
5029 * @param messageBox the MessageBox we want to get the selected item of
5032 public static int getSelectedItem(MessageBox messageBox) {
5033 return ScilabMessageBoxBridge.getSelectedItem(messageBox);
5037 * Set the name of the lines labels in the editable zone in the MessageBox
5038 * @param messageBox the MessageBox we want to set the labels
5039 * @param labels the labels
5041 public static void setLineLabels(MessageBox messageBox, String[] labels) {
5042 ScilabMessageBoxBridge.setLineLabels(messageBox, labels);
5046 * Set the name of the columns labels in the editable zone in the MessageBox
5047 * @param messageBox the MessageBox we want to set the labels
5048 * @param labels the labels
5050 public static void setColumnLabels(MessageBox messageBox, String[] labels) {
5051 ScilabMessageBoxBridge.setColumnLabels(messageBox, labels);
5055 * Set the default values of a multi-value editable zone in the MessageBox
5056 * @param messageBox the MessageBox we want to set the default values
5057 * @param values the values
5059 public static void setDefaultInput(MessageBox messageBox, String[] values) {
5060 ScilabMessageBoxBridge.setDefaultInput(messageBox, values);
5064 * Set a MessageBox modal or not
5065 * @param messageBox the MessageBox we want to set the modality of
5066 * @param status true to set the MessageBox modal and false else
5068 public static void setModal(MessageBox messageBox, boolean status) {
5069 ScilabMessageBoxBridge.setModal(messageBox, status);
5073 * Set the MessageBox icon
5074 * @param messageBox the MessageBox we want to set the icon of
5075 * @param name the name of the icon
5077 public static void setIcon(MessageBox messageBox, String name) {
5078 ScilabMessageBoxBridge.setIcon(messageBox, name);
5082 * Set the component used to set the location of the MessageBox (default is Scilab Console)
5083 * @param messageBox the MessageBox we want to set the parent of
5084 * @param parent the tab to be set as parent
5086 public static void setParentForLocation(MessageBox messageBox, SimpleTab parent) {
5087 ScilabMessageBoxBridge.setParentForLocation(messageBox, parent);
5090 /***********************/
5091 /* Help Browser Bridge */
5092 /***********************/
5095 * Create a new Help Browser
5096 * @param helps help chapters and directories
5097 * @param language Scilab current language
5098 * @return the created Help Browser
5100 public static SimpleHelpBrowser createHelpBrowser(String[] helps, String language) {
5101 return ScilabHelpBrowserBridge.createHelpBrowser(helps, language);
5105 * Display the Help Browser
5106 * @param browser the Help Browser
5108 public static void display(HelpBrowser browser) {
5109 ScilabHelpBrowserBridge.display(browser);
5113 * Display the matching items for a specified keyword
5114 * @param browser the Help Browser
5115 * @param keyword the keyword
5117 public static void searchKeywork(HelpBrowser browser, String keyword) {
5118 ScilabHelpBrowserBridge.searchKeywork(browser, keyword);
5122 * Display the result of a full-text search for a specified word
5123 * @param browser the Help Browser
5124 * @param keyword the keyword
5126 public static void fullTextSearch(HelpBrowser browser, String keyword) {
5127 ScilabHelpBrowserBridge.fullTextSearch(browser, keyword);
5131 * Close the HelpBrowser
5132 * @param browser the Help Browser
5134 public static void close(HelpBrowser browser) {
5135 ScilabHelpBrowserBridge.close(browser);
5138 /***********************/
5139 /* FontChooser Bridge */
5140 /***********************/
5143 * Create a new FontChooser
5144 * @param font the default font
5145 * @return the created FontChooser
5147 public static SimpleFontChooser createFontChooser(Font font) {
5148 return ScilabFontChooserBridge.createFontChooser(font);
5152 * Retrieve the selected font, or null
5153 * @param fontChooser the FontChooser
5154 * @return the selected font
5156 public static Font getSelectedFont(FontChooser fontChooser) {
5157 return ScilabFontChooserBridge.getSelectedFont(fontChooser);
5161 * Set the default font name
5162 * @param fontChooser the FontChooser
5163 * @param fontName the default font name
5165 public static void setDefaultFontName(FontChooser fontChooser, String fontName) {
5166 ScilabFontChooserBridge.setDefaultFontName(fontChooser, fontName);
5170 * Set the default font size
5171 * @param fontChooser the FontChooser
5172 * @param fontSize the default font size
5174 public static void setDefaultFontSize(FontChooser fontChooser, int fontSize) {
5175 ScilabFontChooserBridge.setDefaultFontSize(fontChooser, fontSize);
5179 * Set the default font bold attribute
5180 * @param fontChooser the FontChooser
5181 * @param bold the default font bold attribute
5183 public static void setDefaultBold(FontChooser fontChooser, boolean bold) {
5184 ScilabFontChooserBridge.setDefaultBold(fontChooser, bold);
5188 * Set the default font italic attribute
5189 * @param fontChooser the FontChooser
5190 * @param italic the default font italic attribute
5192 public static void setDefaultItalic(FontChooser fontChooser, boolean italic) {
5193 ScilabFontChooserBridge.setDefaultItalic(fontChooser, italic);
5197 * Display the font chooser and wait for a user input
5198 * @param fontChooser the FontChooser
5200 public static void displayAndWait(FontChooser fontChooser) {
5201 ScilabFontChooserBridge.displayAndWait(fontChooser);
5204 /***********************/
5205 /* ColorChooser Bridge */
5206 /***********************/
5209 * Create a new ColorChooser
5210 * @param color the default color
5211 * @return the created ColorChooser
5213 public static SimpleColorChooser createColorChooser(Color color) {
5214 return ScilabColorChooserBridge.createColorChooser(color);
5218 * Set the title of the ColorChooser
5219 * @param colorChooser the ColorChooser
5220 * @param title the title to set
5222 public static void setTitle(ColorChooser colorChooser, String title) {
5223 ScilabColorChooserBridge.setTitle(colorChooser, title);
5227 * Retrieve the selected color, or null
5228 * @param colorChooser the ColorChooser
5229 * @return the selected color
5231 public static Color getSelectedColor(ColorChooser colorChooser) {
5232 return ScilabColorChooserBridge.getSelectedColor(colorChooser);
5236 * Set the default color
5237 * @param colorChooser the ColorChooser
5238 * @param color the default color
5240 public static void setDefaultColor(ColorChooser colorChooser, Color color) {
5241 ScilabColorChooserBridge.setDefaultColor(colorChooser, color);
5245 * Display the font chooser and wait for a user input
5246 * @param colorChooser the ColorChooser
5248 public static void displayAndWait(ColorChooser colorChooser) {
5249 ScilabColorChooserBridge.displayAndWait(colorChooser);
5253 /******************/
5255 /******************/
5258 * Display a given tree
5259 * @param tree a tree structure
5261 public static void showTree(Tree tree) {
5262 ScilabTreeBridge.showTree(tree);
5266 * Create a Scilab Tree
5267 * @param scilabTree a tree structure
5268 * @return a graphical tree
5270 public static SimpleTree createTree(Tree scilabTree) {
5271 return ScilabTreeBridge.createTree(scilabTree);
5275 * Function help on the keyword
5276 * @param console scilab console
5278 public static void helpOnTheKeyword(ScilabConsole console) {
5279 ScilabConsoleBridge.helpOnTheKeyword(console);
5284 * Evaluate the selection with echo
5285 * @param console the console
5287 public static void evaluateSelectionWithEcho(ScilabConsole console) {
5288 ScilabConsoleBridge.evaluateSelectionWithEcho(console);
5292 * Evaluate the selection with no echo
5293 * @param console the console
5295 public static void evaluateSelectionWithNoEcho(ScilabConsole console) {
5296 ScilabConsoleBridge.evaluateSelectionWithNoEcho(console);
5299 /**********************/
5300 /* UiTable Bridge */
5301 /**********************/
5304 * Creates a new UiTable
5305 * @return the created UiTable
5307 public static SimpleUiTable createUiTable() {
5308 return ScilabUiTableBridge.createUiTable();
5312 * Sets the Text of a UiTable
5313 * @param uiTable the UiTable we want to set the Text of
5314 * @param newText the Text to set for the UiTable
5316 public static void setText(UiTable uiTable, String newText) {
5317 ScilabUiTableBridge.setText(uiTable, newText);
5321 * Gets the text of an UiTable
5322 * @param uiTable the UiTable we want to get the text of
5323 * @return the text of the UiTable
5325 public static String getText(UiTable uiTable) {
5326 return ScilabUiTableBridge.getText(uiTable);
5330 * Draws a Scilab UiTable
5331 * @param uiTable the UiTable to draw
5332 * @see org.scilab.modules.ihm.UIElement#draw()
5334 public static void draw(UiTable uiTable) {
5335 ScilabUiTableBridge.draw(uiTable);
5339 * Gets the dimensions (width and height) of a Scilab UiTable
5340 * @param uiTable the UiTable we want to get the dimensions of
5341 * @return the size of the uiTable
5342 * @see org.scilab.modules.ihm.UIElement#getDims()
5344 public static Size getDims(UiTable uiTable) {
5345 return ScilabUiTableBridge.getDims(uiTable);
5349 * Gets the position (X-coordinate and Y-coordinate) of a Scilab uiTable
5350 * @param uiTable the uiTable we want to get the position of
5351 * @return the position of the uiTable
5352 * @see org.scilab.modules.ihm.UIElement#getPosition()
5354 public static Position getPosition(UiTable uiTable) {
5355 return ScilabUiTableBridge.getPosition(uiTable);
5359 * Gets the visibility status of a Scilab UiTable
5360 * @param uiTable the uiTable we want to get the visiblity status of
5361 * @return the visibility status of the uiTable (true if the uiTable is visible, false if not)
5362 * @see org.scilab.modules.ihm.UIElement#isVisible()
5364 public static boolean isVisible(UiTable uiTable) {
5365 return ScilabUiTableBridge.isVisible(uiTable);
5369 * Sets the dimensions (width and height) of a Scilab UiTable
5370 * @param uiTable the uiTable we want to set the dimensions of
5371 * @param newSize the size we want to set to the uiTable
5372 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
5374 public static void setDims(UiTable uiTable, Size newSize) {
5375 ScilabUiTableBridge.setDims(uiTable, newSize);
5379 * Sets the position (X-coordinate and Y-coordinate) of a Scilab uiTable
5380 * @param uiTable the uiTable we want to set the position of
5381 * @param newPosition the position we want to set to the uiTable
5382 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
5384 public static void setPosition(UiTable uiTable, Position newPosition) {
5385 ScilabUiTableBridge.setPosition(uiTable, newPosition);
5389 * Sets the visibility status of a Scilab UiTable
5390 * @param uiTable the uiTable we want to set the visiblity status of
5391 * @param newVisibleState the visibility status we want to set to the uiTable (true to set the uiTable visible, false else)
5392 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
5394 public static void setVisible(UiTable uiTable, boolean newVisibleState) {
5395 ScilabUiTableBridge.setVisible(uiTable, newVisibleState);
5399 * Set the Background color of the UiTable
5400 * @param uiTable the UiTable we want to set the background of
5401 * @param color the Color
5403 public static void setBackground(UiTable uiTable, Color color) {
5404 ScilabUiTableBridge.setBackground(uiTable, color);
5408 * Get the Background color of the UiTable
5409 * @param uiTable the UiTable we want to get the background of
5412 public static Color getBackground(UiTable uiTable) {
5413 return ScilabUiTableBridge.getBackground(uiTable);
5417 * Set the Foreground color of the UiTable
5418 * @param uiTable the UiTable we want to set the foreground of
5419 * @param color the Color
5421 public static void setForeground(UiTable uiTable, Color color) {
5422 ScilabUiTableBridge.setForeground(uiTable, color);
5426 * Get the Foreground color of the UiTable
5427 * @param uiTable the UiTable we want to get the foreground of
5430 public static Color getForeground(UiTable uiTable) {
5431 return ScilabUiTableBridge.getForeground(uiTable);
5435 * Set the font of the UiTable.
5436 * @param uiTable the UiTable we want to set the font of
5437 * @param font the font
5439 public static void setFont(UiTable uiTable, Font font) {
5440 ScilabUiTableBridge.setFont(uiTable, font);
5444 * Get the font of the UiTable.
5445 * @param uiTable the UiTable we want to get the font of
5448 public static Font getFont(UiTable uiTable) {
5449 return ScilabUiTableBridge.getFont(uiTable);
5453 * Set if the UiTable is enabled or not
5454 * @param uiTable the UiTable we want to set the status of
5455 * @param status true if the UiTable is enabled
5457 public static void setEnabled(UiTable uiTable, boolean status) {
5458 ScilabUiTableBridge.setEnabled(uiTable, status);
5462 * Gets the enable status of a UiTable
5463 * @param uiTable the UiTable we want to get the status of
5464 * @return the enable status of the UiTable (true if the UiTable is enabled, false if not)
5466 public static boolean isEnabled(UiTable uiTable) {
5467 return ScilabUiTableBridge.isEnabled(uiTable);
5471 * Add a callback to the UiTable
5472 * @param uiTable the UiTable we want to set the callback of
5473 * @param callback the Callback to set.
5475 public static void setCallback(UiTable uiTable, CommonCallBack callback) {
5476 ScilabUiTableBridge.setCallback(uiTable, callback);
5480 * Set the horizontal alignment for the UiTable text
5481 * @param uiTable the UiTable we want to set the alignment of
5482 * @param alignment the value for the alignment (See ScilabAlignment.java)
5484 public static void setHorizontalAlignment(UiTable uiTable, String alignment) {
5485 ScilabUiTableBridge.setHorizontalAlignment(uiTable, alignment);
5489 * Set the vertical alignment for the UiTable text
5490 * @param uiTable the UiTable we want to set the alignment of
5491 * @param alignment the value for the alignment (See ScilabAlignment.java)
5493 public static void setVerticalAlignment(UiTable uiTable, String alignment) {
5494 ScilabUiTableBridge.setVerticalAlignment(uiTable, alignment);
5498 * Set the Relief of the UiTable
5499 * @param uiTable the UiTable which we want to set the Relief of
5500 * @param reliefType the type of the relief to set (See ScilabRelief.java)
5502 public static void setRelief(UiTable uiTable, String reliefType) {
5503 ScilabUiTableBridge.setRelief(uiTable, reliefType);
5507 * Delete the UiTable
5508 * @param uiTable the UiTable to be destroyed
5510 public static void destroy(UiTable uiTable) {
5511 ScilabUiTableBridge.destroy(uiTable);
5515 * Give the focus to the UiTable
5516 * @param uiTable the UiTable
5518 public static void requestFocus(UiTable uiTable) {
5519 ScilabUiTableBridge.requestFocus(uiTable);
5523 * Sets the column names for uitable
5524 * @param uiTable the UiTable
5525 * @param text the String that contains column names delimited by a '|'. Example: 1|2|3|4
5527 public static void setColnames(UiTable uiTable, String text) {
5528 ScilabUiTableBridge.setColnames(uiTable, text);
5532 * Sets the row names for uitable
5533 * @param uiTable the UiTable
5534 * @param text the String that contains row names delimited by a '|'. Example: 1|2|3|4
5536 public static void setRownames(UiTable uiTable, String text) {
5537 ScilabUiTableBridge.setRownames(uiTable, text);
5541 * Sets the Data for uitable
5542 * @param uiTable the UiTable
5543 * @param text the String that contains row data delimited by a '|'
5544 * and column data delimited by " ". Example: 1.26 3.47 | a b | d e | a b
5546 public static void setData(UiTable uiTable, String text) {
5547 ScilabUiTableBridge.setData(uiTable, text);
5550 /**********************/
5551 /* UiDisplayTree Bridge */
5552 /**********************/
5555 * Creates a new UiDisplayTree
5556 * @return the created UiDisplayTree
5558 public static SimpleUiDisplayTree createUiDisplayTree() {
5559 return ScilabUiDisplayTreeBridge.createUiDisplayTree();
5563 * Sets the Text of a UiDisplayTree
5564 * @param uiTree the UiDisplayTree we want to set the Text of
5565 * @param newText the Text to set for the UiDisplayTree
5567 public static void setText(UiDisplayTree uiTree, String newText) {
5568 ScilabUiDisplayTreeBridge.setText(uiTree, newText);
5572 * Gets the text of an UiDisplayTree
5573 * @param uiTree the UiDisplayTree we want to get the text of
5574 * @return the text of the UiDisplayTree
5576 public static String getText(UiDisplayTree uiTree) {
5577 return ScilabUiDisplayTreeBridge.getText(uiTree);
5581 * Draws a Scilab UiDisplayTree
5582 * @param uiTree the UiDisplayTree to draw
5583 * @see org.scilab.modules.ihm.UIElement#draw()
5585 public static void draw(UiDisplayTree uiTree) {
5586 ScilabUiDisplayTreeBridge.draw(uiTree);
5590 * Gets the dimensions (width and height) of a Scilab UiDisplayTree
5591 * @param uiTree the UiDisplayTree we want to get the dimensions of
5592 * @return the size of the uiTree
5593 * @see org.scilab.modules.ihm.UIElement#getDims()
5595 public static Size getDims(UiDisplayTree uiTree) {
5596 return ScilabUiDisplayTreeBridge.getDims(uiTree);
5600 * Gets the position (X-coordinate and Y-coordinate) of a Scilab uiTree
5601 * @param uiTree the uiTree we want to get the position of
5602 * @return the position of the uiTree
5603 * @see org.scilab.modules.ihm.UIElement#getPosition()
5605 public static Position getPosition(UiDisplayTree uiTree) {
5606 return ScilabUiDisplayTreeBridge.getPosition(uiTree);
5610 * Gets the visibility status of a Scilab UiDisplayTree
5611 * @param uiTree the uiTree we want to get the visiblity status of
5612 * @return the visibility status of the uiTree (true if the uiTree is visible, false if not)
5613 * @see org.scilab.modules.ihm.UIElement#isVisible()
5615 public static boolean isVisible(UiDisplayTree uiTree) {
5616 return ScilabUiDisplayTreeBridge.isVisible(uiTree);
5620 * Sets the dimensions (width and height) of a Scilab UiDisplayTree
5621 * @param uiTree the uiTree we want to set the dimensions of
5622 * @param newSize the size we want to set to the uiTree
5623 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
5625 public static void setDims(UiDisplayTree uiTree, Size newSize) {
5626 ScilabUiDisplayTreeBridge.setDims(uiTree, newSize);
5630 * Sets the position (X-coordinate and Y-coordinate) of a Scilab uiTree
5631 * @param uiTree the uiTree we want to set the position of
5632 * @param newPosition the position we want to set to the uiTree
5633 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
5635 public static void setPosition(UiDisplayTree uiTree, Position newPosition) {
5636 ScilabUiDisplayTreeBridge.setPosition(uiTree, newPosition);
5640 * Sets the visibility status of a Scilab UiDisplayTree
5641 * @param uiTree the uiTree we want to set the visiblity status of
5642 * @param newVisibleState the visibility status we want to set to the uiTree (true to set the uiTree visible, false else)
5643 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
5645 public static void setVisible(UiDisplayTree uiTree, boolean newVisibleState) {
5646 ScilabUiDisplayTreeBridge.setVisible(uiTree, newVisibleState);
5650 * Set the Background color of the UiDisplayTree
5651 * @param uiTree the UiDisplayTree we want to set the background of
5652 * @param color the Color
5654 public static void setBackground(UiDisplayTree uiTree, Color color) {
5655 ScilabUiDisplayTreeBridge.setBackground(uiTree, color);
5659 * Get the Background color of the UiDisplayTree
5660 * @param uiTree the UiDisplayTree we want to get the background of
5663 public static Color getBackground(UiDisplayTree uiTree) {
5664 return ScilabUiDisplayTreeBridge.getBackground(uiTree);
5668 * Set the Foreground color of the UiDisplayTree
5669 * @param uiTree the UiDisplayTree we want to set the foreground of
5670 * @param color the Color
5672 public static void setForeground(UiDisplayTree uiTree, Color color) {
5673 ScilabUiDisplayTreeBridge.setForeground(uiTree, color);
5677 * Get the Foreground color of the UiDisplayTree
5678 * @param uiTree the UiDisplayTree we want to get the foreground of
5681 public static Color getForeground(UiDisplayTree uiTree) {
5682 return ScilabUiDisplayTreeBridge.getForeground(uiTree);
5686 * Set the font of the UiDisplayTree.
5687 * @param uiTree the UiDisplayTree we want to set the font of
5688 * @param font the font
5690 public static void setFont(UiDisplayTree uiTree, Font font) {
5691 ScilabUiDisplayTreeBridge.setFont(uiTree, font);
5695 * Get the font of the UiDisplayTree.
5696 * @param uiTree the UiDisplayTree we want to get the font of
5699 public static Font getFont(UiDisplayTree uiTree) {
5700 return ScilabUiDisplayTreeBridge.getFont(uiTree);
5704 * Set if the UiDisplayTree is enabled or not
5705 * @param uiTree the UiDisplayTree we want to set the status of
5706 * @param status true if the UiDisplayTree is enabled
5708 public static void setEnabled(UiDisplayTree uiTree, boolean status) {
5709 ScilabUiDisplayTreeBridge.setEnabled(uiTree, status);
5713 * Gets the enable status of a UiDisplayTree
5714 * @param uiTree the UiDisplayTree we want to get the status of
5715 * @return the enable status of the UiDisplayTree (true if the UiDisplayTree is enabled, false if not)
5717 public static boolean isEnabled(UiDisplayTree uiTree) {
5718 return ScilabUiDisplayTreeBridge.isEnabled(uiTree);
5722 * Add a callback to the UiDisplayTree
5723 * @param uiTree the UiDisplayTree we want to set the callback of
5724 * @param callback the Callback to set.
5726 public static void setCallback(UiDisplayTree uiTree, CommonCallBack callback) {
5727 ScilabUiDisplayTreeBridge.setCallback(uiTree, callback);
5731 * Set the horizontal alignment for the UiDisplayTree text
5732 * @param uiTree the UiDisplayTree we want to set the alignment of
5733 * @param alignment the value for the alignment (See ScilabAlignment.java)
5735 public static void setHorizontalAlignment(UiDisplayTree uiTree, String alignment) {
5736 ScilabUiDisplayTreeBridge.setHorizontalAlignment(uiTree, alignment);
5740 * Set the vertical alignment for the UiDisplayTree text
5741 * @param uiTree the UiDisplayTree we want to set the alignment of
5742 * @param alignment the value for the alignment (See ScilabAlignment.java)
5744 public static void setVerticalAlignment(UiDisplayTree uiTree, String alignment) {
5745 ScilabUiDisplayTreeBridge.setVerticalAlignment(uiTree, alignment);
5749 * Set the Relief of the UiDisplayTree
5750 * @param uiTree the UiDisplayTree which we want to set the Relief of
5751 * @param reliefType the type of the relief to set (See ScilabRelief.java)
5753 public static void setRelief(UiDisplayTree uiTree, String reliefType) {
5754 ScilabUiDisplayTreeBridge.setRelief(uiTree, reliefType);
5758 * Delete the UiDisplayTree
5759 * @param uiTree the UiDisplayTree to be destroyed
5761 public static void destroy(UiDisplayTree uiTree) {
5762 ScilabUiDisplayTreeBridge.destroy(uiTree);
5766 * Give the focus to the UiDisplayTree
5767 * @param uiTree the UiDisplayTree
5769 public static void requestFocus(UiDisplayTree uiTree) {
5770 ScilabUiDisplayTreeBridge.requestFocus(uiTree);
5774 * Sets the tree data to be added to viewport
5775 * @param text the array of strings containing tree data
5777 public static void setData(UiDisplayTree uiTree, String[] text) {
5778 ScilabUiDisplayTreeBridge.setData(uiTree, text);