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.waitbar.ScilabWaitBarBridge;
118 import org.scilab.modules.gui.waitbar.SimpleWaitBar;
119 import org.scilab.modules.gui.waitbar.WaitBar;
120 import org.scilab.modules.gui.window.ScilabWindowBridge;
121 import org.scilab.modules.gui.window.SimpleWindow;
122 import org.scilab.modules.gui.window.Window;
125 * Main bridge for Scilab Java GUIs
126 * @author Vincent COUVERT
127 * @author Bruno Jofret
129 public class ScilabBridge {
132 * Constructor for ScilabBridge class
134 protected ScilabBridge() {
135 throw new UnsupportedOperationException(); /* Prevents calls from subclass */
143 * Creates a new window
144 * @return the created window
146 public static SimpleWindow createWindow() {
147 return ScilabWindowBridge.createWindow();
151 * Draws a window on screen
152 * @param window the window to be drawn
154 public static void draw(Window window) {
155 ScilabWindowBridge.draw(window);
159 * Deiconify the window and put it in front of other window
160 * @param window the window to raise
162 public static void raise(Window window) {
163 ScilabWindowBridge.raise(window);
167 * Gets the dimensions (width and height) of a window
168 * @param window the window we want to get the dimensions of
169 * @return dimensions of the window
171 public static Size getDims(Window window) {
172 return ScilabWindowBridge.getDims(window);
176 * Sets the dimensions (width and height) of a window
177 * @param window the window we want to set the dimensions of
178 * @param newWindowSize new dimensions of the window
180 public static void setDims(Window window, Size newWindowSize) {
181 ScilabWindowBridge.setDims(window, newWindowSize);
185 * Gets the position (X-coordinate and Y-coordinate) of a window
186 * @param window the window we want to get the position of
187 * @return position of the window
189 public static Position getPosition(Window window) {
190 return ScilabWindowBridge.getPosition(window);
194 * Sets the position (X-coordinate and Y-coordinate) of a window
195 * @param window the window we want to set the position of
196 * @param newWindowPosition new position of the window
198 public static void setPosition(Window window, Position newWindowPosition) {
199 ScilabWindowBridge.setPosition(window, newWindowPosition);
203 * Gets the title of a window
204 * @param window the window we want to get the title of
205 * @return the title of the window
207 public static String getTitle(Window window) {
208 return ScilabWindowBridge.getTitle(window);
212 * Sets the title of a window
213 * @param window the window we want to set the title of
214 * @param newWindowTitle the title to set for the window
216 public static void setTitle(Window window, String newWindowTitle) {
217 ScilabWindowBridge.setTitle(window, newWindowTitle);
221 * Gets the visibility status of a window
222 * @param window the window we want to get the status of
223 * @return visibility status (true if the window is visible, false if not)
225 public static boolean isVisible(Window window) {
226 return ScilabWindowBridge.isVisible(window);
230 * Sets the visibility status for a window
231 * @param window the window we want to set the visibility status of
232 * @param newVisibleState new visibility status for the window
233 * (true set the window visible, false to set the window invisible)
235 public static void setVisible(Window window, boolean newVisibleState) {
236 ScilabWindowBridge.setVisible(window, newVisibleState);
240 * Add a tab to a window
241 * @param window the window which we want to add the tab to
242 * @param newTab the tab to add to the window
244 public static void addTab(Window window, Tab newTab) {
245 ScilabWindowBridge.addTab(window, newTab);
249 * Add a tab to a window
250 * @param window the window which we want to remove the tab from
251 * @param newTab the tab to add to the window
253 public static void removeTab(Window window, Tab newTab) {
254 ScilabWindowBridge.removeTab(window, newTab);
258 * Sets a MenuBar to a window
259 * @param window the window which we want to add the MeunBar to
260 * @param newMenuBar the MeunBar to add to the window
262 public static void addMenuBar(Window window, MenuBar newMenuBar) {
263 ScilabWindowBridge.addMenuBar(window, newMenuBar);
267 * Sets a ToolBar to a window
268 * @param window the window which we want to add the ToolBar to
269 * @param newToolBar the ToolBar to add to the window
271 public static void addToolBar(Window window, ToolBar newToolBar) {
272 ScilabWindowBridge.addToolBar(window, newToolBar);
276 * Sets a InfoBar to a window
277 * @param window the window which we want to add the InfoBar to
278 * @param newInfoBar the InfoBar to add to the window
280 public static void addInfoBar(Window window, TextBox newInfoBar) {
281 ScilabWindowBridge.addInfoBar(window, newInfoBar);
285 * @param window window from which we want the information
286 * @return number of objects (tabs) docked in this window
288 public static int getNbDockedObjects(Window window) {
289 return ScilabWindowBridge.getNbDockedObjects(window);
293 * Update the dimension of the window and its component.
294 * Only useful when the window is not yet visible
295 * @param window window to update
297 public static void updateDimensions(Window window) {
298 ScilabWindowBridge.updateDimensions(window);
303 * @param window window to update
305 public static void windowDeiconified(Window window) {
306 ScilabWindowBridge.windowDeiconified(window);
311 * @param window window to update
313 public static void windowIconified(Window window) {
314 ScilabWindowBridge.windowIconified(window);
319 * @param window window to update
321 public static void windowMaximized(Window window) {
322 ScilabWindowBridge.windowMaximized(window);
326 * Window is in the "normal" state.
327 * @param window window to update
329 public static void windowNormal(Window window) {
330 ScilabWindowBridge.windowNormal(window);
340 * Creates a new ToolBar
341 * @return the created ToolBar
343 public static SimpleToolBar createToolBar() {
344 return ScilabToolBarBridge.createToolBar();
348 * Add a PushButton to the ToolBar.
349 * @param toolBar the toolBar which we want to add the PushButton to
350 * @param pushButton the PushButton to add.
352 public static void add(ToolBar toolBar, PushButton pushButton) {
353 ScilabToolBarBridge.add(toolBar, pushButton);
357 * Add a Separator to a Toolbar
358 * @param toolbar the Toolbar which we want to add the Separator to
360 public static void addSeparator(ToolBar toolbar) {
361 ScilabToolBarBridge.addSeparator(toolbar);
365 * Set the visibility of the Toolbar
366 * @param toolbar the ToolBar
367 * @param newVisibleState true to set the toolbar visible
369 public static void setVisible(ToolBar toolbar, boolean newVisibleState) {
370 ScilabToolBarBridge.setVisible(toolbar, newVisibleState);
374 * Get the visibility of the TooBar
375 * @param toolbar the ToolBar
376 * @return true if the ToolBar is Visible
378 public static boolean isVisible(ToolBar toolbar) {
379 return ScilabToolBarBridge.isVisible(toolbar);
388 * Creates a new Frame
389 * @return the created Frame
391 public static SimpleFrame createFrame() {
392 return ScilabFrameBridge.createFrame();
396 * Sets the Text of a Frame
397 * @param frame the Frame we want to set the Text of
398 * @param newText the Text to set for the Frame
400 public static void setText(Frame frame, String newText) {
401 ScilabFrameBridge.setText(frame, newText);
405 * Gets the text of an Frame
406 * @param frame the Frame we want to get the text of
407 * @return the text of the Frame
409 public static String getText(Frame frame) {
410 return ScilabFrameBridge.getText(frame);
414 * Draws a Scilab Frame
415 * @param frame the Frame to draw
416 * @see org.scilab.modules.ihm.UIElement#draw()
418 public static void draw(Frame frame) {
419 ScilabFrameBridge.draw(frame);
423 * Gets the dimensions (width and height) of a Scilab Frame
424 * @param frame the Frame we want to get the dimensions of
425 * @return the size of the frame
426 * @see org.scilab.modules.ihm.UIElement#getDims()
428 public static Size getDims(Frame frame) {
429 return ScilabFrameBridge.getDims(frame);
433 * Gets the position (X-coordinate and Y-coordinate) of a Scilab frame
434 * @param frame the frame we want to get the position of
435 * @return the position of the frame
436 * @see org.scilab.modules.ihm.UIElement#getPosition()
438 public static Position getPosition(Frame frame) {
439 return ScilabFrameBridge.getPosition(frame);
443 * Gets the visibility status of a Scilab Frame
444 * @param frame the frame we want to get the visiblity status of
445 * @return the visibility status of the frame (true if the frame is visible, false if not)
446 * @see org.scilab.modules.ihm.UIElement#isVisible()
448 public static boolean isVisible(Frame frame) {
449 return ScilabFrameBridge.isVisible(frame);
453 * Sets the dimensions (width and height) of a Scilab Frame
454 * @param frame the frame we want to set the dimensions of
455 * @param newSize the size we want to set to the frame
456 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
458 public static void setDims(Frame frame, Size newSize) {
459 ScilabFrameBridge.setDims(frame, newSize);
463 * Sets the position (X-coordinate and Y-coordinate) of a Scilab frame
464 * @param frame the frame we want to set the position of
465 * @param newPosition the position we want to set to the frame
466 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
468 public static void setPosition(Frame frame, Position newPosition) {
469 ScilabFrameBridge.setPosition(frame, newPosition);
473 * Sets the visibility status of a Scilab Frame
474 * @param frame the frame we want to set the visiblity status of
475 * @param newVisibleState the visibility status we want to set to the frame (true to set the frame visible, false else)
476 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
478 public static void setVisible(Frame frame, boolean newVisibleState) {
479 ScilabFrameBridge.setVisible(frame, newVisibleState);
483 * Set the Background color of the Frame
484 * @param frame the Frame we want to set the background of
485 * @param color the Color
487 public static void setBackground(Frame frame, Color color) {
488 ScilabFrameBridge.setBackground(frame, color);
492 * Get the Background color of the Frame
493 * @param frame the Frame we want to get the background of
496 public static Color getBackground(Frame frame) {
497 return ScilabFrameBridge.getBackground(frame);
501 * Set the Foreground color of the Frame
502 * @param frame the Frame we want to set the foreground of
503 * @param color the Color
505 public static void setForeground(Frame frame, Color color) {
506 ScilabFrameBridge.setForeground(frame, color);
510 * Get the Foreground color of the Frame
511 * @param frame the Frame we want to get the foreground of
514 public static Color getForeground(Frame frame) {
515 return ScilabFrameBridge.getForeground(frame);
519 * Set the font of the Frame.
520 * @param frame the Frame we want to set the font of
521 * @param font the font
523 public static void setFont(Frame frame, Font font) {
524 ScilabFrameBridge.setFont(frame, font);
528 * Get the font of the Frame.
529 * @param frame the Frame we want to get the font of
532 public static Font getFont(Frame frame) {
533 return ScilabFrameBridge.getFont(frame);
537 * Set if the Frame is enabled or not
538 * @param frame the Frame we want to set the status of
539 * @param status true if the Frame is enabled
541 public static void setEnabled(Frame frame, boolean status) {
542 ScilabFrameBridge.setEnabled(frame, status);
546 * Gets the enable status of the Frame
547 * @param frame the Frame we want to get the status of
548 * @return the enable status of the Frame (true if the Frame is enabled, false if not)
550 public static boolean isEnabled(Frame frame) {
551 return ScilabFrameBridge.isEnabled(frame);
555 * Add a callback to the Frame
556 * @param frame the Frame we want to set the callback of
557 * @param callback the callback to set
559 public static void setCallback(Frame frame, CommonCallBack callback) {
560 ScilabFrameBridge.setCallback(frame, callback);
564 * Set the Relief of the Frame
565 * @param frame the Frame we want to set the Relief of
566 * @param reliefType the type of the relief to set (See ScilabRelief.java)
568 public static void setRelief(Frame frame, String reliefType) {
569 ScilabFrameBridge.setRelief(frame, reliefType);
574 * @param frame the Frame to be destroyed
576 public static void destroy(Frame frame) {
577 ScilabFrameBridge.destroy(frame);
581 * Give the focus to the Frame
582 * @param frame the Frame
584 public static void requestFocus(Frame frame) {
585 ScilabFrameBridge.requestFocus(frame);
593 * Creates a Scilab tab
594 * @param name the name of the tab (used to identify it)
595 * @return the created tab
597 public static SimpleTab createTab(String name) {
598 return ScilabTabBridge.createTab(name);
602 * Creates a Scilab tab
603 * @param name the name of the tab
604 * @param uuid an uuid to identify the tab
605 * @return the created tab
607 public static SimpleTab createTab(String name, String uuid) {
608 return ScilabTabBridge.createTab(name, uuid);
612 * Creates a Scilab tab able to create graphics
613 * @param name the name of the tab (used to identify it)
614 * @param figureId index of the created figure
615 * @return the created tab
617 public static SimpleTab createTab(String name, int figureId) {
618 return ScilabTabBridge.createTab(name, figureId);
622 * Draws a tab on screen
623 * @param tab the tab to be drawn
625 public static void draw(Tab tab) {
626 ScilabTabBridge.draw(tab);
630 * Gets the dimensions (width and height) of a tab
631 * @param tab the tab we want to get the dimensions of
632 * @return the dimensions of the tab
634 public static Size getDims(Tab tab) {
635 return ScilabTabBridge.getDims(tab);
639 * Sets the dimensions (width and height) of a tab
640 * @param tab the tab we want to set the dimensions of
641 * @param newTabSize new dimensions of the tab
643 public static void setDims(Tab tab, Size newTabSize) {
644 ScilabTabBridge.setDims(tab, newTabSize);
648 * Gets the position (X-coordinate and Y-coordinate) of a tab
649 * @param tab the tab we want to get the position of
650 * @return position of the tab
652 public static Position getPosition(Tab tab) {
653 return ScilabTabBridge.getPosition(tab);
657 * Sets the position (X-coordinate and Y-coordinate) of a tab
658 * @param tab the tab we want to set the position of
659 * @param newTabPosition new position of the tab
661 public static void setPosition(Tab tab, Position newTabPosition) {
662 ScilabTabBridge.setPosition(tab, newTabPosition);
666 * Gets the Name of a tab
667 * @param tab the tab we want to get the Name of
668 * @return the Name of the tab
670 public static String getName(Tab tab) {
671 return ScilabTabBridge.getName(tab);
675 * Sets the name of a tab
676 * @param tab the tab we want to set the name of
677 * @param newTabName the name to set for the tab
679 public static void setName(Tab tab, String newTabName) {
680 ScilabTabBridge.setName(tab, newTabName);
684 * Gets the visibility status of a tab
685 * @param tab the tab we want to get the status of
686 * @return visibility status (true if the tab is visible, false if not)
688 public static boolean isVisible(Tab tab) {
689 return ScilabTabBridge.isVisible(tab);
693 * Sets the visibility status of a tab
694 * @param tab the tab we want to set the visibility status of
695 * @param newVisibleState new visibility status for the tab
696 * (true set the tab visible, false to set the tab invisible)
698 public static void setVisible(Tab tab, boolean newVisibleState) {
699 ScilabTabBridge.setVisible(tab, newVisibleState);
703 * Add a member (dockable element) to a tab and returns the index of this member
704 * @param tab the tab where we want to add the member
705 * @param member the member to add
706 * @return index of member
708 public static int addMember(Tab tab, Frame member) {
709 return ScilabTabBridge.addMember(tab, member);
713 * Remove a Frame member from a tab
714 * @param tab the tab which we want to remove the Frame from
715 * @param member the Frame to remove
717 public static void removeMember(Tab tab, Frame member) {
718 ScilabTabBridge.removeMember(tab, member);
722 * Add a member (dockable element) to a tab and returns the index of this member
723 * @param tab the tab where we want to add the member
724 * @param member the member to add
725 * @return index of member
727 public static int addMember(Tab tab, Console member) {
728 return ScilabTabBridge.addMember(tab, member);
732 * We want to be able to add directly a HelpBrowser in a Tab.
733 * @param tab the tab where we want to add the member
734 * @param member the member to add
735 * @return the position of the HelpBrowser in the member list.
737 public static int addMember(Tab tab, HelpBrowser member) {
738 return ScilabTabBridge.addMember(tab, member);
742 * Add a member (dockable element) to a tab and returns the index of this member
743 * @param tab the tab where we want to add the member
744 * @param member the member to add
745 * @return index of member
747 public static int addMember(Tab tab, Canvas member) {
748 return ScilabTabBridge.addMember(tab, member);
752 * Sets a MenuBar to a tab
753 * @param tab the tab which we want to add the MenuBar to
754 * @param newMenuBar the MenuBar to add to the tab
756 public static void addMenuBar(Tab tab, MenuBar newMenuBar) {
757 ScilabTabBridge.addMenuBar(tab, newMenuBar);
761 * Add a member (dockable element) to a tab and returns the index of this member
762 * @param tab the tab which we want to add the Tree Overview to
763 * @param member the Tree Overview to add
764 * @return the position of the Tree Overview in the member list.
766 public static int addMember(Tab tab, Tree member) {
767 return ScilabTabBridge.addMember(tab, member);
771 * Add a member (dockable element) to a tab and returns the index of this member
772 * @param tab the tab which we want to add the pushbutton to
773 * @param member the pushbutton to add
774 * @return the position of the pushbutton in the member list.
776 public static int addMember(Tab tab, PushButton member) {
777 return ScilabTabBridge.addMember(tab, member);
781 * Remove a PushButton member from a tab
782 * @param tab the tab which we want to remove the PushButton from
783 * @param member the PushButton to remove
785 public static void removeMember(Tab tab, PushButton member) {
786 ScilabTabBridge.removeMember(tab, member);
790 * Add a member (dockable element) to a tab and returns the index of this member
791 * @param tab the tab which we want to add the EditBox to
792 * @param member the editbox to add
793 * @return the position of the editbox in the member list.
795 public static int addMember(Tab tab, EditBox member) {
796 return ScilabTabBridge.addMember(tab, member);
800 * Remove an EditBox member from a tab
801 * @param tab the tab which we want to remove the EditBox from
802 * @param member the EditBox to remove
804 public static void removeMember(Tab tab, EditBox member) {
805 ScilabTabBridge.removeMember(tab, member);
809 * Add a member (dockable element) to a tab and returns the index of this member
810 * @param tab the tab which we want to add the Label to
811 * @param member the label to add
812 * @return the position of the label in the member list.
814 public static int addMember(Tab tab, Label member) {
815 return ScilabTabBridge.addMember(tab, member);
819 * Remove a Label member from a tab
820 * @param tab the tab which we want to remove the Label from
821 * @param member the Label to remove
823 public static void removeMember(Tab tab, Label member) {
824 ScilabTabBridge.removeMember(tab, member);
828 * Add a member (dockable element) to a tab and returns the index of this member
829 * @param tab the tab which we want to add the CheckBox to
830 * @param member the checkbox to add
831 * @return the position of the checkbox in the member list.
833 public static int addMember(Tab tab, CheckBox member) {
834 return ScilabTabBridge.addMember(tab, member);
838 * Remove a CheckBox member from a tab
839 * @param tab the tab which we want to remove the CheckBox from
840 * @param member the CheckBox to remove
842 public static void removeMember(Tab tab, CheckBox member) {
843 ScilabTabBridge.removeMember(tab, member);
847 * Add a member (dockable element) to a tab and returns the index of this member
848 * @param tab the tab which we want to add the RadioButton to
849 * @param member the RadioButton to add
850 * @return the position of the RadioButton in the member list.
852 public static int addMember(Tab tab, RadioButton member) {
853 return ScilabTabBridge.addMember(tab, member);
857 * Remove a RadioButton member from a tab
858 * @param tab the tab which we want to remove the RadioButton from
859 * @param member the RadioButton to remove
861 public static void removeMember(Tab tab, RadioButton member) {
862 ScilabTabBridge.removeMember(tab, member);
866 * Add a member (dockable element) to a tab and returns the index of this member
867 * @param tab the tab which we want to add the UiTable to
868 * @param member the UiTable to add
869 * @return the position of the UiTable in the member list.
871 public static int addMember(Tab tab, UiTable member) {
872 return ScilabTabBridge.addMember(tab, member);
876 * Remove a UiTable member from a tab
877 * @param tab the tab which we want to remove the UiTable from
878 * @param member the UiTable to remove
880 public static void removeMember(Tab tab, UiTable member) {
881 ScilabTabBridge.removeMember(tab, member);
884 public static int addMember(Tab tab, UiDisplayTree member) {
885 return ScilabTabBridge.addMember(tab, member);
887 public static void removeMember(Tab tab, UiDisplayTree member) {
888 ScilabTabBridge.removeMember(tab, member);
892 * Add a member (dockable element) to a tab and returns the index of this member
893 * @param tab the tab which we want to add the Slider to
894 * @param member the Slider to add
895 * @return the position of the Slider in the member list.
897 public static int addMember(Tab tab, Slider member) {
898 return ScilabTabBridge.addMember(tab, member);
902 * Remove a Slider member from a tab
903 * @param tab the tab which we want to remove the Slider from
904 * @param member the Slider to remove
906 public static void removeMember(Tab tab, Slider member) {
907 ScilabTabBridge.removeMember(tab, member);
911 * Add a member (dockable element) to a tab and returns the index of this member
912 * @param tab the tab which we want to add the ListBox to
913 * @param member the ListBox to add
914 * @return the position of the ListBox in the member list.
916 public static int addMember(Tab tab, ListBox member) {
917 return ScilabTabBridge.addMember(tab, member);
921 * Remove a ListBox member from a tab
922 * @param tab the tab which we want to remove the ListBox from
923 * @param member the ListBox to remove
925 public static void removeMember(Tab tab, ListBox member) {
926 ScilabTabBridge.removeMember(tab, member);
930 * Add a member (dockable element) to a tab and returns the index of this member
931 * @param tab the tab which we want to add the PopupMenu to
932 * @param member the PopupMenu to add
933 * @return the position of the PopupMenu in the member list.
935 public static int addMember(Tab tab, PopupMenu member) {
936 return ScilabTabBridge.addMember(tab, member);
940 * Remove a PopupMenu member from a tab
941 * @param tab the tab which we want to remove the PopupMenu from
942 * @param member the PopupMenu to remove
944 public static void removeMember(Tab tab, PopupMenu member) {
945 ScilabTabBridge.removeMember(tab, member);
949 * Remove a member (dockable element) to a tab and returns the index of this member
950 * @param tab the tab where we want to add the member
951 * @param member the member to add
953 public static void removeMember(Tab tab, Canvas member) {
954 ScilabTabBridge.removeMember(tab, member);
958 * Get the current status of the Tab in its parent
959 * @param tab the tab we want to get the status of
960 * @return true is the tab is the tab currently displayed in its parent
962 public static boolean isCurrentTab(Tab tab) {
963 return ScilabTabBridge.isCurrentTab(tab);
967 * Set the parent window id for this tab
968 * @param tab the tab we want to set the parent window id of
969 * @param id the id of the parent window
971 public static void setParentWindowId(Tab tab, int id) {
972 ScilabTabBridge.setParentWindowId(tab, id);
976 * Get the parent window id for this tab
977 * @param tab the tab we want to get the parent window id of
978 * @return the id of the parent window
980 public static int getParentWindowId(Tab tab) {
981 return ScilabTabBridge.getParentWindowId(tab);
985 * Set the callback of the tab
986 * @param tab the tab which we want to set the callback of
987 * @param callback the CallBack to set
989 public static void setCallback(Tab tab, CommonCallBack callback) {
990 ScilabTabBridge.setCallback(tab, callback);
994 * Set this tab as the current tab of its parent Window
997 public static void setCurrent(Tab tab) {
998 ScilabTabBridge.setCurrent(tab);
1002 * Set the background color of a tab.
1003 * @param tab tab to modify
1004 * @param red red channel of the color
1005 * @param green green channel
1006 * @param blue blue channel
1008 public static void setBackground(Tab tab, double red, double green, double blue) {
1009 ScilabTabBridge.setBackground(tab, red, green, blue);
1013 * Specify whether the canvas should fit the parent tab size
1014 * (and consequently the scrollpane size) or not
1015 * @param tab tab to modify
1016 * @param onOrOff true to enable autoresize mode
1018 public static void setAutoResizeMode(Tab tab, boolean onOrOff) {
1019 ScilabTabBridge.setAutoResizeMode(tab, onOrOff);
1023 * @param tab tab to modify
1024 * @return whether the resize mode is on or off
1026 public static boolean getAutoResizeMode(Tab tab) {
1027 return ScilabTabBridge.getAutoResizeMode(tab);
1031 * Get the part of the axes which is currently viewed
1032 * @param tab tab to modify
1033 * @return [x,y,w,h] array
1035 public static int[] getViewingRegion(Tab tab) {
1036 return ScilabTabBridge.getViewingRegion(tab);
1040 * Specify a new viewport for the axes
1041 * Only works if autoresize mode is off
1042 * @param tab tab to modify
1043 * @param posX X coordinate of upper left point of the viewport within the canvas
1044 * @param posY Y coordinate of upper left point of the viewport within the canvas
1045 * @param width width of the viewport
1046 * @param height height of the viewport
1048 public static void setViewingRegion(Tab tab, int posX, int posY, int width, int height) {
1049 ScilabTabBridge.setViewingRegion(tab, posX, posY, width, height);
1054 * @param tab tab to modify
1055 * @return size of the axes in pixels
1057 public static Size getAxesSize(Tab tab) {
1058 return ScilabTabBridge.getAxesSize(tab);
1063 * @param tab tab to modify
1064 * @param newSize set a new axes size
1066 public static void setAxesSize(Tab tab, Size newSize) {
1067 ScilabTabBridge.setAxesSize(tab, newSize);
1071 * Set the event handler of the Axes
1072 * @param tab tab to modify
1073 * @param command the name of the Scilab function to call
1075 public static void setEventHandler(Tab tab, String command) {
1076 ScilabTabBridge.setEventHandler(tab, command);
1080 * Set the status of the event handler of the Axes
1081 * @param tab tab to modify
1082 * @param status is true to set the event handler active
1084 public static void setEventHandlerEnabled(Tab tab, boolean status) {
1085 ScilabTabBridge.setEventHandlerEnabled(tab, status);
1090 /******************/
1091 /* Console Bridge */
1092 /******************/
1095 * Creates a Scilab Console
1096 * @return the created console
1098 public static SimpleConsole createConsole() {
1099 return ScilabConsoleBridge.createConsole();
1103 * Displays data in the console
1104 * @param console the console to display the data in
1105 * @param dataToDisplay the data to be displayed
1106 * @see org.scilab.modules.console.HelpBrowser#display()
1108 public static void display(Console console, String dataToDisplay) {
1109 ScilabConsoleBridge.display(console, dataToDisplay);
1113 * Reads input data in the console
1114 * @param console the console to read the data from
1115 * @return the data entered by the user
1116 * @see org.scilab.modules.console.HelpBrowser#readLine()
1118 public static String readLine(Console console) {
1119 return ScilabConsoleBridge.readLine(console);
1124 * @param console the console to draw
1125 * @see org.scilab.modules.ihm.UIElement#draw()
1127 public static void draw(Console console) {
1128 ScilabConsoleBridge.draw(console);
1132 * Gets the dimensions (width and height) of a Scilab console
1133 * @param console the console which we want to get the dimensions of
1134 * @return the size of the console
1135 * @see org.scilab.modules.ihm.UIElement#getDims()
1137 public static Size getDims(Console console) {
1138 return ScilabConsoleBridge.getDims(console);
1142 * Gets the position (X-coordinate and Y-coordinates) of a Scilab console
1143 * @param console the console which we want to get the position of
1144 * @return the position of the console
1145 * @see org.scilab.modules.ihm.UIElement#getPosition()
1147 public static Position getPosition(Console console) {
1148 return ScilabConsoleBridge.getPosition(console);
1152 * Gets the visibility status of a console
1153 * @param console the console which we want to get the visibility status of
1154 * @return the visibility status of the console (true if the console is visible, false if not)
1155 * @see org.scilab.modules.ihm.UIElement#isVisible()
1157 public static boolean isVisible(Console console) {
1158 return ScilabConsoleBridge.isVisible(console);
1162 * Sets the visibility status of a console
1163 * @param console the console which we want to get the visibility status of
1164 * @param newVisibleState the visibility status we want to set to the console (true to set the console visible, false else)
1165 * @see org.scilab.modules.ihm.UIElement#isVisible()
1167 public static void setVisible(Console console, boolean newVisibleState) {
1168 ScilabConsoleBridge.setVisible(console, newVisibleState);
1172 * Sets the dimensions (width and height) of a Scilab console
1173 * @param console the console which we want to set the dimensions of
1174 * @param newSize the size we want to set to the console
1175 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
1177 public static void setDims(Console console, Size newSize) {
1178 ScilabConsoleBridge.setDims(console, newSize);
1182 * Sets the position (X-coordinate and Y-coordinate) of a Scilab console
1183 * @param console the console which we want to set the position of
1184 * @param newPosition the position we want to set to the console
1185 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
1187 public static void setPosition(Console console, Position newPosition) {
1188 ScilabConsoleBridge.setPosition(console, newPosition);
1192 * Sets the visibility status of a Scilab console
1193 * @param console the console which we want to set the visibility status of
1194 * @param newVisibleState the visibility status we want to set to the console
1195 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
1197 public static void setPosition(Console console, boolean newVisibleState) {
1198 ScilabConsoleBridge.setVisible(console, newVisibleState);
1202 * Clears the console (no more scroll history and prompt on top left corner)
1203 * @param console the console to be cleared
1205 public static void clear(Console console) {
1206 ScilabConsoleBridge.clear(console);
1210 * Clears lines from the end of the output view
1211 * @param console the console to be cleared
1212 * @param nbLines the number of lines to be deleted
1214 public static void clear(Console console, int nbLines) {
1215 ScilabConsoleBridge.clear(console, nbLines);
1219 * Puts the prompt in the top left corner of the console
1220 * @param console the console used
1222 public static void toHome(Console console) {
1223 ScilabConsoleBridge.toHome(console);
1227 * Reads one user input char
1228 * @param console the console used to get the char
1229 * @return the data entered by the user
1230 * @see fr.scilab.console.HelpBrowser#getCharWithoutOutput()
1232 public static int getCharWithoutOutput(Console console) {
1233 return ScilabConsoleBridge.getCharWithoutOutput(console);
1237 * Sets the prompt displayed in the console
1238 * @param console the console where the prompt is set
1239 * @param prompt the prompt to be displayed in the console
1241 public static void setPrompt(Console console, String prompt) {
1242 ScilabConsoleBridge.setPrompt(console, prompt);
1246 * Updates Scilab internal variables containing the size of the console
1247 * These variables are used to format data before displaying it
1248 * @param console object we want to get the size of
1250 public static void scilabLinesUpdate(Console console) {
1251 ScilabConsoleBridge.scilabLinesUpdate(console);
1255 * Get the current status of the console
1256 * If the prompt view is visible, Scilab is waiting for commands
1257 * @param console object we want to get the status of
1258 * @return true is Scilab is waiting for commands
1260 public static boolean isWaitingForInput(Console console) {
1261 return ScilabConsoleBridge.isWaitingForInput(console);
1265 * Clear the commands history
1266 * @param console the console we want to clear the history of
1268 public static void clearHistory(Console console) {
1269 ScilabConsoleBridge.clearHistory(console);
1273 * Select all the console contents
1274 * @param console the console
1276 public static void selectAll(Console console) {
1277 ScilabConsoleBridge.selectAll(console);
1281 * Put the console selected text in the clipboard
1282 * @param console the console
1284 public static void copyToClipboard(Console console) {
1285 ScilabConsoleBridge.copyToClipboard(console);
1289 * Paste clipboard contents in Console input line
1290 * @param console the console
1292 public static void pasteClipboard(Console console) {
1293 ScilabConsoleBridge.pasteClipboard(console);
1297 * Cut selected text in the Console input line
1298 * @param console the console
1300 public static void cutSelection(Console console) {
1301 ScilabConsoleBridge.cutSelection(console);
1305 * Set the font of the Console
1306 * @param console the console
1307 * @param font the font to set
1309 public static void setFont(Console console, Font font) {
1310 ScilabConsoleBridge.setFont(console, font);
1314 * Get the font of the Console
1315 * @param console the console
1318 public static Font getFont(Console console) {
1319 return ScilabConsoleBridge.getFont(console);
1323 * Get the Foreground Color of the Console
1324 * @param console the console
1325 * @return the Foreground Color
1327 public static Color getForeground(Console console) {
1328 return ScilabConsoleBridge.getForeground(console);
1332 * Get the Background Color of the Console
1333 * @param console the console
1334 * @return the Background Color
1336 public static Color getBackground(Console console) {
1337 return ScilabConsoleBridge.getBackground(console);
1341 * Set the Foreground Color of the Console
1342 * @param console the console
1343 * @param color the Foreground Color
1345 public static void setForeground(Console console, Color color) {
1346 ScilabConsoleBridge.setForeground(console, color);
1350 * Set the Background Color of the Console
1351 * @param console the console
1352 * @param color the Background Color
1354 public static void setBackground(Console console, Color color) {
1355 ScilabConsoleBridge.setBackground(console, color);
1359 * Set the maximum number of lines stored in the Output
1360 * @param console the console
1361 * @param nbLines the number of lines
1363 public static void setMaxOutputSize(Console console, int nbLines) {
1364 ScilabConsoleBridge.setMaxOutputSize(console, nbLines);
1368 * Set the cursor pointer over the Console
1369 * @param console the console
1370 * @param cursor the Cursor to set
1372 public static void setCursor(Console console, Cursor cursor) {
1373 ScilabConsoleBridge.setCursor(console, cursor);
1381 * Creates a Scilab Canvas
1382 * @param figureIndex index of the displayed figure
1383 * @param antialiasingQuality Specify the number of pass to use for antialiasing.
1384 * If its value is 0, then antialiasing is disable.
1385 * @return the created canvas
1387 public static SimpleCanvas createCanvas(int figureIndex, int antialiasingQuality) {
1388 return ScilabCanvasBridge.createCanvas(figureIndex, antialiasingQuality);
1392 * Draws a Scilab canvas
1393 * @param canvas the canvas to draw
1394 * @see org.scilab.modules.ihm.UIElement#draw()
1396 public static void draw(Canvas canvas) {
1397 ScilabCanvasBridge.draw(canvas);
1401 * Gets the dimensions (width and height) of a Scilab Canvas
1402 * @param canvas the canvas we want to get the dimensions of
1403 * @return the size of the canvas
1404 * @see org.scilab.modules.ihm.UIElement#getDims()
1406 public static Size getDims(Canvas canvas) {
1407 return ScilabCanvasBridge.getDims(canvas);
1411 * Gets the position (X-coordinate and Y-coordinate) of a Scilab canvas
1412 * @param canvas the canvas we want to get the position of
1413 * @return the position of the canvas
1414 * @see org.scilab.modules.ihm.UIElement#getPosition()
1416 public static Position getPosition(Canvas canvas) {
1417 return ScilabCanvasBridge.getPosition(canvas);
1421 * Gets the visibility status of a Scilab Canvas
1422 * @param canvas the canvas we want to get the visiblity status of
1423 * @return the visibility status of the canvas (true if the canvas is visible, false if not)
1424 * @see org.scilab.modules.ihm.UIElement#isVisible()
1426 public static boolean isVisible(Canvas canvas) {
1427 return ScilabCanvasBridge.isVisible(canvas);
1431 * Sets the dimensions (width and height) of a Scilab Canvas
1432 * @param canvas the canvas we want to set the dimensions of
1433 * @param newSize the size we want to set to the canvas
1434 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
1436 public static void setDims(Canvas canvas, Size newSize) {
1437 ScilabCanvasBridge.setDims(canvas, newSize);
1441 * Sets the position (X-coordinate and Y-coordinate) of a Scilab canvas
1442 * @param canvas the canvas we want to set the position of
1443 * @param newPosition the position we want to set to the canvas
1444 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
1446 public static void setPosition(Canvas canvas, Position newPosition) {
1447 ScilabCanvasBridge.setPosition(canvas, newPosition);
1451 * Sets the visibility status of a Scilab Canvas
1452 * @param canvas the canvas we want to set the visiblity status of
1453 * @param newVisibleState the visibility status we want to set to the canvas (true to set the canvas visible, false else)
1454 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
1456 public static void setVisible(Canvas canvas, boolean newVisibleState) {
1457 ScilabCanvasBridge.setVisible(canvas, newVisibleState);
1461 * @param canvas the canvas we want to display
1463 public static void display(Canvas canvas) {
1464 ScilabCanvasBridge.display(canvas);
1468 * @param canvas the canvas we want to get the GL object from
1469 * @return a GL object
1471 public static GL getGL(Canvas canvas) {
1472 return ScilabCanvasBridge.getGL(canvas);
1476 * @param canvas the canvas of which we want to set the swap buffer mode.
1477 * @param onOrOff set wether the swap buffer mode is on or off.
1479 public static void setAutoSwapBufferMode(Canvas canvas, boolean onOrOff) {
1480 ScilabCanvasBridge.setAutoSwapBufferMode(canvas, onOrOff);
1484 * @param canvas the canvas from which we want to retrieve the swap buffer mode.
1485 * @return set wether the swap buffer mode is on or off.
1487 public static boolean getAutoSwapBufferMode(Canvas canvas) {
1488 return ScilabCanvasBridge.getAutoSwapBufferMode(canvas);
1492 * @param canvas the canvas we want to repaint
1494 public static void repaint(Canvas canvas) {
1495 ScilabCanvasBridge.repaint(canvas);
1500 * Set the background of the Canvas.
1501 * @param canvas the canvas we want to modify
1502 * @param red red channel
1503 * @param green green channel
1504 * @param blue blue channel
1506 public static void setBackgroundColor(Canvas canvas, double red, double green, double blue) {
1507 ScilabCanvasBridge.setBackgroundColor(canvas, red, green, blue);
1511 * Disable the canvas before closing
1512 * @param canvas canvas to close
1514 public static void close(Canvas canvas) {
1515 ScilabCanvasBridge.close(canvas);
1519 * Dump the scilabCanvas to an BufferedImage
1520 * @param scilabCanvas ScilabCanvas
1521 * @return a BufferedImage
1523 public static BufferedImage dumpAsBufferedImage(ScilabCanvas scilabCanvas) {
1524 return ScilabCanvasBridge.dumpAsBufferedImage(scilabCanvas);
1528 * Set double buffer mode on or Off
1529 * @param useSingleBuffer if true use single buffer if false use double buffering
1530 * @param canvas canvas to modify
1532 public static void setSingleBuffered(Canvas canvas, boolean useSingleBuffer) {
1533 ScilabCanvasBridge.setSingleBuffered(canvas, useSingleBuffer);
1537 /* MenuBar Bridge */
1541 * Creates a new MenuBar
1542 * @return the created MenuBar
1544 public static SimpleMenuBar createMenuBar() {
1545 return ScilabMenuBarBridge.createMenuBar();
1549 * Append a Menu to a MenuBar
1550 * @param menuBar the MenuBar which we want to add the newMenu to
1551 * @param newMenu the Menu to add to the MenuBar
1553 public static void add(MenuBar menuBar, Menu newMenu) {
1554 ScilabMenuBarBridge.add(menuBar, newMenu);
1558 /* MenuItem Bridge */
1562 * Creates a new MenuItem
1563 * @return the created MenuItem
1565 public static SimpleMenuItem createMenuItem() {
1566 return createMenuItem(true);
1570 * Creates a new MenuItem
1571 * @param autoCheckedMode if false, menu checking is managed by the user (and not automatically by Java)
1572 * @return the created MenuItem
1574 public static SimpleMenuItem createMenuItem(boolean autoCheckedMode) {
1575 return ScilabMenuItemBridge.createMenuItem(autoCheckedMode);
1579 * Sets the Text of a MenuItem
1580 * @param menuItem the MenuItem we want to set the Text of
1581 * @param newText the Text to set for the MenuItem
1583 public static void setText(MenuItem menuItem, String newText) {
1584 ScilabMenuItemBridge.setText(menuItem, newText);
1588 * set a mnemonic to a MenuItem
1589 * @param menuItem the MenuItem which we want to add the mnemonic to
1590 * @param mnemonic the mnemonic to add to the MenuItem
1592 public static void setMnemonic(MenuItem menuItem, char mnemonic) {
1593 ScilabMenuItemBridge.setMnemonic(menuItem, mnemonic);
1597 * Add a callback to the menu, this callback is a Scilab command
1598 * @param menuItem the MenuItem which we want to add the mnemonic to
1599 * @param callback the CallBack to set.
1601 public static void setCallback(MenuItem menuItem, CommonCallBack callback) {
1602 ScilabMenuItemBridge.setCallback(menuItem, callback);
1606 * Set if the menu item is enabled or not
1607 * @param menuItem the MenuItem which we want to set the status of
1608 * @param status true if the menu item is enabled
1610 public static void setEnabled(MenuItem menuItem, boolean status) {
1611 ScilabMenuItemBridge.setEnabled(menuItem, status);
1615 * Get the enable status of a MenuItem
1616 * @param menuItem the MenuItem which we want to get the status of
1617 * @return the enable status of the MenuItem (true if the MenuItem is enabled, false if not)
1619 public static boolean isEnabled(MenuItem menuItem) {
1620 return ScilabMenuItemBridge.isEnabled(menuItem);
1624 * Get the text to a MenuItem
1625 * @param menuItem the MenuItem which we want to get the text of
1626 * @return the text of the MenuItem
1628 public static String getText(MenuItem menuItem) {
1629 return ScilabMenuItemBridge.getText(menuItem);
1633 * set a mnemonic to a MenuItem
1634 * @param menuItem the MenuItem which we want to set the mnemonic to
1635 * @param mnemonic the new mnemonic to set to the MenuItem
1637 public static void setMnemonic(MenuItem menuItem, int mnemonic) {
1638 ScilabMenuItemBridge.setMnemonic(menuItem, mnemonic);
1642 * Sets the visibility status of a Scilab MenuItem
1643 * @param menuItem the MenuItem we want to set the visiblity status of
1644 * @param newVisibleState the visibility status we want to set to the MenuItem (true to set the MenuItem visible, false else)
1645 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
1647 public static void setVisible(MenuItem menuItem, boolean newVisibleState) {
1648 ScilabMenuItemBridge.setVisible(menuItem, newVisibleState);
1652 * Gets the visibility status of a Scilab MenuItem
1653 * @param menuItem the MenuItem we want to get the visiblity status of
1654 * @return the visibility status of the MenuItem (true if the MenuItem is visible, false if not)
1655 * @see org.scilab.modules.ihm.UIElement#isVisible()
1657 public static boolean isVisible(MenuItem menuItem) {
1658 return ScilabMenuItemBridge.isVisible(menuItem);
1662 * Set the Background color of the MenuItem
1663 * @param menuItem the MenuItem we want to set the background of
1664 * @param color the Color
1666 public static void setBackground(MenuItem menuItem, Color color) {
1667 ScilabMenuItemBridge.setBackground(menuItem, color);
1671 * Get the Background color of the MenuItem
1672 * @param menuItem the MenuItem we want to get the background of
1675 public static Color getBackground(MenuItem menuItem) {
1676 return ScilabMenuItemBridge.getBackground(menuItem);
1680 * Set the Foreground color of the MenuItem
1681 * @param menuItem the MenuItem we want to set the foreground of
1682 * @param color the Color
1684 public static void setForeground(MenuItem menuItem, Color color) {
1685 ScilabMenuItemBridge.setForeground(menuItem, color);
1689 * Get the Foreground color of the MenuItem
1690 * @param menuItem the MenuItem we want to get the foreground of
1693 public static Color getForeground(MenuItem menuItem) {
1694 return ScilabMenuItemBridge.getForeground(menuItem);
1698 * Set the font of the MenuItem.
1699 * @param menuItem the MenuItem we want to set the font of
1700 * @param font the font
1702 public static void setFont(MenuItem menuItem, Font font) {
1703 ScilabMenuItemBridge.setFont(menuItem, font);
1707 * Get the font of the MenuItem.
1708 * @param menuItem the MenuItem we want to get the font of
1711 public static Font getFont(MenuItem menuItem) {
1712 return ScilabMenuItemBridge.getFont(menuItem);
1716 * Set the horizontal alignment for the MenuItem text
1717 * @param menuItem the MenuItem we want to set the alignment of
1718 * @param alignment the value for the alignment (See ScilabAlignment.java)
1720 public static void setHorizontalAlignment(MenuItem menuItem, String alignment) {
1721 ScilabMenuItemBridge.setHorizontalAlignment(menuItem, alignment);
1725 * Set the vertical alignment for the MenuItem text
1726 * @param menuItem the MenuItem we want to set the alignment of
1727 * @param alignment the value for the alignment (See ScilabAlignment.java)
1729 public static void setVerticalAlignment(MenuItem menuItem, String alignment) {
1730 ScilabMenuItemBridge.setVerticalAlignment(menuItem, alignment);
1734 * Set the Relief of the MenuItem
1735 * @param menuItem the MenuItem which we want to set the Relief of
1736 * @param reliefType the type of the relief to set (See ScilabRelief.java)
1738 public static void setRelief(MenuItem menuItem, String reliefType) {
1739 ScilabMenuItemBridge.setRelief(menuItem, reliefType);
1743 * Add a MenuItem to the MenuItem
1744 * @param parentMenuItem the MenuItem where we want to add a MenuItem
1745 * @param childMenuItem the MenuItem we want to add
1747 public static void add(MenuItem parentMenuItem, MenuItem childMenuItem) {
1748 ScilabMenuItemBridge.add(parentMenuItem, childMenuItem);
1752 * Add a Menu to the MenuItem
1753 * @param parentMenuItem the MenuItem where we want to add a MenuItem
1754 * @param childMenu the Menu we want to add
1756 public static void add(MenuItem parentMenuItem, Menu childMenu) {
1757 ScilabMenuItemBridge.add(parentMenuItem, childMenu);
1761 * Destroy the MenuItem
1762 * @param menuItem the MenuItem to be destroyed
1764 public static void destroy(MenuItem menuItem) {
1765 ScilabMenuItemBridge.destroy(menuItem);
1769 * Give the focus to the MenuItem
1770 * @param menuItem the MenuItem
1772 public static void requestFocus(MenuItem menuItem) {
1773 ScilabMenuItemBridge.requestFocus(menuItem);
1777 * Retrieve the CallBack associated to this MenuItem
1778 * @param menuItem the MenuItem
1779 * @return the CallBack
1781 public static CommonCallBack getCallback(MenuItem menuItem) {
1782 return ScilabMenuItemBridge.getCallback(menuItem);
1786 * Set if the MenuItem is checked or not
1787 * @param menuItem the MenuItem
1788 * @param status true if the MenuItem is checked
1790 public static void setChecked(MenuItem menuItem, boolean status) {
1791 ScilabMenuItemBridge.setChecked(menuItem, status);
1795 * Get if the MenuItem is checked or not
1796 * @param menuItem the MenuItem
1797 * @return true if the MenuItem is checked
1799 public static boolean isChecked(MenuItem menuItem) {
1800 return ScilabMenuItemBridge.isChecked(menuItem);
1803 /****************************/
1804 /* CheckBox MenuItem Bridge */
1805 /****************************/
1808 * Creates a new CheckBoxMenuItem
1809 * @return the created CheckBoxMenuItem
1811 public static SimpleCheckBoxMenuItem createCheckBoxMenuItem() {
1812 return createCheckBoxMenuItem(true);
1816 * Creates a new CheckBoxMenuItem
1817 * @param autoCheckedMode if false, menu checking is managed by the user (and not automatically by Java)
1818 * @return the created CheckBoxMenuItem
1820 public static SimpleCheckBoxMenuItem createCheckBoxMenuItem(boolean autoCheckedMode) {
1821 return ScilabCheckBoxMenuItemBridge.createCheckBoxMenuItem(autoCheckedMode);
1825 * Add a MenuItem to the CheckBoxMenuItem
1826 * @param parentMenuItem the MenuItem where we want to add a CheckBoxMenuItem
1827 * @param childMenuItem the MenuItem we want to add
1829 public static void add(CheckBoxMenuItem parentMenuItem, MenuItem childMenuItem) {
1830 ScilabMenuItemBridge.add(parentMenuItem, childMenuItem);
1834 * Sets the Text of a CheckBoxMenuItem
1835 * @param checkBoxMenuItem the CheckBoxMenuItem we want to set the Text of
1836 * @param newText the Text to set for the CheckBoxMenuItem
1838 public static void setText(CheckBoxMenuItem checkBoxMenuItem, String newText) {
1839 ScilabCheckBoxMenuItemBridge.setText(checkBoxMenuItem, newText);
1843 * set a mnemonic to a CheckBoxMenuItem
1844 * @param checkBoxMenuItem the CheckBoxMenuItem which we want to add the mnemonic to
1845 * @param mnemonic the mnemonic to add to the CheckBoxMenuItem
1847 public static void setMnemonic(CheckBoxMenuItem checkBoxMenuItem, char mnemonic) {
1848 ScilabCheckBoxMenuItemBridge.setMnemonic(checkBoxMenuItem, mnemonic);
1852 * Add a callback to the menu, this callback is a Scilab command
1853 * @param checkBoxMenuItem the CheckBoxMenuItem which we want to add the mnemonic to
1854 * @param callback the CallBack to set.
1856 public static void setCallback(CheckBoxMenuItem checkBoxMenuItem, CommonCallBack callback) {
1857 ScilabCheckBoxMenuItemBridge.setCallback(checkBoxMenuItem, callback);
1861 * Set if the menu item is enabled or not
1862 * @param checkBoxMenuItem the CheckBoxMenuItem which we want to set the status of
1863 * @param status true if the menu item is enabled
1865 public static void setEnabled(CheckBoxMenuItem checkBoxMenuItem, boolean status) {
1866 ScilabCheckBoxMenuItemBridge.setEnabled(checkBoxMenuItem, status);
1870 * Get the enable status of a CheckBoxMenuItem
1871 * @param checkBoxMenuItem the CheckBoxMenuItem which we want to get the status of
1872 * @return the enable status of the CheckBoxMenuItem (true if the CheckBoxMenuItem is enabled, false if not)
1874 public static boolean isEnabled(CheckBoxMenuItem checkBoxMenuItem) {
1875 return ScilabCheckBoxMenuItemBridge.isEnabled(checkBoxMenuItem);
1879 * Get the text to a CheckBoxMenuItem
1880 * @param checkBoxMenuItem the CheckBoxMenuItem which we want to get the text of
1881 * @return the text of the CheckBoxMenuItem
1883 public static String getText(CheckBoxMenuItem checkBoxMenuItem) {
1884 return ScilabCheckBoxMenuItemBridge.getText(checkBoxMenuItem);
1888 * set a mnemonic to a CheckBoxMenuItem
1889 * @param checkBoxMenuItem the CheckBoxMenuItem which we want to set the mnemonic to
1890 * @param mnemonic the new mnemonic to set to the CheckBoxMenuItem
1892 public static void setMnemonic(CheckBoxMenuItem checkBoxMenuItem, int mnemonic) {
1893 ScilabCheckBoxMenuItemBridge.setMnemonic(checkBoxMenuItem, mnemonic);
1897 * Sets the visibility status of a Scilab CheckBoxMenuItem
1898 * @param checkBoxMenuItem the CheckBoxMenuItem we want to set the visiblity status of
1899 * @param newVisibleState the visibility status we want to set to the CheckBoxMenuItem (true to set the CheckBoxMenuItem visible, false else)
1900 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
1902 public static void setVisible(CheckBoxMenuItem checkBoxMenuItem, boolean newVisibleState) {
1903 ScilabCheckBoxMenuItemBridge.setVisible(checkBoxMenuItem, newVisibleState);
1907 * Gets the visibility status of a Scilab CheckBoxMenuItem
1908 * @param checkBoxMenuItem the CheckBoxMenuItem we want to get the visiblity status of
1909 * @return the visibility status of the CheckBoxMenuItem (true if the CheckBoxMenuItem is visible, false if not)
1910 * @see org.scilab.modules.ihm.UIElement#isVisible()
1912 public static boolean isVisible(CheckBoxMenuItem checkBoxMenuItem) {
1913 return ScilabCheckBoxMenuItemBridge.isVisible(checkBoxMenuItem);
1917 * Set the Background color of the CheckBoxMenuItem
1918 * @param checkBoxMenuItem the CheckBoxMenuItem we want to set the background of
1919 * @param color the Color
1921 public static void setBackground(CheckBoxMenuItem checkBoxMenuItem, Color color) {
1922 ScilabCheckBoxMenuItemBridge.setBackground(checkBoxMenuItem, color);
1926 * Get the Background color of the CheckBoxMenuItem
1927 * @param checkBoxMenuItem the CheckBoxMenuItem we want to get the background of
1930 public static Color getBackground(CheckBoxMenuItem checkBoxMenuItem) {
1931 return ScilabCheckBoxMenuItemBridge.getBackground(checkBoxMenuItem);
1935 * Set the Foreground color of the CheckBoxMenuItem
1936 * @param checkBoxMenuItem the CheckBoxMenuItem we want to set the foreground of
1937 * @param color the Color
1939 public static void setForeground(CheckBoxMenuItem checkBoxMenuItem, Color color) {
1940 ScilabCheckBoxMenuItemBridge.setForeground(checkBoxMenuItem, color);
1944 * Get the Foreground color of the CheckBoxMenuItem
1945 * @param checkBoxMenuItem the CheckBoxMenuItem we want to get the foreground of
1948 public static Color getForeground(CheckBoxMenuItem checkBoxMenuItem) {
1949 return ScilabCheckBoxMenuItemBridge.getForeground(checkBoxMenuItem);
1953 * Set the font of the CheckBoxMenuItem.
1954 * @param checkBoxMenuItem the CheckBoxMenuItem we want to set the font of
1955 * @param font the font
1957 public static void setFont(CheckBoxMenuItem checkBoxMenuItem, Font font) {
1958 ScilabCheckBoxMenuItemBridge.setFont(checkBoxMenuItem, font);
1962 * Get the font of the CheckBoxMenuItem.
1963 * @param checkBoxMenuItem the CheckBoxMenuItem we want to get the font of
1966 public static Font getFont(CheckBoxMenuItem checkBoxMenuItem) {
1967 return ScilabCheckBoxMenuItemBridge.getFont(checkBoxMenuItem);
1971 * Set the horizontal alignment for the CheckBoxMenuItem text
1972 * @param checkBoxMenuItem the CheckBoxMenuItem we want to set the alignment of
1973 * @param alignment the value for the alignment (See ScilabAlignment.java)
1975 public static void setHorizontalAlignment(CheckBoxMenuItem checkBoxMenuItem, String alignment) {
1976 ScilabCheckBoxMenuItemBridge.setHorizontalAlignment(checkBoxMenuItem, alignment);
1980 * Set the vertical alignment for the CheckBoxMenuItem text
1981 * @param checkBoxMenuItem the CheckBoxMenuItem we want to set the alignment of
1982 * @param alignment the value for the alignment (See ScilabAlignment.java)
1984 public static void setVerticalAlignment(CheckBoxMenuItem checkBoxMenuItem, String alignment) {
1985 ScilabCheckBoxMenuItemBridge.setVerticalAlignment(checkBoxMenuItem, alignment);
1989 * Set the Relief of the CheckBoxMenuItem
1990 * @param checkBoxMenuItem the CheckBoxMenuItem which we want to set the Relief of
1991 * @param reliefType the type of the relief to set (See ScilabRelief.java)
1993 public static void setRelief(CheckBoxMenuItem checkBoxMenuItem, String reliefType) {
1994 ScilabCheckBoxMenuItemBridge.setRelief(checkBoxMenuItem, reliefType);
1998 * Add a CheckBoxMenuItem to the CheckBoxMenuItem
1999 * @param parentCheckBoxMenuItem the CheckBoxMenuItem where we want to add a CheckBoxMenuItem
2000 * @param childCheckBoxMenuItem the CheckBoxMenuItem we want to add
2002 public static void add(CheckBoxMenuItem parentCheckBoxMenuItem, CheckBoxMenuItem childCheckBoxMenuItem) {
2003 ScilabCheckBoxMenuItemBridge.add(parentCheckBoxMenuItem, childCheckBoxMenuItem);
2007 * Add a Menu to the CheckBoxMenuItem
2008 * @param parentCheckBoxMenuItem the CheckBoxMenuItem where we want to add a CheckBoxMenuItem
2009 * @param childMenu the Menu we want to add
2011 public static void add(CheckBoxMenuItem parentCheckBoxMenuItem, Menu childMenu) {
2012 ScilabCheckBoxMenuItemBridge.add(parentCheckBoxMenuItem, childMenu);
2016 * Destroy the CheckBoxMenuItem
2017 * @param checkBoxMenuItem the CheckBoxMenuItem to be destroyed
2019 public static void destroy(CheckBoxMenuItem checkBoxMenuItem) {
2020 ScilabCheckBoxMenuItemBridge.destroy(checkBoxMenuItem);
2024 * Give the focus to the CheckBoxMenuItem
2025 * @param checkBoxMenuItem the CheckBoxMenuItem
2027 public static void requestFocus(CheckBoxMenuItem checkBoxMenuItem) {
2028 ScilabCheckBoxMenuItemBridge.requestFocus(checkBoxMenuItem);
2032 * Retrieve the CallBack associated to this CheckBoxMenuItem
2033 * @param checkBoxMenuItem the CheckBoxMenuItem
2034 * @return the CallBack
2036 public static CommonCallBack getCallback(CheckBoxMenuItem checkBoxMenuItem) {
2037 return ScilabCheckBoxMenuItemBridge.getCallback(checkBoxMenuItem);
2041 * Set if the CheckBoxMenuItem is checked or not
2042 * @param checkBoxMenuItem the CheckBoxMenuItem
2043 * @param status true if the CheckBoxMenuItem is checked
2045 public static void setChecked(CheckBoxMenuItem checkBoxMenuItem, boolean status) {
2046 ScilabCheckBoxMenuItemBridge.setChecked(checkBoxMenuItem, status);
2050 * Get if the CheckBoxMenuItem is checked or not
2051 * @param checkBoxMenuItem the CheckBoxMenuItem
2052 * @return true if the CheckBoxMenuItem is checked
2054 public static boolean isChecked(CheckBoxMenuItem checkBoxMenuItem) {
2055 return ScilabCheckBoxMenuItemBridge.isChecked(checkBoxMenuItem);
2063 * Creates a new Menu
2064 * @return the created Menu
2066 public static SimpleMenu createMenu() {
2067 return ScilabMenuBridge.createMenu();
2071 * Retrieve the CallBack associated to this Menu
2072 * @param menu the Menu
2073 * @return the CallBack
2075 public static CommonCallBack getCallback(Menu menu) {
2076 return ScilabMenuBridge.getCallback(menu);
2080 * Append a MenuItem to a Menu
2081 * @param menu the Menu which we want to add the MenuItem to
2082 * @param newMenuItem the MenuItem to add to the Menu
2084 public static void add(Menu menu, MenuItem newMenuItem) {
2085 ScilabMenuBridge.add(menu, newMenuItem);
2089 * Append a CheckBoxMenuItem to a Menu
2090 * @param menu the Menu which we want to add the CheckBoxMenuItem to
2091 * @param newCheckBoxMenuItem the MenuItem to add to the Menu
2093 public static void add(Menu menu, CheckBoxMenuItem newCheckBoxMenuItem) {
2094 ScilabMenuBridge.add(menu, newCheckBoxMenuItem);
2098 * Append a Menu to a Menu
2099 * @param menu the Menu which we want to append the Menu to
2100 * @param newSubMenu the Menu to append to the Menu
2102 public static void add(Menu menu, Menu newSubMenu) {
2103 ScilabMenuBridge.add(menu, newSubMenu);
2107 * set a text to a menu
2108 * @param menu the Menu which we want to set the text to
2109 * @param newText the new text to set to the menu
2111 public static void setText(Menu menu, String newText) {
2112 ScilabMenuBridge.setText(menu, newText);
2116 * Get the text to a menu
2117 * @param menu the Menu which we want to get the text of
2118 * @return the text of the menu
2120 public static String getText(Menu menu) {
2121 return ScilabMenuBridge.getText(menu);
2125 * set a mnemonic to a menu
2126 * @param menu the Menu which we want to set the mnemonic to
2127 * @param mnemonic the new mnemonic to set to the menu
2129 public static void setMnemonic(Menu menu, int mnemonic) {
2130 ScilabMenuBridge.setMnemonic(menu, mnemonic);
2134 * Add a Separator to a Menu
2135 * @param menu the Menu which we want to add the Separator to
2137 public static void addSeparator(Menu menu) {
2138 ScilabMenuBridge.addSeparator(menu);
2142 * Set if the menu is enabled or not
2143 * @param menu the menu which we want to set the status of
2144 * @param status true if the menu item is enabled
2146 public static void setEnabled(Menu menu, boolean status) {
2147 ScilabMenuBridge.setEnabled(menu, status);
2151 * Gets the enable status of a Menu
2152 * @param menu the menu which we want to get the status of
2153 * @return the enable status of the Menu (true if the Menu is enabled, false if not)
2155 public static boolean isEnabled(Menu menu) {
2156 return ScilabMenuBridge.isEnabled(menu);
2160 * Sets the visibility status of a Scilab menu
2161 * @param menu the menu we want to set the visiblity status of
2162 * @param newVisibleState the visibility status we want to set to the menu (true to set the menu visible, false else)
2163 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
2165 public static void setVisible(Menu menu, boolean newVisibleState) {
2166 ScilabMenuBridge.setVisible(menu, newVisibleState);
2170 * Gets the visibility status of a Scilab Menu
2171 * @param menu the menu we want to get the visiblity status of
2172 * @return the visibility status of the menu (true if the menu is visible, false if not)
2173 * @see org.scilab.modules.ihm.UIElement#isVisible()
2175 public static boolean isVisible(Menu menu) {
2176 return ScilabMenuBridge.isVisible(menu);
2180 * Set the Background color of the menu
2181 * @param menu the menu we want to set the background of
2182 * @param color the Color
2184 public static void setBackground(Menu menu, Color color) {
2185 ScilabMenuBridge.setBackground(menu, color);
2189 * Get the Background color of the menu
2190 * @param menu the menu we want to get the background of
2193 public static Color getBackground(Menu menu) {
2194 return ScilabMenuBridge.getBackground(menu);
2198 * Set the Foreground color of the menu
2199 * @param menu the menu we want to set the foreground of
2200 * @param color the Color
2202 public static void setForeground(Menu menu, Color color) {
2203 ScilabMenuBridge.setForeground(menu, color);
2207 * Get the Foreground color of the menu
2208 * @param menu the menu we want to get the foreground of
2211 public static Color getForeground(Menu menu) {
2212 return ScilabMenuBridge.getForeground(menu);
2216 * Set the font of the menu.
2217 * @param menu the menu we want to set the font of
2218 * @param font the font
2220 public static void setFont(Menu menu, Font font) {
2221 ScilabMenuBridge.setFont(menu, font);
2225 * Get the font of the menu.
2226 * @param menu the menu we want to get the font of
2229 public static Font getFont(Menu menu) {
2230 return ScilabMenuBridge.getFont(menu);
2234 * Add a callback to the menu, this callback is a Scilab command
2235 * @param menu the menu we want to set the callback of
2236 * @param callback the CallBack to set.
2238 public static void setCallback(Menu menu, CommonCallBack callback) {
2239 ScilabMenuBridge.setCallback(menu, callback);
2243 * Set the horizontal alignment for the Menu text
2244 * @param menu the Menu we want to set the alignment of
2245 * @param alignment the value for the alignment (See ScilabAlignment.java)
2247 public static void setHorizontalAlignment(Menu menu, String alignment) {
2248 ScilabMenuBridge.setHorizontalAlignment(menu, alignment);
2252 * Set the vertical alignment for the Menu text
2253 * @param menu the Menu we want to set the alignment of
2254 * @param alignment the value for the alignment (See ScilabAlignment.java)
2256 public static void setVerticalAlignment(Menu menu, String alignment) {
2257 ScilabMenuBridge.setVerticalAlignment(menu, alignment);
2261 * Set the Relief of the Menu
2262 * @param menu the Menu which we want to set the Relief of
2263 * @param reliefType the type of the relief to set (See ScilabRelief.java)
2265 public static void setRelief(Menu menu, String reliefType) {
2266 ScilabMenuBridge.setRelief(menu, reliefType);
2271 * @param menu the Menu to be destroyed
2273 public static void destroy(Menu menu) {
2274 ScilabMenuBridge.destroy(menu);
2278 * Give the focus to the Menu
2279 * @param menu the Menu
2281 public static void requestFocus(Menu menu) {
2282 ScilabMenuBridge.requestFocus(menu);
2286 * Set if the Menu is checked or not
2287 * @param menu the Menu
2288 * @param status true if the Menu is checked
2290 public static void setChecked(Menu menu, boolean status) {
2291 ScilabMenuBridge.setChecked(menu, status);
2295 * Get if the Menu is checked or not
2296 * @param menu the Menu
2297 * @return true if the Menu is checked
2299 public static boolean isChecked(Menu menu) {
2300 return ScilabMenuBridge.isChecked(menu);
2303 /**********************/
2304 /* ContextMenu Bridge */
2305 /**********************/
2308 * Creates a new ContextMenu
2309 * @return the created ContextMenu
2311 public static SimpleContextMenu createContextMenu() {
2312 return ScilabContextMenuBridge.createContextMenu();
2316 * Append a MenuItem to a ContextMenu
2317 * @param contextMenu the ContextMenu which we want to add the MenuItem to
2318 * @param newMenuItem the MenuItem to add to the ContextMenu
2320 public static void add(ContextMenu contextMenu, MenuItem newMenuItem) {
2321 ScilabContextMenuBridge.add(contextMenu, newMenuItem);
2325 * Append a Menu to a ContextMenu
2326 * @param contextMenu the ContextMenu which we want to add the MenuItem to
2327 * @param newMenu the Menu to add to the ContextMenu
2329 public static void add(ContextMenu contextMenu, Menu newMenu) {
2330 ScilabContextMenuBridge.add(contextMenu, newMenu);
2334 * set a text to a ContextMenu
2335 * @param contextMenu the Menu which we want to set the text to
2336 * @param newText the new text to set to the contextMenu
2338 public static void setText(ContextMenu contextMenu, String newText) {
2339 ScilabContextMenuBridge.setText(contextMenu, newText);
2343 * Get the text to a contextMenu
2344 * @param contextMenu the ContextMenu which we want to get the text of
2345 * @return the text of the contextMenu
2347 public static String getText(ContextMenu contextMenu) {
2348 return ScilabContextMenuBridge.getText(contextMenu);
2352 * Set if the contextMenu is enabled or not
2353 * @param contextMenu the contextMenu which we want to set the status of
2354 * @param status true if the contextMenu item is enabled
2356 public static void setEnabled(ContextMenu contextMenu, boolean status) {
2357 ScilabContextMenuBridge.setEnabled(contextMenu, status);
2361 * Gets the enable status of a ContextMenu
2362 * @param contextMenu the contextMenu which we want to get the status of
2363 * @return the enable status of the ContextMenu (true if the ContextMenu is enabled, false if not)
2365 public static boolean isEnabled(ContextMenu contextMenu) {
2366 return ScilabContextMenuBridge.isEnabled(contextMenu);
2370 * Sets the visibility status of a Scilab contextMenu
2371 * @param contextMenu the contextMenu we want to set the visiblity status of
2372 * @param newVisibleState the visibility status we want to set to the contextMenu (true to set the contextMenu visible, false else)
2373 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
2375 public static void setVisible(ContextMenu contextMenu, boolean newVisibleState) {
2376 ScilabContextMenuBridge.setVisible(contextMenu, newVisibleState);
2380 * Gets the visibility status of a Scilab ContextMenu
2381 * @param contextMenu the contextMenu we want to get the visiblity status of
2382 * @return the visibility status of the contextMenu (true if the contextMenu is visible, false if not)
2383 * @see org.scilab.modules.ihm.UIElement#isVisible()
2385 public static boolean isVisible(ContextMenu contextMenu) {
2386 return ScilabContextMenuBridge.isVisible(contextMenu);
2390 * Set the Background color of the contextMenu
2391 * @param contextMenu the contextMenu we want to set the background of
2392 * @param color the Color
2394 public static void setBackground(ContextMenu contextMenu, Color color) {
2395 ScilabContextMenuBridge.setBackground(contextMenu, color);
2399 * Get the Background color of the contextMenu
2400 * @param contextMenu the contextMenu we want to get the background of
2403 public static Color getBackground(ContextMenu contextMenu) {
2404 return ScilabContextMenuBridge.getBackground(contextMenu);
2408 * Set the Foreground color of the contextMenu
2409 * @param contextMenu the contextMenu we want to set the foreground of
2410 * @param color the Color
2412 public static void setForeground(ContextMenu contextMenu, Color color) {
2413 ScilabContextMenuBridge.setForeground(contextMenu, color);
2417 * Get the Foreground color of the contextMenu
2418 * @param contextMenu the contextMenu we want to get the foreground of
2421 public static Color getForeground(ContextMenu contextMenu) {
2422 return ScilabContextMenuBridge.getForeground(contextMenu);
2426 * Set the font of the contextMenu.
2427 * @param contextMenu the contextMenu we want to set the font of
2428 * @param font the font
2430 public static void setFont(ContextMenu contextMenu, Font font) {
2431 ScilabContextMenuBridge.setFont(contextMenu, font);
2435 * Get the font of the contextMenu.
2436 * @param contextMenu the contextMenu we want to get the font of
2439 public static Font getFont(ContextMenu contextMenu) {
2440 return ScilabContextMenuBridge.getFont(contextMenu);
2444 * Add a callback to the contextMenu, this callback is a Scilab command
2445 * @param contextMenu the contextMenu we want to set the callback of
2446 * @param callback the CallBack to set.
2448 public static void setCallback(ContextMenu contextMenu, CommonCallBack callback) {
2449 ScilabContextMenuBridge.setCallback(contextMenu, callback);
2453 * Set the horizontal alignment for the ContextMenu text
2454 * @param contextMenu the ContextMenu we want to set the alignment of
2455 * @param alignment the value for the alignment (See ScilabAlignment.java)
2457 public static void setHorizontalAlignment(ContextMenu contextMenu, String alignment) {
2458 ScilabContextMenuBridge.setHorizontalAlignment(contextMenu, alignment);
2462 * Set the vertical alignment for the ContextMenu text
2463 * @param contextMenu the ContextMenu we want to set the alignment of
2464 * @param alignment the value for the alignment (See ScilabAlignment.java)
2466 public static void setVerticalAlignment(ContextMenu contextMenu, String alignment) {
2467 ScilabContextMenuBridge.setVerticalAlignment(contextMenu, alignment);
2471 * Set the Relief of the ContextMenu
2472 * @param contextMenu the ContextMenu which we want to set the Relief of
2473 * @param reliefType the type of the relief to set (See ScilabRelief.java)
2475 public static void setRelief(ContextMenu contextMenu, String reliefType) {
2476 ScilabContextMenuBridge.setRelief(contextMenu, reliefType);
2480 * Delete the ContextMenu
2481 * @param contextMenu the ContextMenu to be destroyed
2483 public static void destroy(ContextMenu contextMenu) {
2484 ScilabContextMenuBridge.destroy(contextMenu);
2488 * Give the focus to the ContextMenu
2489 * @param contextMenu the ContextMenu
2491 public static void requestFocus(ContextMenu contextMenu) {
2492 ScilabContextMenuBridge.requestFocus(contextMenu);
2495 /********************/
2496 /* Separator Bridge */
2497 /********************/
2500 * Creates a new Separator
2501 * @return the created Separator
2503 public static Separator createSeparator() {
2504 return ScilabSeparatorBridge.createSeparator();
2508 /* PushButton Bridge */
2512 * Creates a new PushButton
2513 * @return the created PushButton
2515 public static SimplePushButton createPushButton() {
2516 return ScilabPushButtonBridge.createPushButton();
2520 * Draws a pushButton on screen
2521 * @param pushButton the pushButton to be drawn
2523 public static void draw(PushButton pushButton) {
2524 ScilabPushButtonBridge.draw(pushButton);
2528 * Gets the dimensions (width and height) of a pushButton
2529 * @param pushButton the pushButton we want to get the dimensions of
2530 * @return dimensions of the pushButton
2532 public static Size getDims(PushButton pushButton) {
2533 return ScilabPushButtonBridge.getDims(pushButton);
2537 * Sets the dimensions (width and height) of a pushButton
2538 * @param pushButton the pushButton we want to set the dimensions of
2539 * @param newSize new dimensions of the pushButton
2541 public static void setDims(PushButton pushButton, Size newSize) {
2542 ScilabPushButtonBridge.setDims(pushButton, newSize);
2546 * Gets the position (X-coordinate and Y-coordinate) of a pushButton
2547 * @param pushButton the pushButton we want to get the position of
2548 * @return position of the pushButton
2550 public static Position getPosition(PushButton pushButton) {
2551 return ScilabPushButtonBridge.getPosition(pushButton);
2555 * Sets the position (X-coordinate and Y-coordinate) of a pushButton
2556 * @param pushButton the pushButton we want to set the position of
2557 * @param newPosition new position of the pushButton
2559 public static void setPosition(PushButton pushButton, Position newPosition) {
2560 ScilabPushButtonBridge.setPosition(pushButton, newPosition);
2564 * Gets the visibility status of a pushButton
2565 * @param pushButton the pushButton we want to get the status of
2566 * @return visibility status (true if the pushButton is visible, false if not)
2568 public static boolean isVisible(PushButton pushButton) {
2569 return ScilabPushButtonBridge.isVisible(pushButton);
2573 * Sets the visibility status for a pushButton
2574 * @param pushButton the pushButton we want to set the visibility status of
2575 * @param newVisibleState new visibility status for the pushButton
2576 * (true set the pushButton visible, false to set the pushButton invisible)
2578 public static void setVisible(PushButton pushButton, boolean newVisibleState) {
2579 ScilabPushButtonBridge.setVisible(pushButton, newVisibleState);
2583 * Sets the Text of a PushButton
2584 * @param pushButton the PushButton we want to set the Text of
2585 * @param newText the Text to set for the PushButton
2587 public static void setText(PushButton pushButton, String newText) {
2588 ScilabPushButtonBridge.setText(pushButton, newText);
2592 * Gets the Text of a PushButton
2593 * @param pushButton the PushButton we want to get the Text of
2594 * @return the Text of the PushButton
2596 public static String getText(PushButton pushButton) {
2597 return ScilabPushButtonBridge.getText(pushButton);
2601 * Sets the icon of a PushButton
2602 * @param pushButton the PushButton we want to set the icon of
2603 * @param filename the path to the icon image to set to the PushButton
2605 public static void setIcon(PushButton pushButton, String filename) {
2606 ScilabPushButtonBridge.setIcon(pushButton, filename);
2610 * Add a callback to the pushbutton
2611 * @param pushButton the PushButton we want to set the callback of
2612 * @param callback the CallBack to set.
2614 public static void setCallback(PushButton pushButton, CommonCallBack callback) {
2615 ScilabPushButtonBridge.setCallback(pushButton, callback);
2619 * Set if the pushbutton is enabled or not
2620 * @param pushButton the PushButton we want to set the status of
2621 * @param status true if the pushbutton is enabled
2623 public static void setEnabled(PushButton pushButton, boolean status) {
2624 ScilabPushButtonBridge.setEnabled(pushButton, status);
2628 * Gets the enable status of a PushButton
2629 * @param pushButton the PushButton we want to get the status of
2630 * @return the enable status of the PushButton (true if the PushButton is enabled, false if not)
2632 public static boolean isEnabled(PushButton pushButton) {
2633 return ScilabPushButtonBridge.isEnabled(pushButton);
2637 * Set the Background color of the pushbutton
2638 * @param pushButton the PushButton we want to set the background of
2639 * @param color the Color
2641 public static void setBackground(PushButton pushButton, Color color) {
2642 ScilabPushButtonBridge.setBackground(pushButton, color);
2646 * Get the Background color of the pushbutton
2647 * @param pushButton the PushButton we want to get the background of
2650 public static Color getBackground(PushButton pushButton) {
2651 return ScilabPushButtonBridge.getBackground(pushButton);
2655 * Set the Foreground color of the pushbutton
2656 * @param pushButton the PushButton we want to set the foreground of
2657 * @param color the Color
2659 public static void setForeground(PushButton pushButton, Color color) {
2660 ScilabPushButtonBridge.setForeground(pushButton, color);
2664 * Get the Foreground color of the pushbutton
2665 * @param pushButton the PushButton we want to get the foreground of
2668 public static Color getForeground(PushButton pushButton) {
2669 return ScilabPushButtonBridge.getForeground(pushButton);
2673 * Set the font of the pushbutton.
2674 * @param pushButton the pushbutton we want to set the font of
2675 * @param font the font
2677 public static void setFont(PushButton pushButton, Font font) {
2678 ScilabPushButtonBridge.setFont(pushButton, font);
2682 * Get the font of the pushbutton.
2683 * @param pushButton the pushbutton we want to get the font of
2686 public static Font getFont(PushButton pushButton) {
2687 return ScilabPushButtonBridge.getFont(pushButton);
2691 * Set the horizontal alignment for the PushButton text
2692 * @param pushButton the PushButton we want to set the alignment of
2693 * @param alignment the value for the alignment (See ScilabAlignment.java)
2695 public static void setHorizontalAlignment(PushButton pushButton, String alignment) {
2696 ScilabPushButtonBridge.setHorizontalAlignment(pushButton, alignment);
2700 * Set the vertical alignment for the PushButton text
2701 * @param pushButton the PushButton we want to set the alignment of
2702 * @param alignment the value for the alignment (See ScilabAlignment.java)
2704 public static void setVerticalAlignment(PushButton pushButton, String alignment) {
2705 ScilabPushButtonBridge.setVerticalAlignment(pushButton, alignment);
2709 * Set the Relief of the PushButton
2710 * @param pushButton the PushButton which we want to set the Relief of
2711 * @param reliefType the type of the relief to set (See ScilabRelief.java)
2713 public static void setRelief(PushButton pushButton, String reliefType) {
2714 ScilabPushButtonBridge.setRelief(pushButton, reliefType);
2718 * Delete the PushButton
2719 * @param pushButton the PushButton to be destroyed
2721 public static void destroy(PushButton pushButton) {
2722 ScilabPushButtonBridge.destroy(pushButton);
2726 * Set the string to be displayed when the mouse cursor is over the PushButton
2727 * @param pushButton the PushButton
2728 * @param toolTipText the string to set
2730 public static void setToolTipText(PushButton pushButton, String toolTipText) {
2731 ScilabPushButtonBridge.setToolTipText(pushButton, toolTipText);
2735 * Give the focus to the PushButton
2736 * @param pushButton the PushButton
2738 public static void requestFocus(PushButton pushButton) {
2739 ScilabPushButtonBridge.requestFocus(pushButton);
2742 /******************/
2743 /* TextBox Bridge */
2744 /******************/
2747 * Creates a new TextBox
2748 * @return the created TextBox
2750 public static SimpleTextBox createTextBox() {
2751 return ScilabTextBoxBridge.createTextBox();
2755 * Sets the Text of a TextBox
2756 * @param textBox the TextBox we want to set the Text of
2757 * @param newText the Text to set for the TextBox
2759 public static void setText(TextBox textBox, String newText) {
2760 ScilabTextBoxBridge.setText(textBox, newText);
2764 * Gets the text of an TextBox
2765 * @param textBox the TextBox we want to get the text of
2766 * @return the text of the TextBox
2768 public static String getText(TextBox textBox) {
2769 return ScilabTextBoxBridge.getText(textBox);
2773 * Draws a Scilab TextBox
2774 * @param textBox the TextBox to draw
2775 * @see org.scilab.modules.ihm.UIElement#draw()
2777 public static void draw(TextBox textBox) {
2778 ScilabTextBoxBridge.draw(textBox);
2782 * Gets the dimensions (width and height) of a Scilab TextBox
2783 * @param textBox the TextBox we want to get the dimensions of
2784 * @return the size of the textBox
2785 * @see org.scilab.modules.ihm.UIElement#getDims()
2787 public static Size getDims(TextBox textBox) {
2788 return ScilabTextBoxBridge.getDims(textBox);
2792 * Gets the position (X-coordinate and Y-coordinate) of a Scilab textBox
2793 * @param textBox the textBox we want to get the position of
2794 * @return the position of the textBox
2795 * @see org.scilab.modules.ihm.UIElement#getPosition()
2797 public static Position getPosition(TextBox textBox) {
2798 return ScilabTextBoxBridge.getPosition(textBox);
2802 * Gets the visibility status of a Scilab TextBox
2803 * @param textBox the textBox we want to get the visiblity status of
2804 * @return the visibility status of the textBox (true if the textBox is visible, false if not)
2805 * @see org.scilab.modules.ihm.UIElement#isVisible()
2807 public static boolean isVisible(TextBox textBox) {
2808 return ScilabTextBoxBridge.isVisible(textBox);
2812 * Set the status of the TextBox
2813 * @param textBox the textBox we want to set the status of
2814 * @param status true if the TextBox is enabled
2815 * @see org.scilab.modules.gui.widget.Widget#setEnabled(boolean)
2817 public static void setEnabled(TextBox textBox, boolean status) {
2818 ScilabTextBoxBridge.setEnabled(textBox, status);
2822 * Gets the enable status of a TextBox
2823 * @param textBox the textBox we want to get the status of
2824 * @return the enable status of the TextBox (true if the TextBox is enabled, false if not)
2826 public static boolean isEnabled(TextBox textBox) {
2827 return ScilabTextBoxBridge.isEnabled(textBox);
2831 * Sets the dimensions (width and height) of a Scilab TextBox
2832 * @param textBox the textBox we want to set the dimensions of
2833 * @param newSize the size we want to set to the textBox
2834 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
2836 public static void setDims(TextBox textBox, Size newSize) {
2837 ScilabTextBoxBridge.setDims(textBox, newSize);
2841 * Sets the position (X-coordinate and Y-coordinate) of a Scilab textBox
2842 * @param textBox the textBox we want to set the position of
2843 * @param newPosition the position we want to set to the textBox
2844 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
2846 public static void setPosition(TextBox textBox, Position newPosition) {
2847 ScilabTextBoxBridge.setPosition(textBox, newPosition);
2851 * Sets the visibility status of a Scilab TextBox
2852 * @param textBox the textBox we want to set the visiblity status of
2853 * @param newVisibleState the visibility status we want to set to the textBox (true to set the textBox visible, false else)
2854 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
2856 public static void setVisible(TextBox textBox, boolean newVisibleState) {
2857 ScilabTextBoxBridge.setVisible(textBox, newVisibleState);
2861 * Set the Background color of the textbox
2862 * @param textBox the textbox we want to set the background of
2863 * @param color the Color
2865 public static void setBackground(TextBox textBox, Color color) {
2866 ScilabTextBoxBridge.setBackground(textBox, color);
2870 * Get the Background color of the textbox
2871 * @param textBox the textbox we want to get the background of
2874 public static Color getBackground(TextBox textBox) {
2875 return ScilabTextBoxBridge.getBackground(textBox);
2879 * Set the Foreground color of the textbox
2880 * @param textBox the textbox we want to set the foreground of
2881 * @param color the Color
2883 public static void setForeground(TextBox textBox, Color color) {
2884 ScilabTextBoxBridge.setForeground(textBox, color);
2888 * Get the Foreground color of the textbox
2889 * @param textBox the textbox we want to get the foreground of
2892 public static Color getForeground(TextBox textBox) {
2893 return ScilabTextBoxBridge.getForeground(textBox);
2897 * Set the font of the textbox.
2898 * @param textBox the textbox we want to set the font of
2899 * @param font the font
2901 public static void setFont(TextBox textBox, Font font) {
2902 ScilabTextBoxBridge.setFont(textBox, font);
2906 * Get the font of the textbox.
2907 * @param textBox the textbox we want to get the font of
2910 public static Font getFont(TextBox textBox) {
2911 return ScilabTextBoxBridge.getFont(textBox);
2915 * Add a callback to the TextBox
2916 * @param textBox the TextBox we want to set the callback of
2917 * @param callback the CallBack to set.
2919 public static void setCallback(TextBox textBox, CommonCallBack callback) {
2920 ScilabTextBoxBridge.setCallback(textBox, callback);
2924 * Set the horizontal alignment for the TextBox text
2925 * @param textBox the TextBox we want to set the alignment of
2926 * @param alignment the value for the alignment (See ScilabAlignment.java)
2928 public static void setHorizontalAlignment(TextBox textBox, String alignment) {
2929 ScilabTextBoxBridge.setHorizontalAlignment(textBox, alignment);
2933 * Set the vertical alignment for the TextBox text
2934 * @param textBox the TextBox we want to set the alignment of
2935 * @param alignment the value for the alignment (See ScilabAlignment.java)
2937 public static void setVerticalAlignment(TextBox textBox, String alignment) {
2938 ScilabTextBoxBridge.setVerticalAlignment(textBox, alignment);
2942 * Set the Relief of the TextBox
2943 * @param textBox the TextBox which we want to set the Relief of
2944 * @param reliefType the type of the relief to set (See ScilabRelief.java)
2946 public static void setRelief(TextBox textBox, String reliefType) {
2947 ScilabTextBoxBridge.setRelief(textBox, reliefType);
2951 * Delete the TextBox
2952 * @param textBox the TextBox to be destroyed
2954 public static void destroy(TextBox textBox) {
2955 ScilabTextBoxBridge.destroy(textBox);
2959 * Give the focus to the TextBox
2960 * @param textBox the TextBox
2962 public static void requestFocus(TextBox textBox) {
2963 ScilabTextBoxBridge.requestFocus(textBox);
2966 /******************/
2967 /* EditBox Bridge */
2968 /******************/
2971 * Creates a new EditBox
2972 * @return the created EditBox
2974 public static SimpleEditBox createEditBox() {
2975 return ScilabEditBoxBridge.createEditBox();
2979 * Sets the Text of a EditBox
2980 * @param editBox the EditBox we want to set the Text of
2981 * @param newText the Text to set for the EditBox
2983 public static void setText(EditBox editBox, String newText) {
2984 ScilabEditBoxBridge.setText(editBox, newText);
2988 * Gets the text of an EditBox
2989 * @param editBox the EditBox we want to get the text of
2990 * @return the text of the EditBox
2992 public static String getText(EditBox editBox) {
2993 return ScilabEditBoxBridge.getText(editBox);
2997 * Draws a Scilab EditBox
2998 * @param editBox the EditBox to draw
2999 * @see org.scilab.modules.ihm.UIElement#draw()
3001 public static void draw(EditBox editBox) {
3002 ScilabEditBoxBridge.draw(editBox);
3006 * Gets the dimensions (width and height) of a Scilab EditBox
3007 * @param editBox the EditBox we want to get the dimensions of
3008 * @return the size of the editBox
3009 * @see org.scilab.modules.ihm.UIElement#getDims()
3011 public static Size getDims(EditBox editBox) {
3012 return ScilabEditBoxBridge.getDims(editBox);
3016 * Gets the position (X-coordinate and Y-coordinate) of a Scilab editBox
3017 * @param editBox the editBox we want to get the position of
3018 * @return the position of the editBox
3019 * @see org.scilab.modules.ihm.UIElement#getPosition()
3021 public static Position getPosition(EditBox editBox) {
3022 return ScilabEditBoxBridge.getPosition(editBox);
3026 * Gets the visibility status of a Scilab EditBox
3027 * @param editBox the editBox we want to get the visiblity status of
3028 * @return the visibility status of the editBox (true if the editBox is visible, false if not)
3029 * @see org.scilab.modules.ihm.UIElement#isVisible()
3031 public static boolean isVisible(EditBox editBox) {
3032 return ScilabEditBoxBridge.isVisible(editBox);
3036 * Sets the dimensions (width and height) of a Scilab EditBox
3037 * @param editBox the editBox we want to set the dimensions of
3038 * @param newSize the size we want to set to the editBox
3039 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
3041 public static void setDims(EditBox editBox, Size newSize) {
3042 ScilabEditBoxBridge.setDims(editBox, newSize);
3046 * Sets the position (X-coordinate and Y-coordinate) of a Scilab editBox
3047 * @param editBox the editBox we want to set the position of
3048 * @param newPosition the position we want to set to the editBox
3049 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
3051 public static void setPosition(EditBox editBox, Position newPosition) {
3052 ScilabEditBoxBridge.setPosition(editBox, newPosition);
3056 * Sets the visibility status of a Scilab EditBox
3057 * @param editBox the editBox we want to set the visiblity status of
3058 * @param newVisibleState the visibility status we want to set to the editBox (true to set the editBox visible, false else)
3059 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
3061 public static void setVisible(EditBox editBox, boolean newVisibleState) {
3062 ScilabEditBoxBridge.setVisible(editBox, newVisibleState);
3066 * Set the Background color of the EditBox
3067 * @param editBox the EditBox we want to set the background of
3068 * @param color the Color
3070 public static void setBackground(EditBox editBox, Color color) {
3071 ScilabEditBoxBridge.setBackground(editBox, color);
3075 * Get the Background color of the EditBox
3076 * @param editBox the EditBox we want to get the background of
3079 public static Color getBackground(EditBox editBox) {
3080 return ScilabEditBoxBridge.getBackground(editBox);
3084 * Set the Foreground color of the EditBox
3085 * @param editBox the EditBox we want to set the foreground of
3086 * @param color the Color
3088 public static void setForeground(EditBox editBox, Color color) {
3089 ScilabEditBoxBridge.setForeground(editBox, color);
3093 * Get the Foreground color of the EditBox
3094 * @param editBox the EditBox we want to get the foreground of
3097 public static Color getForeground(EditBox editBox) {
3098 return ScilabEditBoxBridge.getForeground(editBox);
3102 * Set the font of the EditBox.
3103 * @param editBox the EditBox we want to set the font of
3104 * @param font the font
3106 public static void setFont(EditBox editBox, Font font) {
3107 ScilabEditBoxBridge.setFont(editBox, font);
3111 * Get the font of the EditBox.
3112 * @param editBox the EditBox we want to get the font of
3115 public static Font getFont(EditBox editBox) {
3116 return ScilabEditBoxBridge.getFont(editBox);
3120 * Set if the EditBox is enabled or not
3121 * @param editBox the EditBox we want to set the status of
3122 * @param status true if the EditBox is enabled
3124 public static void setEnabled(EditBox editBox, boolean status) {
3125 ScilabEditBoxBridge.setEnabled(editBox, status);
3129 * Gets the enable status of an EditBox
3130 * @param editBox the EditBox we want to get the status of
3131 * @return the enable status of the EditBox (true if the EditBox is enabled, false if not)
3133 public static boolean isEnabled(EditBox editBox) {
3134 return ScilabEditBoxBridge.isEnabled(editBox);
3138 * Add a callback to the EditBox
3139 * @param editBox the EditBox we want to set the callback of
3140 * @param callback the Callback to set.
3142 public static void setCallback(EditBox editBox, CommonCallBack callback) {
3143 ScilabEditBoxBridge.setCallback(editBox, callback);
3147 * Set the horizontal alignment for the EditBox text
3148 * @param editBox the EditBox we want to set the alignment of
3149 * @param alignment the value for the alignment (See ScilabAlignment.java)
3151 public static void setHorizontalAlignment(EditBox editBox, String alignment) {
3152 ScilabEditBoxBridge.setHorizontalAlignment(editBox, alignment);
3156 * Set the vertical alignment for the EditBox text
3157 * @param editBox the EditBox we want to set the alignment of
3158 * @param alignment the value for the alignment (See ScilabAlignment.java)
3160 public static void setVerticalAlignment(EditBox editBox, String alignment) {
3161 ScilabEditBoxBridge.setVerticalAlignment(editBox, alignment);
3165 * Set the Relief of the EditBox
3166 * @param editBox the EditBox which we want to set the Relief of
3167 * @param reliefType the type of the relief to set (See ScilabRelief.java)
3169 public static void setRelief(EditBox editBox, String reliefType) {
3170 ScilabEditBoxBridge.setRelief(editBox, reliefType);
3174 * Delete the EditBox
3175 * @param editBox the EditBox to be destroyed
3177 public static void destroy(EditBox editBox) {
3178 ScilabEditBoxBridge.destroy(editBox);
3182 * Give the focus to the EditBox
3183 * @param editBox the EditBox
3185 public static void requestFocus(EditBox editBox) {
3186 ScilabEditBoxBridge.requestFocus(editBox);
3194 * Creates a new Label
3195 * @return the created Label
3197 public static SimpleLabel createLabel() {
3198 return ScilabLabelBridge.createLabel();
3202 * Sets the Text of a Label
3203 * @param label the Label we want to set the Text of
3204 * @param newText the Text to set for the Label
3206 public static void setText(Label label, String newText) {
3207 ScilabLabelBridge.setText(label, newText);
3211 * Gets the text of an Label
3212 * @param label the Label we want to get the text of
3213 * @return the text of the Label
3215 public static String getText(Label label) {
3216 return ScilabLabelBridge.getText(label);
3220 * Draws a Scilab Label
3221 * @param label the Label to draw
3222 * @see org.scilab.modules.ihm.UIElement#draw()
3224 public static void draw(Label label) {
3225 ScilabLabelBridge.draw(label);
3229 * Gets the dimensions (width and height) of a Scilab Label
3230 * @param label the Label we want to get the dimensions of
3231 * @return the size of the label
3232 * @see org.scilab.modules.ihm.UIElement#getDims()
3234 public static Size getDims(Label label) {
3235 return ScilabLabelBridge.getDims(label);
3239 * Gets the position (X-coordinate and Y-coordinate) of a Scilab label
3240 * @param label the label we want to get the position of
3241 * @return the position of the label
3242 * @see org.scilab.modules.ihm.UIElement#getPosition()
3244 public static Position getPosition(Label label) {
3245 return ScilabLabelBridge.getPosition(label);
3249 * Gets the visibility status of a Scilab Label
3250 * @param label the label we want to get the visiblity status of
3251 * @return the visibility status of the label (true if the label is visible, false if not)
3252 * @see org.scilab.modules.ihm.UIElement#isVisible()
3254 public static boolean isVisible(Label label) {
3255 return ScilabLabelBridge.isVisible(label);
3259 * Sets the dimensions (width and height) of a Scilab Label
3260 * @param label the label we want to set the dimensions of
3261 * @param newSize the size we want to set to the label
3262 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
3264 public static void setDims(Label label, Size newSize) {
3265 ScilabLabelBridge.setDims(label, newSize);
3269 * Sets the position (X-coordinate and Y-coordinate) of a Scilab label
3270 * @param label the label we want to set the position of
3271 * @param newPosition the position we want to set to the label
3272 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
3274 public static void setPosition(Label label, Position newPosition) {
3275 ScilabLabelBridge.setPosition(label, newPosition);
3279 * Sets the visibility status of a Scilab Label
3280 * @param label the label we want to set the visiblity status of
3281 * @param newVisibleState the visibility status we want to set to the label (true to set the label visible, false else)
3282 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
3284 public static void setVisible(Label label, boolean newVisibleState) {
3285 ScilabLabelBridge.setVisible(label, newVisibleState);
3289 * Set the Background color of the Label
3290 * @param label the Label we want to set the background of
3291 * @param color the Color
3293 public static void setBackground(Label label, Color color) {
3294 ScilabLabelBridge.setBackground(label, color);
3298 * Get the Background color of the Label
3299 * @param label the Label we want to get the background of
3302 public static Color getBackground(Label label) {
3303 return ScilabLabelBridge.getBackground(label);
3307 * Set the Foreground color of the Label
3308 * @param label the Label we want to set the foreground of
3309 * @param color the Color
3311 public static void setForeground(Label label, Color color) {
3312 ScilabLabelBridge.setForeground(label, color);
3316 * Get the Foreground color of the Label
3317 * @param label the Label we want to get the foreground of
3320 public static Color getForeground(Label label) {
3321 return ScilabLabelBridge.getForeground(label);
3325 * Set the font of the Label.
3326 * @param label the Label we want to set the font of
3327 * @param font the font
3329 public static void setFont(Label label, Font font) {
3330 ScilabLabelBridge.setFont(label, font);
3334 * Get the font of the Label.
3335 * @param label the Label we want to get the font of
3338 public static Font getFont(Label label) {
3339 return ScilabLabelBridge.getFont(label);
3343 * Set if the Label is enabled or not
3344 * @param label the Label we want to set the status of
3345 * @param status true if the Label is enabled
3347 public static void setEnabled(Label label, boolean status) {
3348 ScilabLabelBridge.setEnabled(label, status);
3352 * Gets the enable status of a Label
3353 * @param label the Label we want to get the status of
3354 * @return the enable status of the Label (true if the Label is enabled, false if not)
3356 public static boolean isEnabled(Label label) {
3357 return ScilabLabelBridge.isEnabled(label);
3361 * Add a callback to the Label
3362 * @param label the Label we want to set the callback of
3363 * @param callback the Callback to set.
3365 public static void setCallback(Label label, CommonCallBack callback) {
3366 ScilabLabelBridge.setCallback(label, callback);
3370 * Set the horizontal alignment for the Label text
3371 * @param label the Label we want to set the alignment of
3372 * @param alignment the value for the alignment (See ScilabAlignment.java)
3374 public static void setHorizontalAlignment(Label label, String alignment) {
3375 ScilabLabelBridge.setHorizontalAlignment(label, alignment);
3379 * Set the vertical alignment for the Label text
3380 * @param label the Label we want to set the alignment of
3381 * @param alignment the value for the alignment (See ScilabAlignment.java)
3383 public static void setVerticalAlignment(Label label, String alignment) {
3384 ScilabLabelBridge.setVerticalAlignment(label, alignment);
3388 * Set the Relief of the Label
3389 * @param label the Label which we want to set the Relief of
3390 * @param reliefType the type of the relief to set (See ScilabRelief.java)
3392 public static void setRelief(Label label, String reliefType) {
3393 ScilabLabelBridge.setRelief(label, reliefType);
3398 * @param label the Label to be destroyed
3400 public static void destroy(Label label) {
3401 ScilabLabelBridge.destroy(label);
3405 * Give the focus to the Label
3406 * @param label the Label
3408 public static void requestFocus(Label label) {
3409 ScilabLabelBridge.requestFocus(label);
3412 /*******************/
3413 /* CheckBox Bridge */
3414 /*******************/
3417 * Creates a new CheckBox
3418 * @return the created CheckBox
3420 public static SimpleCheckBox createCheckBox() {
3421 return ScilabCheckBoxBridge.createCheckBox();
3425 * Sets the Text of a CheckBox
3426 * @param checkBox the CheckBox we want to set the Text of
3427 * @param newText the Text to set for the CheckBox
3429 public static void setText(CheckBox checkBox, String newText) {
3430 ScilabCheckBoxBridge.setText(checkBox, newText);
3434 * Gets the text of an CheckBox
3435 * @param checkBox the CheckBox we want to get the text of
3436 * @return the text of the CheckBox
3438 public static String getText(CheckBox checkBox) {
3439 return ScilabCheckBoxBridge.getText(checkBox);
3443 * Draws a Scilab CheckBox
3444 * @param checkBox the CheckBox to draw
3445 * @see org.scilab.modules.ihm.UIElement#draw()
3447 public static void draw(CheckBox checkBox) {
3448 ScilabCheckBoxBridge.draw(checkBox);
3452 * Gets the dimensions (width and height) of a Scilab CheckBox
3453 * @param checkBox the CheckBox we want to get the dimensions of
3454 * @return the size of the checkBox
3455 * @see org.scilab.modules.ihm.UIElement#getDims()
3457 public static Size getDims(CheckBox checkBox) {
3458 return ScilabCheckBoxBridge.getDims(checkBox);
3462 * Gets the position (X-coordinate and Y-coordinate) of a Scilab checkBox
3463 * @param checkBox the checkBox we want to get the position of
3464 * @return the position of the checkBox
3465 * @see org.scilab.modules.ihm.UIElement#getPosition()
3467 public static Position getPosition(CheckBox checkBox) {
3468 return ScilabCheckBoxBridge.getPosition(checkBox);
3472 * Gets the visibility status of a Scilab CheckBox
3473 * @param checkBox the checkBox we want to get the visiblity status of
3474 * @return the visibility status of the checkBox (true if the checkBox is visible, false if not)
3475 * @see org.scilab.modules.ihm.UIElement#isVisible()
3477 public static boolean isVisible(CheckBox checkBox) {
3478 return ScilabCheckBoxBridge.isVisible(checkBox);
3482 * Sets the dimensions (width and height) of a Scilab CheckBox
3483 * @param checkBox the checkBox we want to set the dimensions of
3484 * @param newSize the size we want to set to the checkBox
3485 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
3487 public static void setDims(CheckBox checkBox, Size newSize) {
3488 ScilabCheckBoxBridge.setDims(checkBox, newSize);
3492 * Sets the position (X-coordinate and Y-coordinate) of a Scilab checkBox
3493 * @param checkBox the checkBox we want to set the position of
3494 * @param newPosition the position we want to set to the checkBox
3495 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
3497 public static void setPosition(CheckBox checkBox, Position newPosition) {
3498 ScilabCheckBoxBridge.setPosition(checkBox, newPosition);
3502 * Sets the visibility status of a Scilab CheckBox
3503 * @param checkBox the checkBox we want to set the visiblity status of
3504 * @param newVisibleState the visibility status we want to set to the checkBox (true to set the checkBox visible, false else)
3505 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
3507 public static void setVisible(CheckBox checkBox, boolean newVisibleState) {
3508 ScilabCheckBoxBridge.setVisible(checkBox, newVisibleState);
3512 * Set the Background color of the CheckBox
3513 * @param checkBox the CheckBox we want to set the background of
3514 * @param color the Color
3516 public static void setBackground(CheckBox checkBox, Color color) {
3517 ScilabCheckBoxBridge.setBackground(checkBox, color);
3521 * Get the Background color of the CheckBox
3522 * @param checkBox the CheckBox we want to get the background of
3525 public static Color getBackground(CheckBox checkBox) {
3526 return ScilabCheckBoxBridge.getBackground(checkBox);
3530 * Set the Foreground color of the CheckBox
3531 * @param checkBox the CheckBox we want to set the foreground of
3532 * @param color the Color
3534 public static void setForeground(CheckBox checkBox, Color color) {
3535 ScilabCheckBoxBridge.setForeground(checkBox, color);
3539 * Get the Foreground color of the CheckBox
3540 * @param checkBox the CheckBox we want to get the foreground of
3543 public static Color getForeground(CheckBox checkBox) {
3544 return ScilabCheckBoxBridge.getForeground(checkBox);
3548 * Set the font of the CheckBox.
3549 * @param checkBox the CheckBox we want to set the font of
3550 * @param font the font
3552 public static void setFont(CheckBox checkBox, Font font) {
3553 ScilabCheckBoxBridge.setFont(checkBox, font);
3557 * Get the font of the CheckBox.
3558 * @param checkBox the CheckBox we want to get the font of
3561 public static Font getFont(CheckBox checkBox) {
3562 return ScilabCheckBoxBridge.getFont(checkBox);
3566 * Set if the CheckBox is enabled or not
3567 * @param checkBox the CheckBox we want to set the status of
3568 * @param status true if the CheckBox is enabled
3570 public static void setEnabled(CheckBox checkBox, boolean status) {
3571 ScilabCheckBoxBridge.setEnabled(checkBox, status);
3575 * Gets the enable status of the CheckBox
3576 * @param checkBox the CheckBox we want to get the status of
3577 * @return the enable status of the CheckBox (true if the CheckBox is enabled, false if not)
3579 public static boolean isEnabled(CheckBox checkBox) {
3580 return ScilabCheckBoxBridge.isEnabled(checkBox);
3584 * Add a callback to the CheckBox
3585 * @param checkBox the CheckBox we want to set the callback of
3586 * @param callback the CallBack to set.
3588 public static void setCallback(CheckBox checkBox, CommonCallBack callback) {
3589 ScilabCheckBoxBridge.setCallback(checkBox, callback);
3593 * Set the horizontal alignment for the CheckBox text
3594 * @param checkBox the CheckBox we want to set the alignment of
3595 * @param alignment the value for the alignment (See ScilabAlignment.java)
3597 public static void setHorizontalAlignment(CheckBox checkBox, String alignment) {
3598 ScilabCheckBoxBridge.setHorizontalAlignment(checkBox, alignment);
3602 * Set the vertical alignment for the CheckBox text
3603 * @param checkBox the CheckBox we want to set the alignment of
3604 * @param alignment the value for the alignment (See ScilabAlignment.java)
3606 public static void setVerticalAlignment(CheckBox checkBox, String alignment) {
3607 ScilabCheckBoxBridge.setVerticalAlignment(checkBox, alignment);
3611 * Set if the CheckBox is checked or not
3612 * @param checkBox the CheckBox we want to set the status of
3613 * @param status true to set the CheckBox checked
3615 public static void setChecked(CheckBox checkBox, boolean status) {
3616 ScilabCheckBoxBridge.setChecked(checkBox, status);
3620 * Get the status of the CheckBox
3621 * @param checkBox the CheckBox we want to get the status of
3622 * @return true if the CheckBox is checked
3624 public static boolean isChecked(CheckBox checkBox) {
3625 return ScilabCheckBoxBridge.isChecked(checkBox);
3629 * Set the Relief of the CheckBox
3630 * @param checkBox the CheckBox which we want to set the Relief of
3631 * @param reliefType the type of the relief to set (See ScilabRelief.java)
3633 public static void setRelief(CheckBox checkBox, String reliefType) {
3634 ScilabCheckBoxBridge.setRelief(checkBox, reliefType);
3638 * Delete the CheckBox
3639 * @param checkBox the CheckBox to be destroyed
3641 public static void destroy(CheckBox checkBox) {
3642 ScilabCheckBoxBridge.destroy(checkBox);
3646 * Give the focus to the CheckBox
3647 * @param checkBox the CheckBox
3649 public static void requestFocus(CheckBox checkBox) {
3650 ScilabCheckBoxBridge.requestFocus(checkBox);
3653 /**********************/
3654 /* RadioButton Bridge */
3655 /**********************/
3658 * Creates a new RadioButton
3659 * @return the created RadioButton
3661 public static SimpleRadioButton createRadioButton() {
3662 return ScilabRadioButtonBridge.createRadioButton();
3666 * Sets the Text of a RadioButton
3667 * @param radioButton the RadioButton we want to set the Text of
3668 * @param newText the Text to set for the RadioButton
3670 public static void setText(RadioButton radioButton, String newText) {
3671 ScilabRadioButtonBridge.setText(radioButton, newText);
3675 * Gets the text of an RadioButton
3676 * @param radioButton the RadioButton we want to get the text of
3677 * @return the text of the RadioButton
3679 public static String getText(RadioButton radioButton) {
3680 return ScilabRadioButtonBridge.getText(radioButton);
3684 * Draws a Scilab RadioButton
3685 * @param radioButton the RadioButton to draw
3686 * @see org.scilab.modules.ihm.UIElement#draw()
3688 public static void draw(RadioButton radioButton) {
3689 ScilabRadioButtonBridge.draw(radioButton);
3693 * Gets the dimensions (width and height) of a Scilab RadioButton
3694 * @param radioButton the RadioButton we want to get the dimensions of
3695 * @return the size of the radioButton
3696 * @see org.scilab.modules.ihm.UIElement#getDims()
3698 public static Size getDims(RadioButton radioButton) {
3699 return ScilabRadioButtonBridge.getDims(radioButton);
3703 * Gets the position (X-coordinate and Y-coordinate) of a Scilab radioButton
3704 * @param radioButton the radioButton we want to get the position of
3705 * @return the position of the radioButton
3706 * @see org.scilab.modules.ihm.UIElement#getPosition()
3708 public static Position getPosition(RadioButton radioButton) {
3709 return ScilabRadioButtonBridge.getPosition(radioButton);
3713 * Gets the visibility status of a Scilab RadioButton
3714 * @param radioButton the radioButton we want to get the visiblity status of
3715 * @return the visibility status of the radioButton (true if the radioButton is visible, false if not)
3716 * @see org.scilab.modules.ihm.UIElement#isVisible()
3718 public static boolean isVisible(RadioButton radioButton) {
3719 return ScilabRadioButtonBridge.isVisible(radioButton);
3723 * Sets the dimensions (width and height) of a Scilab RadioButton
3724 * @param radioButton the radioButton we want to set the dimensions of
3725 * @param newSize the size we want to set to the radioButton
3726 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
3728 public static void setDims(RadioButton radioButton, Size newSize) {
3729 ScilabRadioButtonBridge.setDims(radioButton, newSize);
3733 * Sets the position (X-coordinate and Y-coordinate) of a Scilab radioButton
3734 * @param radioButton the radioButton we want to set the position of
3735 * @param newPosition the position we want to set to the radioButton
3736 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
3738 public static void setPosition(RadioButton radioButton, Position newPosition) {
3739 ScilabRadioButtonBridge.setPosition(radioButton, newPosition);
3743 * Sets the visibility status of a Scilab RadioButton
3744 * @param radioButton the radioButton we want to set the visiblity status of
3745 * @param newVisibleState the visibility status we want to set to the radioButton (true to set the radioButton visible, false else)
3746 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
3748 public static void setVisible(RadioButton radioButton, boolean newVisibleState) {
3749 ScilabRadioButtonBridge.setVisible(radioButton, newVisibleState);
3753 * Set the Background color of the RadioButton
3754 * @param radioButton the RadioButton we want to set the background of
3755 * @param color the Color
3757 public static void setBackground(RadioButton radioButton, Color color) {
3758 ScilabRadioButtonBridge.setBackground(radioButton, color);
3762 * Get the Background color of the RadioButton
3763 * @param radioButton the RadioButton we want to get the background of
3766 public static Color getBackground(RadioButton radioButton) {
3767 return ScilabRadioButtonBridge.getBackground(radioButton);
3771 * Set the Foreground color of the RadioButton
3772 * @param radioButton the RadioButton we want to set the foreground of
3773 * @param color the Color
3775 public static void setForeground(RadioButton radioButton, Color color) {
3776 ScilabRadioButtonBridge.setForeground(radioButton, color);
3780 * Get the Foreground color of the RadioButton
3781 * @param radioButton the RadioButton we want to get the foreground of
3784 public static Color getForeground(RadioButton radioButton) {
3785 return ScilabRadioButtonBridge.getForeground(radioButton);
3789 * Set the font of the RadioButton.
3790 * @param radioButton the RadioButton we want to set the font of
3791 * @param font the font
3793 public static void setFont(RadioButton radioButton, Font font) {
3794 ScilabRadioButtonBridge.setFont(radioButton, font);
3798 * Get the font of the RadioButton.
3799 * @param radioButton the RadioButton we want to get the font of
3802 public static Font getFont(RadioButton radioButton) {
3803 return ScilabRadioButtonBridge.getFont(radioButton);
3807 * Set if the RadioButton is enabled or not
3808 * @param radioButton the RadioButton we want to set the status of
3809 * @param status true if the RadioButton is enabled
3811 public static void setEnabled(RadioButton radioButton, boolean status) {
3812 ScilabRadioButtonBridge.setEnabled(radioButton, status);
3816 * Gets the enable status of a RadioButton
3817 * @param radioButton the RadioButton we want to get the status of
3818 * @return the enable status of the RadioButton (true if the RadioButton is enabled, false if not)
3820 public static boolean isEnabled(RadioButton radioButton) {
3821 return ScilabRadioButtonBridge.isEnabled(radioButton);
3825 * Add a callback to the RadioButton
3826 * @param radioButton the RadioButton we want to set the callback of
3827 * @param callback the callback to set.
3829 public static void setCallback(RadioButton radioButton, CommonCallBack callback) {
3830 ScilabRadioButtonBridge.setCallback(radioButton, callback);
3834 * Set the horizontal alignment for the RadioButton text
3835 * @param radioButton the RadioButton we want to set the alignment of
3836 * @param alignment the value for the alignment (See ScilabAlignment.java)
3838 public static void setHorizontalAlignment(RadioButton radioButton, String alignment) {
3839 ScilabRadioButtonBridge.setHorizontalAlignment(radioButton, alignment);
3843 * Set the vertical alignment for the RadioButton text
3844 * @param radioButton the RadioButton we want to set the alignment of
3845 * @param alignment the value for the alignment (See ScilabAlignment.java)
3847 public static void setVerticalAlignment(RadioButton radioButton, String alignment) {
3848 ScilabRadioButtonBridge.setVerticalAlignment(radioButton, alignment);
3852 * Set if the RadioButton is checked or not
3853 * @param radioButton the RadioButton we want to set the status of
3854 * @param status true to set the RadioButon checked
3856 public static void setChecked(RadioButton radioButton, boolean status) {
3857 ScilabRadioButtonBridge.setChecked(radioButton, status);
3861 * Get the status of the RadioButton
3862 * @param radioButton the RadioButton we want to get the status of
3863 * @return true if the RadioButton is checked
3865 public static boolean isChecked(RadioButton radioButton) {
3866 return ScilabRadioButtonBridge.isChecked(radioButton);
3870 * Set the Relief of the RadioButton
3871 * @param radioButton the RadioButton which we want to set the Relief of
3872 * @param reliefType the type of the relief to set (See ScilabRelief.java)
3874 public static void setRelief(RadioButton radioButton, String reliefType) {
3875 ScilabRadioButtonBridge.setRelief(radioButton, reliefType);
3879 * Delete the RadioButton
3880 * @param radioButton the RadioButton to be destroyed
3882 public static void destroy(RadioButton radioButton) {
3883 ScilabRadioButtonBridge.destroy(radioButton);
3887 * Give the focus to the RadioButton
3888 * @param radioButton the RadioButton
3890 public static void requestFocus(RadioButton radioButton) {
3891 ScilabRadioButtonBridge.requestFocus(radioButton);
3899 * Creates a new Slider
3900 * @return the created Slider
3902 public static SimpleSlider createSlider() {
3903 return ScilabSliderBridge.createSlider();
3907 * Sets the Text of a Slider
3908 * @param slider the Slider we want to set the Text of
3909 * @param newText the Text to set for the Slider
3911 public static void setText(Slider slider, String newText) {
3912 ScilabSliderBridge.setText(slider, newText);
3916 * Gets the text of an Slider
3917 * @param slider the Slider we want to get the text of
3918 * @return the text of the Slider
3920 public static String getText(Slider slider) {
3921 return ScilabSliderBridge.getText(slider);
3925 * Draws a Scilab Slider
3926 * @param slider the Slider to draw
3927 * @see org.scilab.modules.ihm.UIElement#draw()
3929 public static void draw(Slider slider) {
3930 ScilabSliderBridge.draw(slider);
3934 * Gets the dimensions (width and height) of a Scilab Slider
3935 * @param slider the Slider we want to get the dimensions of
3936 * @return the size of the slider
3937 * @see org.scilab.modules.ihm.UIElement#getDims()
3939 public static Size getDims(Slider slider) {
3940 return ScilabSliderBridge.getDims(slider);
3944 * Gets the position (X-coordinate and Y-coordinate) of a Scilab slider
3945 * @param slider the slider we want to get the position of
3946 * @return the position of the slider
3947 * @see org.scilab.modules.ihm.UIElement#getPosition()
3949 public static Position getPosition(Slider slider) {
3950 return ScilabSliderBridge.getPosition(slider);
3954 * Gets the visibility status of a Scilab Slider
3955 * @param slider the slider we want to get the visiblity status of
3956 * @return the visibility status of the slider (true if the slider is visible, false if not)
3957 * @see org.scilab.modules.ihm.UIElement#isVisible()
3959 public static boolean isVisible(Slider slider) {
3960 return ScilabSliderBridge.isVisible(slider);
3964 * Sets the dimensions (width and height) of a Scilab Slider
3965 * @param slider the slider we want to set the dimensions of
3966 * @param newSize the size we want to set to the slider
3967 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
3969 public static void setDims(Slider slider, Size newSize) {
3970 ScilabSliderBridge.setDims(slider, newSize);
3974 * Sets the position (X-coordinate and Y-coordinate) of a Scilab slider
3975 * @param slider the slider we want to set the position of
3976 * @param newPosition the position we want to set to the slider
3977 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
3979 public static void setPosition(Slider slider, Position newPosition) {
3980 ScilabSliderBridge.setPosition(slider, newPosition);
3984 * Sets the visibility status of a Scilab Slider
3985 * @param slider the slider we want to set the visiblity status of
3986 * @param newVisibleState the visibility status we want to set to the slider (true to set the slider visible, false else)
3987 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
3989 public static void setVisible(Slider slider, boolean newVisibleState) {
3990 ScilabSliderBridge.setVisible(slider, newVisibleState);
3994 * Set the Background color of the Slider
3995 * @param slider the Slider we want to set the background of
3996 * @param color the Color
3998 public static void setBackground(Slider slider, Color color) {
3999 ScilabSliderBridge.setBackground(slider, color);
4003 * Get the Background color of the Slider
4004 * @param slider the Slider we want to get the background of
4007 public static Color getBackground(Slider slider) {
4008 return ScilabSliderBridge.getBackground(slider);
4012 * Set the Foreground color of the Slider
4013 * @param slider the Slider we want to set the foreground of
4014 * @param color the Color
4016 public static void setForeground(Slider slider, Color color) {
4017 ScilabSliderBridge.setForeground(slider, color);
4021 * Get the Foreground color of the Slider
4022 * @param slider the Slider we want to get the foreground of
4025 public static Color getForeground(Slider slider) {
4026 return ScilabSliderBridge.getForeground(slider);
4030 * Set the font of the Slider.
4031 * @param slider the Slider we want to set the font of
4032 * @param font the font
4034 public static void setFont(Slider slider, Font font) {
4035 ScilabSliderBridge.setFont(slider, font);
4039 * Get the font of the Slider.
4040 * @param slider the Slider we want to get the font of
4043 public static Font getFont(Slider slider) {
4044 return ScilabSliderBridge.getFont(slider);
4048 * Set if the Slider is enabled or not
4049 * @param slider the Slider we want to set the status of
4050 * @param status true if the Slider is enabled
4052 public static void setEnabled(Slider slider, boolean status) {
4053 ScilabSliderBridge.setEnabled(slider, status);
4057 * Gets the enable status of an Slider
4058 * @param slider the Slider we want to get the status of
4059 * @return the enable status of the Slider (true if the Slider is enabled, false if not)
4061 public static boolean isEnabled(Slider slider) {
4062 return ScilabSliderBridge.isEnabled(slider);
4066 * Add a callback to the Slider
4067 * @param slider the Slider we want to set the callback of
4068 * @param callback the CallBack to set.
4070 public static void setCallback(Slider slider, CommonCallBack callback) {
4071 ScilabSliderBridge.setCallback(slider, callback);
4075 * Set the horizontal alignment for the Slider text
4076 * @param slider the Slider we want to set the alignment of
4077 * @param alignment the value for the alignment (See ScilabAlignment.java)
4079 public static void setHorizontalAlignment(Slider slider, String alignment) {
4080 ScilabSliderBridge.setHorizontalAlignment(slider, alignment);
4084 * Set the vertical alignment for the Slider text
4085 * @param slider the Slider we want to set the alignment of
4086 * @param alignment the value for the alignment (See ScilabAlignment.java)
4088 public static void setVerticalAlignment(Slider slider, String alignment) {
4089 ScilabSliderBridge.setVerticalAlignment(slider, alignment);
4093 * Set the minor tick spacing for a Slider
4094 * @param slider the Slider we want to set the spacing of
4095 * @param space the increment value
4097 public static void setMinorTickSpacing(Slider slider, int space) {
4098 ScilabSliderBridge.setMinorTickSpacing(slider, space);
4102 * Set the major tick spacing for a Slider
4103 * @param slider the Slider we want to set the spacing of
4104 * @param space the increment value
4106 public static void setMajorTickSpacing(Slider slider, int space) {
4107 ScilabSliderBridge.setMajorTickSpacing(slider, space);
4111 * Set the minimum value of a Slider
4112 * @param slider the Slider we want to set the minimum value of
4113 * @param value the minimum value
4115 public static void setMinimumValue(Slider slider, int value) {
4116 ScilabSliderBridge.setMinimumValue(slider, value);
4120 * Set the maximum value of a Slider
4121 * @param slider the Slider we want to set the maximum value of
4122 * @param value the maximum value
4124 public static void setMaximumValue(Slider slider, int value) {
4125 ScilabSliderBridge.setMaximumValue(slider, value);
4129 * Get the current value of the Slider
4130 * @param slider the Slider we want to get the value of
4131 * @return the current value of the Slider
4133 public static int getValue(Slider slider) {
4134 return ScilabSliderBridge.getValue(slider);
4138 * Sets the current value of the Slider
4139 * @param slider the Slider we want to set the value of
4140 * @param value the new value
4142 public static void setUserValue(Slider slider, int value) {
4143 ScilabSliderBridge.setUserValue(slider, value);
4147 * Set the Relief of the Slider
4148 * @param slider the Slider which we want to set the Relief of
4149 * @param reliefType the type of the relief to set (See ScilabRelief.java)
4151 public static void setRelief(Slider slider, String reliefType) {
4152 ScilabSliderBridge.setRelief(slider, reliefType);
4156 * Set the slider orientation to vertical
4157 * @param slider the slider we want to set the orientation of
4159 public static void setVertical(Slider slider) {
4160 ScilabSliderBridge.setVertical(slider);
4164 * Set the slider orientation to horizontal
4165 * @param slider the slider we want to set the orientation of
4167 public static void setHorizontal(Slider slider) {
4168 ScilabSliderBridge.setHorizontal(slider);
4173 * @param slider the Slider to be destroyed
4175 public static void destroy(Slider slider) {
4176 ScilabSliderBridge.destroy(slider);
4180 * Give the focus to the Slider
4181 * @param slider the Slider
4183 public static void requestFocus(Slider slider) {
4184 ScilabSliderBridge.requestFocus(slider);
4187 /******************/
4188 /* ListBox Bridge */
4189 /******************/
4192 * Creates a new ListBox
4193 * @return the created ListBox
4195 public static SimpleListBox createListBox() {
4196 return ScilabListBoxBridge.createListBox();
4200 * Sets the Text of a ListBox
4201 * @param listBox the ListBox we want to set the Text of
4202 * @param newText the Text to set for the ListBox
4204 public static void setText(ListBox listBox, String newText) {
4205 ScilabListBoxBridge.setText(listBox, newText);
4209 * Gets the text of an ListBox
4210 * @param listBox the ListBox we want to get the text of
4211 * @return the text of the ListBox
4213 public static String getText(ListBox listBox) {
4214 return ScilabListBoxBridge.getText(listBox);
4218 * Draws a Scilab ListBox
4219 * @param listBox the ListBox to draw
4220 * @see org.scilab.modules.ihm.UIElement#draw()
4222 public static void draw(ListBox listBox) {
4223 ScilabListBoxBridge.draw(listBox);
4227 * Gets the dimensions (width and height) of a Scilab ListBox
4228 * @param listBox the ListBox we want to get the dimensions of
4229 * @return the size of the listBox
4230 * @see org.scilab.modules.ihm.UIElement#getDims()
4232 public static Size getDims(ListBox listBox) {
4233 return ScilabListBoxBridge.getDims(listBox);
4237 * Gets the position (X-coordinate and Y-coordinate) of a Scilab listBox
4238 * @param listBox the listBox we want to get the position of
4239 * @return the position of the listBox
4240 * @see org.scilab.modules.ihm.UIElement#getPosition()
4242 public static Position getPosition(ListBox listBox) {
4243 return ScilabListBoxBridge.getPosition(listBox);
4247 * Gets the visibility status of a Scilab ListBox
4248 * @param listBox the listBox we want to get the visiblity status of
4249 * @return the visibility status of the listBox (true if the listBox is visible, false if not)
4250 * @see org.scilab.modules.ihm.UIElement#isVisible()
4252 public static boolean isVisible(ListBox listBox) {
4253 return ScilabListBoxBridge.isVisible(listBox);
4257 * Sets the dimensions (width and height) of a Scilab ListBox
4258 * @param listBox the listBox we want to set the dimensions of
4259 * @param newSize the size we want to set to the listBox
4260 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
4262 public static void setDims(ListBox listBox, Size newSize) {
4263 ScilabListBoxBridge.setDims(listBox, newSize);
4267 * Sets the position (X-coordinate and Y-coordinate) of a Scilab listBox
4268 * @param listBox the listBox we want to set the position of
4269 * @param newPosition the position we want to set to the listBox
4270 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
4272 public static void setPosition(ListBox listBox, Position newPosition) {
4273 ScilabListBoxBridge.setPosition(listBox, newPosition);
4277 * Sets the visibility status of a Scilab ListBox
4278 * @param listBox the listBox we want to set the visiblity status of
4279 * @param newVisibleState the visibility status we want to set to the listBox (true to set the listBox visible, false else)
4280 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
4282 public static void setVisible(ListBox listBox, boolean newVisibleState) {
4283 ScilabListBoxBridge.setVisible(listBox, newVisibleState);
4287 * Set the Background color of the ListBox
4288 * @param listBox the ListBox we want to set the background of
4289 * @param color the Color
4291 public static void setBackground(ListBox listBox, Color color) {
4292 ScilabListBoxBridge.setBackground(listBox, color);
4296 * Get the Background color of the ListBox
4297 * @param listBox the ListBox we want to get the background of
4300 public static Color getBackground(ListBox listBox) {
4301 return ScilabListBoxBridge.getBackground(listBox);
4305 * Set the Foreground color of the ListBox
4306 * @param listBox the ListBox we want to set the foreground of
4307 * @param color the Color
4309 public static void setForeground(ListBox listBox, Color color) {
4310 ScilabListBoxBridge.setForeground(listBox, color);
4314 * Get the Foreground color of the ListBox
4315 * @param listBox the ListBox we want to get the foreground of
4318 public static Color getForeground(ListBox listBox) {
4319 return ScilabListBoxBridge.getForeground(listBox);
4323 * Set the font of the ListBox.
4324 * @param listBox the ListBox we want to set the font of
4325 * @param font the font
4327 public static void setFont(ListBox listBox, Font font) {
4328 ScilabListBoxBridge.setFont(listBox, font);
4332 * Get the font of the ListBox.
4333 * @param listBox the ListBox we want to get the font of
4336 public static Font getFont(ListBox listBox) {
4337 return ScilabListBoxBridge.getFont(listBox);
4341 * Set if the ListBox is enabled or not
4342 * @param listBox the ListBox we want to set the status of
4343 * @param status true if the ListBox is enabled
4345 public static void setEnabled(ListBox listBox, boolean status) {
4346 ScilabListBoxBridge.setEnabled(listBox, status);
4350 * Gets the enable status of a ListBox
4351 * @param listBox the ListBox we want to get the status of
4352 * @return the enable status of the ListBox (true if the ListBox is enabled, false if not)
4354 public static boolean isEnabled(ListBox listBox) {
4355 return ScilabListBoxBridge.isEnabled(listBox);
4359 * Add a callback to the ListBox
4360 * @param listBox the ListBox we want to set the callback of
4361 * @param callback the Callback to set.
4363 public static void setCallback(ListBox listBox, CommonCallBack callback) {
4364 ScilabListBoxBridge.setCallback(listBox, callback);
4369 * Set the horizontal alignment for the ListBox text
4370 * @param listBox the ListBox we want to set the alignment of
4371 * @param alignment the value for the alignment (See ScilabAlignment.java)
4373 public static void setHorizontalAlignment(ListBox listBox, String alignment) {
4374 ScilabListBoxBridge.setHorizontalAlignment(listBox, alignment);
4378 * Set the vertical alignment for the ListBox text
4379 * @param listBox the ListBox we want to set the alignment of
4380 * @param alignment the value for the alignment (See ScilabAlignment.java)
4382 public static void setVerticalAlignment(ListBox listBox, String alignment) {
4383 ScilabListBoxBridge.setVerticalAlignment(listBox, alignment);
4387 * Set if more than one item can be selected in a ListBox
4388 * @param listBox the ListBox we want to set the status of
4389 * @param status true if multiple selection is enabled
4391 public static void setMultipleSelectionEnabled(ListBox listBox, boolean status) {
4392 ScilabListBoxBridge.setMultipleSelectionEnabled(listBox, status);
4396 * Set the selected indices of the ListBox
4397 * @param listBox the ListBox we want to set the selected indices of
4398 * @param indices the indices of the items to be selected
4400 public static void setSelectedIndices(ListBox listBox, int[] indices) {
4401 ScilabListBoxBridge.setSelectedIndices(listBox, indices);
4405 * Get the selected indices of the ListBox
4406 * @param listBox the ListBox we want to get the selected indices of
4407 * @return the indices of the items selected
4409 public static int[] getSelectedIndices(ListBox listBox) {
4410 return ScilabListBoxBridge.getSelectedIndices(listBox);
4414 * Get the number of items selected in the ListBox
4415 * @param listBox the ListBox we want to get the selection size of
4416 * @return the number of items selected
4418 public static int getSelectionSize(ListBox listBox) {
4419 return ScilabListBoxBridge.getSelectionSize(listBox);
4423 * Get the text of all the list items
4424 * @param listBox the ListBox we want to get the items text of
4425 * @return the text items
4426 * @see org.scilab.modules.gui.listbox.ListBox#getAllItemsText()
4428 public static String[] getAllItemsText(ListBox listBox) {
4429 return ScilabListBoxBridge.getAllItemsText(listBox);
4433 * Get the number of items in the list
4434 * @param listBox the ListBox we want to get the items number of
4435 * @return the number of items
4436 * @see org.scilab.modules.gui.listbox.ListBox#getNumberOfItems()
4438 public static int getNumberOfItems(ListBox listBox) {
4439 return ScilabListBoxBridge.getNumberOfItems(listBox);
4443 * Set the text of the list items
4444 * @param listBox the ListBox we want to set the items text of
4445 * @param text the text of the items
4446 * @see org.scilab.modules.gui.listbox.ListBox#setText(java.lang.String[])
4448 public static void setText(ListBox listBox, String[] text) {
4449 ScilabListBoxBridge.setText(listBox, text);
4453 * Set the Relief of the ListBox
4454 * @param listBox the ListBox which we want to set the Relief of
4455 * @param reliefType the type of the relief to set (See ScilabRelief.java)
4457 public static void setRelief(ListBox listBox, String reliefType) {
4458 ScilabListBoxBridge.setRelief(listBox, reliefType);
4462 * Delete the ListBox
4463 * @param listBox the ListBox to be destroyed
4465 public static void destroy(ListBox listBox) {
4466 ScilabListBoxBridge.destroy(listBox);
4470 * Give the focus to the ListBox
4471 * @param listBox the ListBox
4473 public static void requestFocus(ListBox listBox) {
4474 ScilabListBoxBridge.requestFocus(listBox);
4478 * Adjusts the view so that the element given by index is displayed at the top of the ListBox.
4479 * @param listBox the ListBox
4480 * @param index the index of the element to be displayed at the top of the ListBox.
4482 public static void setListBoxTop(ListBox listBox, int index) {
4483 ScilabListBoxBridge.setListBoxTop(listBox, index);
4487 * Gets the index of the element displayed at the top of the ListBox
4488 * @param listBox the ListBox
4489 * @return the index of the element displayed at the top of the ListBox
4491 public static int getListBoxTop(ListBox listBox) {
4492 return ScilabListBoxBridge.getListBoxTop(listBox);
4495 /********************/
4496 /* PopupMenu Bridge */
4497 /********************/
4500 * Creates a new PopupMenu
4501 * @return the created PopupMenu
4503 public static SimplePopupMenu createPopupMenu() {
4504 return ScilabPopupMenuBridge.createPopupMenu();
4508 * Sets the Text of a PopupMenu
4509 * @param popupMenu the PopupMenu we want to set the Text of
4510 * @param newText the Text to set for the PopupMenu
4512 public static void setText(PopupMenu popupMenu, String newText) {
4513 ScilabPopupMenuBridge.setText(popupMenu, newText);
4517 * Gets the text of an PopupMenu
4518 * @param popupMenu the PopupMenu we want to get the text of
4519 * @return the text of the PopupMenu
4521 public static String getText(PopupMenu popupMenu) {
4522 return ScilabPopupMenuBridge.getText(popupMenu);
4526 * Draws a Scilab PopupMenu
4527 * @param popupMenu the PopupMenu to draw
4528 * @see org.scilab.modules.ihm.UIElement#draw()
4530 public static void draw(PopupMenu popupMenu) {
4531 ScilabPopupMenuBridge.draw(popupMenu);
4535 * Gets the dimensions (width and height) of a Scilab PopupMenu
4536 * @param popupMenu the PopupMenu we want to get the dimensions of
4537 * @return the size of the popupMenu
4538 * @see org.scilab.modules.ihm.UIElement#getDims()
4540 public static Size getDims(PopupMenu popupMenu) {
4541 return ScilabPopupMenuBridge.getDims(popupMenu);
4545 * Gets the position (X-coordinate and Y-coordinate) of a Scilab popupMenu
4546 * @param popupMenu the popupMenu we want to get the position of
4547 * @return the position of the popupMenu
4548 * @see org.scilab.modules.ihm.UIElement#getPosition()
4550 public static Position getPosition(PopupMenu popupMenu) {
4551 return ScilabPopupMenuBridge.getPosition(popupMenu);
4555 * Gets the visibility status of a Scilab PopupMenu
4556 * @param popupMenu the popupMenu we want to get the visiblity status of
4557 * @return the visibility status of the popupMenu (true if the popupMenu is visible, false if not)
4558 * @see org.scilab.modules.ihm.UIElement#isVisible()
4560 public static boolean isVisible(PopupMenu popupMenu) {
4561 return ScilabPopupMenuBridge.isVisible(popupMenu);
4565 * Sets the dimensions (width and height) of a Scilab PopupMenu
4566 * @param popupMenu the popupMenu we want to set the dimensions of
4567 * @param newSize the size we want to set to the popupMenu
4568 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
4570 public static void setDims(PopupMenu popupMenu, Size newSize) {
4571 ScilabPopupMenuBridge.setDims(popupMenu, newSize);
4575 * Sets the position (X-coordinate and Y-coordinate) of a Scilab popupMenu
4576 * @param popupMenu the popupMenu we want to set the position of
4577 * @param newPosition the position we want to set to the popupMenu
4578 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
4580 public static void setPosition(PopupMenu popupMenu, Position newPosition) {
4581 ScilabPopupMenuBridge.setPosition(popupMenu, newPosition);
4585 * Sets the visibility status of a Scilab PopupMenu
4586 * @param popupMenu the popupMenu we want to set the visiblity status of
4587 * @param newVisibleState the visibility status we want to set to the popupMenu (true to set the popupMenu visible, false else)
4588 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
4590 public static void setVisible(PopupMenu popupMenu, boolean newVisibleState) {
4591 ScilabPopupMenuBridge.setVisible(popupMenu, newVisibleState);
4595 * Set the Background color of the PopupMenu
4596 * @param popupMenu the PopupMenu we want to set the background of
4597 * @param color the Color
4599 public static void setBackground(PopupMenu popupMenu, Color color) {
4600 ScilabPopupMenuBridge.setBackground(popupMenu, color);
4604 * Get the Background color of the PopupMenu
4605 * @param popupMenu the PopupMenu we want to get the background of
4608 public static Color getBackground(PopupMenu popupMenu) {
4609 return ScilabPopupMenuBridge.getBackground(popupMenu);
4613 * Set the Foreground color of the PopupMenu
4614 * @param popupMenu the PopupMenu we want to set the foreground of
4615 * @param color the Color
4617 public static void setForeground(PopupMenu popupMenu, Color color) {
4618 ScilabPopupMenuBridge.setForeground(popupMenu, color);
4622 * Get the Foreground color of the PopupMenu
4623 * @param popupMenu the PopupMenu we want to get the foreground of
4626 public static Color getForeground(PopupMenu popupMenu) {
4627 return ScilabPopupMenuBridge.getForeground(popupMenu);
4631 * Set the font of the PopupMenu.
4632 * @param popupMenu the PopupMenu we want to set the font of
4633 * @param font the font
4635 public static void setFont(PopupMenu popupMenu, Font font) {
4636 ScilabPopupMenuBridge.setFont(popupMenu, font);
4640 * Get the font of the PopupMenu.
4641 * @param popupMenu the PopupMenu we want to get the font of
4644 public static Font getFont(PopupMenu popupMenu) {
4645 return ScilabPopupMenuBridge.getFont(popupMenu);
4649 * Set if the PopupMenu is enabled or not
4650 * @param popupMenu the PopupMenu we want to set the status of
4651 * @param status true if the PopupMenu is enabled
4653 public static void setEnabled(PopupMenu popupMenu, boolean status) {
4654 ScilabPopupMenuBridge.setEnabled(popupMenu, status);
4658 * Gets the enable status of a PopupMenu
4659 * @param popupMenu the PopupMenu we want to get the status of
4660 * @return the enable status of the PopupMenu (true if the PopupMenu is enabled, false if not)
4662 public static boolean isEnabled(PopupMenu popupMenu) {
4663 return ScilabPopupMenuBridge.isEnabled(popupMenu);
4667 * Add a callback to the PopupMenu
4668 * @param popupMenu the PopupMenu we want to set the callback of
4669 * @param callback the CallBack to set.
4671 public static void setCallback(PopupMenu popupMenu, CommonCallBack callback) {
4672 ScilabPopupMenuBridge.setCallback(popupMenu, callback);
4676 * Set the horizontal alignment for the PopupMenu text
4677 * @param popupMenu the PopupMenu we want to set the alignment of
4678 * @param alignment the value for the alignment (See ScilabAlignment.java)
4680 public static void setHorizontalAlignment(PopupMenu popupMenu, String alignment) {
4681 ScilabPopupMenuBridge.setHorizontalAlignment(popupMenu, alignment);
4685 * Set the vertical alignment for the PopupMenu text
4686 * @param popupMenu the PopupMenu we want to set the alignment of
4687 * @param alignment the value for the alignment (See ScilabAlignment.java)
4689 public static void setVerticalAlignment(PopupMenu popupMenu, String alignment) {
4690 ScilabPopupMenuBridge.setVerticalAlignment(popupMenu, alignment);
4694 * Set the selected index of the ListBox
4695 * @param popupMenu the PopupMenu we want to set the selected index of
4696 * @param index the index of the item to be selected
4698 public static void setUserSelectedIndex(PopupMenu popupMenu, int index) {
4699 ScilabPopupMenuBridge.setUserSelectedIndex(popupMenu, index);
4703 * Get the selected index of the ListBox
4704 * @param popupMenu the PopupMenu we want to get the selected index of
4705 * @return the index of the item selected
4707 public static int getUserSelectedIndex(PopupMenu popupMenu) {
4708 return ScilabPopupMenuBridge.getUserSelectedIndex(popupMenu);
4712 * Get the text of all the PopupMenu items
4713 * @param popupMenu the PopupMenu we want to get the items of
4714 * @return the text items
4716 public static String[] getAllItemsText(PopupMenu popupMenu) {
4717 return ScilabPopupMenuBridge.getAllItemsText(popupMenu);
4721 * Get the number of items in the PopupMenu
4722 * @param popupMenu the PopupMenu we want to get the items number of
4723 * @return the number of items
4725 public static int getNumberOfItems(PopupMenu popupMenu) {
4726 return ScilabPopupMenuBridge.getNumberOfItems(popupMenu);
4730 * Set the text of the PopupMenu items
4731 * @param popupMenu the PopupMenu we want to set the text items of
4732 * @param text the text of the items
4734 public static void setText(PopupMenu popupMenu, String[] text) {
4735 ScilabPopupMenuBridge.setText(popupMenu, text);
4739 * Set the Relief of the PopupMenu
4740 * @param popupMenu the PopupMenu which we want to set the Relief of
4741 * @param reliefType the type of the relief to set (See ScilabRelief.java)
4743 public static void setRelief(PopupMenu popupMenu, String reliefType) {
4744 ScilabPopupMenuBridge.setRelief(popupMenu, reliefType);
4748 * Delete the PopupMenu
4749 * @param popupMenu the PopupMenu to be destroyed
4751 public static void destroy(PopupMenu popupMenu) {
4752 ScilabPopupMenuBridge.destroy(popupMenu);
4756 * Give the focus to the PopupMenu
4757 * @param popupMenu the PopupMenu
4759 public static void requestFocus(PopupMenu popupMenu) {
4760 ScilabPopupMenuBridge.requestFocus(popupMenu);
4763 /*********************/
4764 /* FlowLayout Bridge */
4765 /*********************/
4767 * Creates a new FlowLayout
4768 * @return the created FlowLayout
4770 public static FlowLayout createFlowLayout() {
4771 return ScilabFlowLayoutBridge.createFlowLayout();
4774 /***********************/
4775 /* BorderLayout Bridge */
4776 /***********************/
4778 * Creates a new BorderLayout
4779 * @return the created BorderLayout
4781 public static BorderLayout createBorderLayout() {
4782 return ScilabBorderLayoutBridge.createBorderLayout();
4785 /***********************/
4786 /* FileChooser Bridge */
4787 /***********************/
4790 * Create a new FileChooser
4791 * @return the created FileChooser
4793 public static SimpleFileChooser createFileChooser() {
4794 return ScilabFileChooserBridge.createFileChooser();
4798 * Create a new ExportFileChooser
4799 * @param figureID exported figure id
4800 * @return the created ExportFileChooser
4802 public static SimpleFileChooser createExportFileChooser(String figureUID) {
4803 return ScilabFileChooserBridge.createExportFileChooser(figureUID);
4807 * Set the title of the file chooser
4808 * @param fileChooser the file chooser we want to set the title of
4809 * @param title the title to set
4811 public static void setTitle(FileChooser fileChooser, String title) {
4812 ScilabFileChooserBridge.setTitle(fileChooser, title);
4816 * Set the initial directory used for file search
4817 * @param fileChooser the file chooser we want to set the initial directory of
4818 * @param path the default path
4820 public static void setInitialDirectory(FileChooser fileChooser, String path) {
4821 ScilabFileChooserBridge.setInitialDirectory(fileChooser, path);
4825 * Display this chooser and wait for user selection
4826 * @param fileChooser the file chooser we want to display
4828 public static void displayAndWait(FileChooser fileChooser) {
4829 ScilabFileChooserBridge.displayAndWait(fileChooser);
4833 * Get the number of files selected
4834 * @param fileChooser the file chooser we want to get the selection size of
4835 * @return the number of files selected
4837 public static int getSelectionSize(FileChooser fileChooser) {
4838 return ScilabFileChooserBridge.getSelectionSize(fileChooser);
4842 * Get the names of selected files
4843 * @param fileChooser the file chooser we want to get the selection of
4844 * @return the names of selected files
4846 public static String[] getSelection(FileChooser fileChooser) {
4847 return ScilabFileChooserBridge.getSelection(fileChooser);
4851 * Get the names of selected files
4852 * @param fileChooser the file chooser we want to get the selection of
4853 * @return the names of selected files
4855 public static String[] getSelectionFileNames(FileChooser fileChooser) {
4856 return ScilabFileChooserBridge.getSelectionFileNames(fileChooser);
4860 * Set the flag indicating that we want only select directories
4861 * @param fileChooser the file chooser we want to set the flag of
4863 public static void setDirectorySelectionOnly(FileChooser fileChooser) {
4864 ScilabFileChooserBridge.setDirectorySelectionOnly(fileChooser);
4868 * We customize the file chooser for the graphic export
4869 * by adding format selection
4871 public static void exportCustomFileChooser() {
4872 ScilabFileChooserBridge.createFileChooser();
4876 * Enable the multiple selection
4877 * @param fileChooser the file chooser we want to get the muliple selection
4878 * @param multipleSelection boolean for the multiple selection
4880 public static void setMultipleSelection(FileChooser fileChooser, boolean multipleSelection) {
4881 ScilabFileChooserBridge.setMultipleSelection(fileChooser, multipleSelection);
4885 * Get the path name of selected files
4886 * @param fileChooser the file chooser we want to get the path of selectd files
4887 * @return the path of selected files
4889 public static String getSelectionPathName(FileChooser fileChooser) {
4890 return ScilabFileChooserBridge.getSelectionPathName(fileChooser);
4894 * Get the filter index
4895 * @param fileChooser the file chooser we want to get the filter indexs
4896 * @return the filter index
4898 public static int getFilterIndex(FileChooser fileChooser) {
4899 return ScilabFileChooserBridge.getFilterIndex(fileChooser);
4903 * Set the dialog type (save or open a file ?)
4904 * @param fileChooser the file chooser we want to get the filter indexs
4905 * @param dialogType the dialog type
4907 public static void setUiDialogType(FileChooser fileChooser, int dialogType) {
4908 ScilabFileChooserBridge.setUiDialogType(fileChooser, dialogType);
4911 /*********************/
4912 /* MessageBox Bridge */
4913 /*********************/
4916 * Create a new MessageBox
4917 * @return the created MessageBox
4919 public static SimpleMessageBox createMessageBox() {
4920 return ScilabMessageBoxBridge.createMessageBox();
4924 * Set the title of the MessageBox
4925 * @param messageBox the MessageBox we want to set the title of
4926 * @param title the title to set
4928 public static void setTitle(MessageBox messageBox, String title) {
4929 ScilabMessageBoxBridge.setTitle(messageBox, title);
4933 * Set the message of the MessageBox
4934 * @param messageBox the MessageBox we want to set the mask of
4935 * @param message the message to set
4937 public static void setMessage(MessageBox messageBox, String message) {
4938 ScilabMessageBoxBridge.setMessage(messageBox, message);
4942 * Set the message of the MessageBox (multi-line)
4943 * @param messageBox the MessageBox we want to set the mask of
4944 * @param message the message to set
4946 public static void setMessage(MessageBox messageBox, String[] message) {
4947 ScilabMessageBoxBridge.setMessage(messageBox, message);
4951 * Display this MessageBox and wait for user selection
4952 * @param messageBox the MessageBox we want to display
4954 public static void displayAndWait(MessageBox messageBox) {
4955 ScilabMessageBoxBridge.displayAndWait(messageBox);
4959 * Get the index of the button clicked
4960 * @param messageBox the MessageBox we want to get the answer of
4961 * @return the index of the button clicked
4963 public static int getSelectedButton(MessageBox messageBox) {
4964 return ScilabMessageBoxBridge.getSelectedButton(messageBox);
4968 * Set the indices of the default selected buttons (x_choices)
4969 * @param messageBox the MessageBox we want to set the defaults of
4970 * @param indices the indices of the default selected buttons
4972 public static void setDefaultSelectedButtons(MessageBox messageBox, int[] indices) {
4973 ScilabMessageBoxBridge.setDefaultSelectedButtons(messageBox, indices);
4977 * Get the indices of the user selected buttons (x_choices)
4978 * @param messageBox the MessageBox we want to set the defaults of
4979 * @return the indices of the default selected buttons
4981 public static int[] getUserSelectedButtons(MessageBox messageBox) {
4982 return ScilabMessageBoxBridge.getUserSelectedButtons(messageBox);
4986 * Set the labels of the buttons in the MessageBox
4987 * @param messageBox the MessageBox we want to set the buttons labels of
4988 * @param labels the labels of the buttons
4990 public static void setButtonsLabels(MessageBox messageBox, String[] labels) {
4991 ScilabMessageBoxBridge.setButtonsLabels(messageBox, labels);
4995 * Set the initial values of the editable zone in the MessageBox
4996 * @param messageBox the MessageBox we want to set the initial value of
4997 * @param value the initial values
4999 public static void setInitialValue(MessageBox messageBox, String[] value) {
5000 ScilabMessageBoxBridge.setInitialValue(messageBox, value);
5004 * Get the value of the editable zone in the MessageBox
5005 * @param messageBox the MessageBox we want to get the value of
5008 public static String[] getValue(MessageBox messageBox) {
5009 return ScilabMessageBoxBridge.getValue(messageBox);
5013 * Get the size of the value of the editable zone in the MessageBox
5014 * @param messageBox the MessageBox we want to get the value size of
5015 * @return the value size
5017 public static int getValueSize(MessageBox messageBox) {
5018 return ScilabMessageBoxBridge.getValueSize(messageBox);
5022 * Set the items of the listbox in the MessageBox
5023 * @param messageBox the MessageBox we want to set the items of
5024 * @param items the items to set
5026 public static void setListBoxItems(MessageBox messageBox, String[] items) {
5027 ScilabMessageBoxBridge.setListBoxItems(messageBox, items);
5031 * Get the index of the selected item in the listbox in the MessageBox
5032 * @param messageBox the MessageBox we want to get the selected item of
5035 public static int getSelectedItem(MessageBox messageBox) {
5036 return ScilabMessageBoxBridge.getSelectedItem(messageBox);
5040 * Set the name of the lines labels in the editable zone in the MessageBox
5041 * @param messageBox the MessageBox we want to set the labels
5042 * @param labels the labels
5044 public static void setLineLabels(MessageBox messageBox, String[] labels) {
5045 ScilabMessageBoxBridge.setLineLabels(messageBox, labels);
5049 * Set the name of the columns labels in the editable zone in the MessageBox
5050 * @param messageBox the MessageBox we want to set the labels
5051 * @param labels the labels
5053 public static void setColumnLabels(MessageBox messageBox, String[] labels) {
5054 ScilabMessageBoxBridge.setColumnLabels(messageBox, labels);
5058 * Set the default values of a multi-value editable zone in the MessageBox
5059 * @param messageBox the MessageBox we want to set the default values
5060 * @param values the values
5062 public static void setDefaultInput(MessageBox messageBox, String[] values) {
5063 ScilabMessageBoxBridge.setDefaultInput(messageBox, values);
5067 * Set a MessageBox modal or not
5068 * @param messageBox the MessageBox we want to set the modality of
5069 * @param status true to set the MessageBox modal and false else
5071 public static void setModal(MessageBox messageBox, boolean status) {
5072 ScilabMessageBoxBridge.setModal(messageBox, status);
5076 * Set the MessageBox icon
5077 * @param messageBox the MessageBox we want to set the icon of
5078 * @param name the name of the icon
5080 public static void setIcon(MessageBox messageBox, String name) {
5081 ScilabMessageBoxBridge.setIcon(messageBox, name);
5085 * Set the component used to set the location of the MessageBox (default is Scilab Console)
5086 * @param messageBox the MessageBox we want to set the parent of
5087 * @param parent the tab to be set as parent
5089 public static void setParentForLocation(MessageBox messageBox, SimpleTab parent) {
5090 ScilabMessageBoxBridge.setParentForLocation(messageBox, parent);
5093 /******************/
5094 /* WaitBar Bridge */
5095 /******************/
5098 * Create a new WaitBar
5099 * @return the created WaitBar
5101 public static SimpleWaitBar createWaitBar() {
5102 return ScilabWaitBarBridge.createWaitBar();
5106 * Set the title of the WaitBar
5107 * @param waitBar the WaitBar
5108 * @param title the title to set
5110 public static void setTitle(WaitBar waitBar, String title) {
5111 ScilabWaitBarBridge.setTitle(waitBar, title);
5115 * Set the message of the WaitBar
5116 * @param waitBar the WaitBar
5117 * @param message the message to set
5119 public static void setMessage(WaitBar waitBar, String[] message) {
5120 ScilabWaitBarBridge.setMessage(waitBar, message);
5124 * Set the current value of the WaitBar
5125 * @param waitBar the WaitBar
5126 * @param value the value to set
5128 public static void setValue(WaitBar waitBar, int value) {
5129 ScilabWaitBarBridge.setValue(waitBar, value);
5134 * @param waitBar the WaitBar
5136 public static void close(WaitBar waitBar) {
5137 ScilabWaitBarBridge.close(waitBar);
5141 * Indicates if the total execution time is known
5142 * @param waitBar the WaitBar
5143 * @param status true if the total progress time in unknown
5145 public static void setIndeterminateMode(WaitBar waitBar, boolean status) {
5146 ScilabWaitBarBridge.setIndeterminateMode(waitBar, status);
5149 /***********************/
5150 /* Help Browser Bridge */
5151 /***********************/
5154 * Create a new Help Browser
5155 * @param helps help chapters and directories
5156 * @param language Scilab current language
5157 * @return the created Help Browser
5159 public static SimpleHelpBrowser createHelpBrowser(String[] helps, String language) {
5160 return ScilabHelpBrowserBridge.createHelpBrowser(helps, language);
5164 * Display the Help Browser
5165 * @param browser the Help Browser
5167 public static void display(HelpBrowser browser) {
5168 ScilabHelpBrowserBridge.display(browser);
5172 * Display the matching items for a specified keyword
5173 * @param browser the Help Browser
5174 * @param keyword the keyword
5176 public static void searchKeywork(HelpBrowser browser, String keyword) {
5177 ScilabHelpBrowserBridge.searchKeywork(browser, keyword);
5181 * Display the result of a full-text search for a specified word
5182 * @param browser the Help Browser
5183 * @param keyword the keyword
5185 public static void fullTextSearch(HelpBrowser browser, String keyword) {
5186 ScilabHelpBrowserBridge.fullTextSearch(browser, keyword);
5190 * Close the HelpBrowser
5191 * @param browser the Help Browser
5193 public static void close(HelpBrowser browser) {
5194 ScilabHelpBrowserBridge.close(browser);
5197 /***********************/
5198 /* FontChooser Bridge */
5199 /***********************/
5202 * Create a new FontChooser
5203 * @param font the default font
5204 * @return the created FontChooser
5206 public static SimpleFontChooser createFontChooser(Font font) {
5207 return ScilabFontChooserBridge.createFontChooser(font);
5211 * Retrieve the selected font, or null
5212 * @param fontChooser the FontChooser
5213 * @return the selected font
5215 public static Font getSelectedFont(FontChooser fontChooser) {
5216 return ScilabFontChooserBridge.getSelectedFont(fontChooser);
5220 * Set the default font name
5221 * @param fontChooser the FontChooser
5222 * @param fontName the default font name
5224 public static void setDefaultFontName(FontChooser fontChooser, String fontName) {
5225 ScilabFontChooserBridge.setDefaultFontName(fontChooser, fontName);
5229 * Set the default font size
5230 * @param fontChooser the FontChooser
5231 * @param fontSize the default font size
5233 public static void setDefaultFontSize(FontChooser fontChooser, int fontSize) {
5234 ScilabFontChooserBridge.setDefaultFontSize(fontChooser, fontSize);
5238 * Set the default font bold attribute
5239 * @param fontChooser the FontChooser
5240 * @param bold the default font bold attribute
5242 public static void setDefaultBold(FontChooser fontChooser, boolean bold) {
5243 ScilabFontChooserBridge.setDefaultBold(fontChooser, bold);
5247 * Set the default font italic attribute
5248 * @param fontChooser the FontChooser
5249 * @param italic the default font italic attribute
5251 public static void setDefaultItalic(FontChooser fontChooser, boolean italic) {
5252 ScilabFontChooserBridge.setDefaultItalic(fontChooser, italic);
5256 * Display the font chooser and wait for a user input
5257 * @param fontChooser the FontChooser
5259 public static void displayAndWait(FontChooser fontChooser) {
5260 ScilabFontChooserBridge.displayAndWait(fontChooser);
5263 /***********************/
5264 /* ColorChooser Bridge */
5265 /***********************/
5268 * Create a new ColorChooser
5269 * @param color the default color
5270 * @return the created ColorChooser
5272 public static SimpleColorChooser createColorChooser(Color color) {
5273 return ScilabColorChooserBridge.createColorChooser(color);
5277 * Set the title of the ColorChooser
5278 * @param colorChooser the ColorChooser
5279 * @param title the title to set
5281 public static void setTitle(ColorChooser colorChooser, String title) {
5282 ScilabColorChooserBridge.setTitle(colorChooser, title);
5286 * Retrieve the selected color, or null
5287 * @param colorChooser the ColorChooser
5288 * @return the selected color
5290 public static Color getSelectedColor(ColorChooser colorChooser) {
5291 return ScilabColorChooserBridge.getSelectedColor(colorChooser);
5295 * Set the default color
5296 * @param colorChooser the ColorChooser
5297 * @param color the default color
5299 public static void setDefaultColor(ColorChooser colorChooser, Color color) {
5300 ScilabColorChooserBridge.setDefaultColor(colorChooser, color);
5304 * Display the font chooser and wait for a user input
5305 * @param colorChooser the ColorChooser
5307 public static void displayAndWait(ColorChooser colorChooser) {
5308 ScilabColorChooserBridge.displayAndWait(colorChooser);
5312 /******************/
5314 /******************/
5317 * Display a given tree
5318 * @param tree a tree structure
5320 public static void showTree(Tree tree) {
5321 ScilabTreeBridge.showTree(tree);
5325 * Create a Scilab Tree
5326 * @param scilabTree a tree structure
5327 * @return a graphical tree
5329 public static SimpleTree createTree(Tree scilabTree) {
5330 return ScilabTreeBridge.createTree(scilabTree);
5334 * Function help on the keyword
5335 * @param console scilab console
5337 public static void helpOnTheKeyword(ScilabConsole console) {
5338 ScilabConsoleBridge.helpOnTheKeyword(console);
5343 * Evaluate the selection with echo
5344 * @param console the console
5346 public static void evaluateSelectionWithEcho(ScilabConsole console) {
5347 ScilabConsoleBridge.evaluateSelectionWithEcho(console);
5351 * Evaluate the selection with no echo
5352 * @param console the console
5354 public static void evaluateSelectionWithNoEcho(ScilabConsole console) {
5355 ScilabConsoleBridge.evaluateSelectionWithNoEcho(console);
5358 /**********************/
5359 /* UiTable Bridge */
5360 /**********************/
5363 * Creates a new UiTable
5364 * @return the created UiTable
5366 public static SimpleUiTable createUiTable() {
5367 return ScilabUiTableBridge.createUiTable();
5371 * Sets the Text of a UiTable
5372 * @param uiTable the UiTable we want to set the Text of
5373 * @param newText the Text to set for the UiTable
5375 public static void setText(UiTable uiTable, String newText) {
5376 ScilabUiTableBridge.setText(uiTable, newText);
5380 * Gets the text of an UiTable
5381 * @param uiTable the UiTable we want to get the text of
5382 * @return the text of the UiTable
5384 public static String getText(UiTable uiTable) {
5385 return ScilabUiTableBridge.getText(uiTable);
5389 * Draws a Scilab UiTable
5390 * @param uiTable the UiTable to draw
5391 * @see org.scilab.modules.ihm.UIElement#draw()
5393 public static void draw(UiTable uiTable) {
5394 ScilabUiTableBridge.draw(uiTable);
5398 * Gets the dimensions (width and height) of a Scilab UiTable
5399 * @param uiTable the UiTable we want to get the dimensions of
5400 * @return the size of the uiTable
5401 * @see org.scilab.modules.ihm.UIElement#getDims()
5403 public static Size getDims(UiTable uiTable) {
5404 return ScilabUiTableBridge.getDims(uiTable);
5408 * Gets the position (X-coordinate and Y-coordinate) of a Scilab uiTable
5409 * @param uiTable the uiTable we want to get the position of
5410 * @return the position of the uiTable
5411 * @see org.scilab.modules.ihm.UIElement#getPosition()
5413 public static Position getPosition(UiTable uiTable) {
5414 return ScilabUiTableBridge.getPosition(uiTable);
5418 * Gets the visibility status of a Scilab UiTable
5419 * @param uiTable the uiTable we want to get the visiblity status of
5420 * @return the visibility status of the uiTable (true if the uiTable is visible, false if not)
5421 * @see org.scilab.modules.ihm.UIElement#isVisible()
5423 public static boolean isVisible(UiTable uiTable) {
5424 return ScilabUiTableBridge.isVisible(uiTable);
5428 * Sets the dimensions (width and height) of a Scilab UiTable
5429 * @param uiTable the uiTable we want to set the dimensions of
5430 * @param newSize the size we want to set to the uiTable
5431 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
5433 public static void setDims(UiTable uiTable, Size newSize) {
5434 ScilabUiTableBridge.setDims(uiTable, newSize);
5438 * Sets the position (X-coordinate and Y-coordinate) of a Scilab uiTable
5439 * @param uiTable the uiTable we want to set the position of
5440 * @param newPosition the position we want to set to the uiTable
5441 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
5443 public static void setPosition(UiTable uiTable, Position newPosition) {
5444 ScilabUiTableBridge.setPosition(uiTable, newPosition);
5448 * Sets the visibility status of a Scilab UiTable
5449 * @param uiTable the uiTable we want to set the visiblity status of
5450 * @param newVisibleState the visibility status we want to set to the uiTable (true to set the uiTable visible, false else)
5451 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
5453 public static void setVisible(UiTable uiTable, boolean newVisibleState) {
5454 ScilabUiTableBridge.setVisible(uiTable, newVisibleState);
5458 * Set the Background color of the UiTable
5459 * @param uiTable the UiTable we want to set the background of
5460 * @param color the Color
5462 public static void setBackground(UiTable uiTable, Color color) {
5463 ScilabUiTableBridge.setBackground(uiTable, color);
5467 * Get the Background color of the UiTable
5468 * @param uiTable the UiTable we want to get the background of
5471 public static Color getBackground(UiTable uiTable) {
5472 return ScilabUiTableBridge.getBackground(uiTable);
5476 * Set the Foreground color of the UiTable
5477 * @param uiTable the UiTable we want to set the foreground of
5478 * @param color the Color
5480 public static void setForeground(UiTable uiTable, Color color) {
5481 ScilabUiTableBridge.setForeground(uiTable, color);
5485 * Get the Foreground color of the UiTable
5486 * @param uiTable the UiTable we want to get the foreground of
5489 public static Color getForeground(UiTable uiTable) {
5490 return ScilabUiTableBridge.getForeground(uiTable);
5494 * Set the font of the UiTable.
5495 * @param uiTable the UiTable we want to set the font of
5496 * @param font the font
5498 public static void setFont(UiTable uiTable, Font font) {
5499 ScilabUiTableBridge.setFont(uiTable, font);
5503 * Get the font of the UiTable.
5504 * @param uiTable the UiTable we want to get the font of
5507 public static Font getFont(UiTable uiTable) {
5508 return ScilabUiTableBridge.getFont(uiTable);
5512 * Set if the UiTable is enabled or not
5513 * @param uiTable the UiTable we want to set the status of
5514 * @param status true if the UiTable is enabled
5516 public static void setEnabled(UiTable uiTable, boolean status) {
5517 ScilabUiTableBridge.setEnabled(uiTable, status);
5521 * Gets the enable status of a UiTable
5522 * @param uiTable the UiTable we want to get the status of
5523 * @return the enable status of the UiTable (true if the UiTable is enabled, false if not)
5525 public static boolean isEnabled(UiTable uiTable) {
5526 return ScilabUiTableBridge.isEnabled(uiTable);
5530 * Add a callback to the UiTable
5531 * @param uiTable the UiTable we want to set the callback of
5532 * @param callback the Callback to set.
5534 public static void setCallback(UiTable uiTable, CommonCallBack callback) {
5535 ScilabUiTableBridge.setCallback(uiTable, callback);
5539 * Set the horizontal alignment for the UiTable text
5540 * @param uiTable the UiTable we want to set the alignment of
5541 * @param alignment the value for the alignment (See ScilabAlignment.java)
5543 public static void setHorizontalAlignment(UiTable uiTable, String alignment) {
5544 ScilabUiTableBridge.setHorizontalAlignment(uiTable, alignment);
5548 * Set the vertical alignment for the UiTable text
5549 * @param uiTable the UiTable we want to set the alignment of
5550 * @param alignment the value for the alignment (See ScilabAlignment.java)
5552 public static void setVerticalAlignment(UiTable uiTable, String alignment) {
5553 ScilabUiTableBridge.setVerticalAlignment(uiTable, alignment);
5557 * Set the Relief of the UiTable
5558 * @param uiTable the UiTable which we want to set the Relief of
5559 * @param reliefType the type of the relief to set (See ScilabRelief.java)
5561 public static void setRelief(UiTable uiTable, String reliefType) {
5562 ScilabUiTableBridge.setRelief(uiTable, reliefType);
5566 * Delete the UiTable
5567 * @param uiTable the UiTable to be destroyed
5569 public static void destroy(UiTable uiTable) {
5570 ScilabUiTableBridge.destroy(uiTable);
5574 * Give the focus to the UiTable
5575 * @param uiTable the UiTable
5577 public static void requestFocus(UiTable uiTable) {
5578 ScilabUiTableBridge.requestFocus(uiTable);
5582 * Sets the column names for uitable
5583 * @param uiTable the UiTable
5584 * @param text the String that contains column names delimited by a '|'. Example: 1|2|3|4
5586 public static void setColnames(UiTable uiTable, String text) {
5587 ScilabUiTableBridge.setColnames(uiTable, text);
5591 * Sets the row names for uitable
5592 * @param uiTable the UiTable
5593 * @param text the String that contains row names delimited by a '|'. Example: 1|2|3|4
5595 public static void setRownames(UiTable uiTable, String text) {
5596 ScilabUiTableBridge.setRownames(uiTable, text);
5600 * Sets the Data for uitable
5601 * @param uiTable the UiTable
5602 * @param text the String that contains row data delimited by a '|'
5603 * and column data delimited by " ". Example: 1.26 3.47 | a b | d e | a b
5605 public static void setData(UiTable uiTable, String text) {
5606 ScilabUiTableBridge.setData(uiTable, text);
5609 /**********************/
5610 /* UiDisplayTree Bridge */
5611 /**********************/
5614 * Creates a new UiDisplayTree
5615 * @return the created UiDisplayTree
5617 public static SimpleUiDisplayTree createUiDisplayTree() {
5618 return ScilabUiDisplayTreeBridge.createUiDisplayTree();
5622 * Sets the Text of a UiDisplayTree
5623 * @param uiTree the UiDisplayTree we want to set the Text of
5624 * @param newText the Text to set for the UiDisplayTree
5626 public static void setText(UiDisplayTree uiTree, String newText) {
5627 ScilabUiDisplayTreeBridge.setText(uiTree, newText);
5631 * Gets the text of an UiDisplayTree
5632 * @param uiTree the UiDisplayTree we want to get the text of
5633 * @return the text of the UiDisplayTree
5635 public static String getText(UiDisplayTree uiTree) {
5636 return ScilabUiDisplayTreeBridge.getText(uiTree);
5640 * Draws a Scilab UiDisplayTree
5641 * @param uiTree the UiDisplayTree to draw
5642 * @see org.scilab.modules.ihm.UIElement#draw()
5644 public static void draw(UiDisplayTree uiTree) {
5645 ScilabUiDisplayTreeBridge.draw(uiTree);
5649 * Gets the dimensions (width and height) of a Scilab UiDisplayTree
5650 * @param uiTree the UiDisplayTree we want to get the dimensions of
5651 * @return the size of the uiTree
5652 * @see org.scilab.modules.ihm.UIElement#getDims()
5654 public static Size getDims(UiDisplayTree uiTree) {
5655 return ScilabUiDisplayTreeBridge.getDims(uiTree);
5659 * Gets the position (X-coordinate and Y-coordinate) of a Scilab uiTree
5660 * @param uiTree the uiTree we want to get the position of
5661 * @return the position of the uiTree
5662 * @see org.scilab.modules.ihm.UIElement#getPosition()
5664 public static Position getPosition(UiDisplayTree uiTree) {
5665 return ScilabUiDisplayTreeBridge.getPosition(uiTree);
5669 * Gets the visibility status of a Scilab UiDisplayTree
5670 * @param uiTree the uiTree we want to get the visiblity status of
5671 * @return the visibility status of the uiTree (true if the uiTree is visible, false if not)
5672 * @see org.scilab.modules.ihm.UIElement#isVisible()
5674 public static boolean isVisible(UiDisplayTree uiTree) {
5675 return ScilabUiDisplayTreeBridge.isVisible(uiTree);
5679 * Sets the dimensions (width and height) of a Scilab UiDisplayTree
5680 * @param uiTree the uiTree we want to set the dimensions of
5681 * @param newSize the size we want to set to the uiTree
5682 * @see org.scilab.modules.ihm.UIElement#setDims(org.scilab.modules.ihm.utils.Size)
5684 public static void setDims(UiDisplayTree uiTree, Size newSize) {
5685 ScilabUiDisplayTreeBridge.setDims(uiTree, newSize);
5689 * Sets the position (X-coordinate and Y-coordinate) of a Scilab uiTree
5690 * @param uiTree the uiTree we want to set the position of
5691 * @param newPosition the position we want to set to the uiTree
5692 * @see org.scilab.modules.ihm.UIElement#setPosition(org.scilab.modules.ihm.utils.Position)
5694 public static void setPosition(UiDisplayTree uiTree, Position newPosition) {
5695 ScilabUiDisplayTreeBridge.setPosition(uiTree, newPosition);
5699 * Sets the visibility status of a Scilab UiDisplayTree
5700 * @param uiTree the uiTree we want to set the visiblity status of
5701 * @param newVisibleState the visibility status we want to set to the uiTree (true to set the uiTree visible, false else)
5702 * @see org.scilab.modules.ihm.UIElement#setVisible(boolean)
5704 public static void setVisible(UiDisplayTree uiTree, boolean newVisibleState) {
5705 ScilabUiDisplayTreeBridge.setVisible(uiTree, newVisibleState);
5709 * Set the Background color of the UiDisplayTree
5710 * @param uiTree the UiDisplayTree we want to set the background of
5711 * @param color the Color
5713 public static void setBackground(UiDisplayTree uiTree, Color color) {
5714 ScilabUiDisplayTreeBridge.setBackground(uiTree, color);
5718 * Get the Background color of the UiDisplayTree
5719 * @param uiTree the UiDisplayTree we want to get the background of
5722 public static Color getBackground(UiDisplayTree uiTree) {
5723 return ScilabUiDisplayTreeBridge.getBackground(uiTree);
5727 * Set the Foreground color of the UiDisplayTree
5728 * @param uiTree the UiDisplayTree we want to set the foreground of
5729 * @param color the Color
5731 public static void setForeground(UiDisplayTree uiTree, Color color) {
5732 ScilabUiDisplayTreeBridge.setForeground(uiTree, color);
5736 * Get the Foreground color of the UiDisplayTree
5737 * @param uiTree the UiDisplayTree we want to get the foreground of
5740 public static Color getForeground(UiDisplayTree uiTree) {
5741 return ScilabUiDisplayTreeBridge.getForeground(uiTree);
5745 * Set the font of the UiDisplayTree.
5746 * @param uiTree the UiDisplayTree we want to set the font of
5747 * @param font the font
5749 public static void setFont(UiDisplayTree uiTree, Font font) {
5750 ScilabUiDisplayTreeBridge.setFont(uiTree, font);
5754 * Get the font of the UiDisplayTree.
5755 * @param uiTree the UiDisplayTree we want to get the font of
5758 public static Font getFont(UiDisplayTree uiTree) {
5759 return ScilabUiDisplayTreeBridge.getFont(uiTree);
5763 * Set if the UiDisplayTree is enabled or not
5764 * @param uiTree the UiDisplayTree we want to set the status of
5765 * @param status true if the UiDisplayTree is enabled
5767 public static void setEnabled(UiDisplayTree uiTree, boolean status) {
5768 ScilabUiDisplayTreeBridge.setEnabled(uiTree, status);
5772 * Gets the enable status of a UiDisplayTree
5773 * @param uiTree the UiDisplayTree we want to get the status of
5774 * @return the enable status of the UiDisplayTree (true if the UiDisplayTree is enabled, false if not)
5776 public static boolean isEnabled(UiDisplayTree uiTree) {
5777 return ScilabUiDisplayTreeBridge.isEnabled(uiTree);
5781 * Add a callback to the UiDisplayTree
5782 * @param uiTree the UiDisplayTree we want to set the callback of
5783 * @param callback the Callback to set.
5785 public static void setCallback(UiDisplayTree uiTree, CommonCallBack callback) {
5786 ScilabUiDisplayTreeBridge.setCallback(uiTree, callback);
5790 * Set the horizontal alignment for the UiDisplayTree text
5791 * @param uiTree the UiDisplayTree we want to set the alignment of
5792 * @param alignment the value for the alignment (See ScilabAlignment.java)
5794 public static void setHorizontalAlignment(UiDisplayTree uiTree, String alignment) {
5795 ScilabUiDisplayTreeBridge.setHorizontalAlignment(uiTree, alignment);
5799 * Set the vertical alignment for the UiDisplayTree text
5800 * @param uiTree the UiDisplayTree we want to set the alignment of
5801 * @param alignment the value for the alignment (See ScilabAlignment.java)
5803 public static void setVerticalAlignment(UiDisplayTree uiTree, String alignment) {
5804 ScilabUiDisplayTreeBridge.setVerticalAlignment(uiTree, alignment);
5808 * Set the Relief of the UiDisplayTree
5809 * @param uiTree the UiDisplayTree which we want to set the Relief of
5810 * @param reliefType the type of the relief to set (See ScilabRelief.java)
5812 public static void setRelief(UiDisplayTree uiTree, String reliefType) {
5813 ScilabUiDisplayTreeBridge.setRelief(uiTree, reliefType);
5817 * Delete the UiDisplayTree
5818 * @param uiTree the UiDisplayTree to be destroyed
5820 public static void destroy(UiDisplayTree uiTree) {
5821 ScilabUiDisplayTreeBridge.destroy(uiTree);
5825 * Give the focus to the UiDisplayTree
5826 * @param uiTree the UiDisplayTree
5828 public static void requestFocus(UiDisplayTree uiTree) {
5829 ScilabUiDisplayTreeBridge.requestFocus(uiTree);
5833 * Sets the tree data to be added to viewport
5834 * @param text the array of strings containing tree data
5836 public static void setData(UiDisplayTree uiTree, String[] text) {
5837 ScilabUiDisplayTreeBridge.setData(uiTree, text);