Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| ToolBar |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| addToolBar |
Span |
---|
| (name, [displayname], [row]) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Add a toolbar by name and optional displayname and row. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters name [displayname] [row] |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
// Note: method addToolBar only works in the smart client.
// Add a toolbar by name and optional displayname and row.
// add a toolbar with only a name
var toolbar = plugins.window.addToolBar("toolbar_0");
// add a toolbar with a name and internal name
// var toolbar = plugins.window.addToolBar("toolbar_1", "toolbar_1");
// add a toolbar with a name, internal name and the row you want the
// toolbar to show at. rownumber starts at 0
// var toolbar = plugins.window.addToolBar("toolbar_2", "toolbar_2", 3);
// REMARK: normally you would add buttons, checkboxes etc in the same method
// this example will show no buttons for now!
// we will add them via the other methods on this form.
|
|
|
|
|
Table Body (tbody) |
---|
id | createPopupMenu |
---|
class | node |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Popup |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| createPopupMenu |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Replace with description |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Popup |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var popupmenu = plugins.window.createPopupMenu()
var menuitem1 = popupmenu.addMenuItem('A',myMethod)
var menuitem2 = popupmenu.addRadioButton('B',myMethod)
var menuitem3 = popupmenu.addRadioButton('C',myMethod)
var menuitem4 = popupmenu.addSeparator()
var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod)
var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod)
//add arguments to the method call
menuitem6.methodArguments = ['arg1', 'another argument']
var submenu = popupmenu.addMenu('SubMenu')
var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod)
var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif')
var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key
menuitem2.selected = true;
menuitem6.enabled = false
subitem2.selected = true;
var source = event.getSource()
if (source != null)
{
popupmenu.show(source);
//or you can set the coordinates popupmenu.show(10, 10);
}
|
|
|
|
|
Table Body (tbody) |
---|
id | createShortcut |
---|
class | node |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
createShortcut |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Boolean |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| createShortcut |
Span |
---|
| (shortcut, method, [form_name]) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Create a shortcut. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters shortcut method [form_name] |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
// Create a shortcut.
// this plugin uses the java keystroke parser
// see http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/KeyStroke.html#getKeyStroke(java.lang.String)
// global shortcut (on all forms) on 'apple 1' on a mac client and 'control 1' on other client platforms
plugins.window.createShortcut('menu 1', 'globals.handleShortcut');
// global handler, only triggered when on form frm_orders
plugins.window.createShortcut('control shift I', globals.handleOrdersShortcut, 'frm_orders');
// form method called when shortcut is used
plugins.window.createShortcut('control LEFT', 'frm_products.handleShortcut', 'frm_products');
// same, but use method in stead of string
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut, 'frm_contacts');
// remove global shortcut and form-level shortcut
plugins.window.createShortcut('menu 1');
plugins.window.removeShortcut('control RIGHT', 'frm_contacts');
// shortcut handlers are called with an jsevent argument
///**
//* Handle keyboard shortcut.
//*
//* @param {JSEvent} event the event that triggered the action
//*/
//function handleShortcut(event)
//{
// application.output(event.getType()) // returns 'menu 1'
// application.output(event.getFormName()) // returns 'frm_contacts'
// application.output(event.getElementName()) // returns 'contact_name_field' or null when no element is selected
//}
// NOTE: shortcuts will not override existing operating system or browser shortcuts,
// choose your shortcuts careful to make sure they work in all clients.
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| MenuBar |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getMenuBar |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Get the menubar of a window. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters [windowName] |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
// Get the menubar of a window.
// get the menubar of the main window
var mainMenubar = plugins.window.getMenuBar();
// get the menubar of a named window
application.showFormInWindow(forms.contacts,100,80,500,300,'my own window title',false,true,'mywindow');
var myWindowMenubar = plugins.window.getMenuBar('mywindow');
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| ToolBar |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getToolBar |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Get the toolbar from the toolbar panel by name. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters name |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
// Note: method getToolBar only works in the smart client.
// Get the toolbar from the toolbar panel by name.
// get the toolbar at the panel by name
var toolbar = plugins.window.getToolBar("toolbar_0");
// add a button with a text and a method
toolbar.addButton("button", feedback_button);
// add an input array to the button for feedback in the selected method
toolbar.addButton("button", feedback_button, [1, "2", "three"]);
// add an icon to the button
toolbar.addButton("button", feedback_button, [1, "2", "three"], "media:///yourimage.gif");
// add a tooltip to the button
toolbar.addButton("button", feedback_button, [1, "2", "three"], "media:///yourimage.gif", "tooltip.");
// show only an icon on the button and disable the button
toolbar.addButton(null, feedback_button, [1, "2", "three"], "media:///yourimage.gif", "tooltip.", false);
// add a separator
toolbar.addSeparator();
// make the button non visible
toolbar.addButton(null, feedback_button, [1, "2", "three"], "media:///yourimage.gif", "tooltip.",true, false);
// and validate the changes
// to make them know to the user interface)
toolbar.validate();
|
|
|
|
|
Table Body (tbody) |
---|
id | getToolbarNames |
---|
class | node |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| String[] |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getToolbarNames |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Get all toolbar names from the toolbar panel. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns String[] |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
// Note: method getToolbarNames only works in the smart client.
// Get all toolbar names from the toolbar panel.
// create an array of toolbar names
var names = plugins.window.getToolbarNames();
// create an empty message variable
var message = "";
// loop through the array
for (var i = 0 ; i < names.length ; i++) {
//add the name(s) to the message
message += names[i] + "\n";
}
// show the message
plugins.dialogs.showInfoDialog("toolbar names", message);
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| void |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| maximize |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Maximize the current window or the window with the name provided (Smart client only) |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters [windowName] |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns void |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
// Maximize the current window or the window with the name provided (Smart client only)
// maximize the main window:
plugins.window.maximize();
// or a window constructed with the name 'test':
plugins.window.maximize('test');
|
|
|
|
|
Table Body (tbody) |
---|
id | removeShortcut |
---|
class | node |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
removeShortcut |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Boolean |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| removeShortcut |
Span |
---|
| (shortcut, [form_name]) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Remove a shortcut. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters shortcut [form_name] |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
// Remove a shortcut.
// this plugin uses the java keystroke parser
// see http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/KeyStroke.html#getKeyStroke(java.lang.String)
// global shortcut (on all forms) on 'apple 1' on a mac client and 'control 1' on other client platforms
plugins.window.createShortcut('menu 1', 'globals.handleShortcut');
// global handler, only triggered when on form frm_orders
plugins.window.createShortcut('control shift I', globals.handleOrdersShortcut, 'frm_orders');
// form method called when shortcut is used
plugins.window.createShortcut('control LEFT', 'frm_products.handleShortcut', 'frm_products');
// same, but use method in stead of string
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut, 'frm_contacts');
// remove global shortcut and form-level shortcut
plugins.window.createShortcut('menu 1');
plugins.window.removeShortcut('control RIGHT', 'frm_contacts');
// shortcut handlers are called with an jsevent argument
///**
//* Handle keyboard shortcut.
//*
//* @param {JSEvent} event the event that triggered the action
//*/
//function handleShortcut(event)
//{
// application.output(event.getType()) // returns 'menu 1'
// application.output(event.getFormName()) // returns 'frm_contacts'
// application.output(event.getElementName()) // returns 'contact_name_field' or null when no element is selected
//}
// NOTE: shortcuts will not override existing operating system or browser shortcuts,
// choose your shortcuts careful to make sure they work in all clients.
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| void |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| removeToolBar |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Remove the toolbar from the toolbar panel. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters name |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns void |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
// Note: method removeToolBar only works in the smart client.
// Remove the toolbar from the toolbar panel.
// removing a toolbar from the toolbar panel is done by name
// the plugin checks the existence of the toolbar
// when the toolbar does not exist it will not throw an error though.
plugins.window.removeToolBar("toolbar_0");
plugins.window.removeToolBar("toolbar_1");
plugins.window.removeToolBar("toolbar_2");
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setFullScreen |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| void |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| setFullScreen |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Replace with description |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns void |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
plugins.window.setFullScreen(true)
|
|
|
|
|
Table Body (tbody) |
---|
id | setStatusBarVisible |
---|
class | node |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setStatusBarVisible |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| void |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| setStatusBarVisible |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Replace with description |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns void |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
plugins.window.setStatusBarVisible()
|
|
|
|
|
Table Body (tbody) |
---|
id | setToolBarAreaVisible |
---|
class | node |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| void |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| setToolBarAreaVisible |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Replace with description |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns void |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
plugins.window.setToolBarAreaVisible(false)
|
|
|
|
|
|