{column:padding=0px|width=80px}{column}{column}{column}
Method Summary
addCheckBox([name], [method], [icon], [mnemonic], [enabled], [align])
Add the Checkbox at the selected index (starting at 0) or add it at the end (empty).
addMenuItem([name], [method], [icon], [mnemonic], [enabled], [align])
Add the item at the selected index (starting at 0) or add it at the end (empty).
addRadioButton([name], [method], [icon], [mnemonic], [enabled], [align])
Add the Radiobutton at the selected index (starting at 0) or add it at the end (empty).
void
addRadioGroup()
Add a Radiogroup for the Radiobuttons.
void
addSeparator()
Add the separator at the selected index (starting at 0) or add it at the end (empty).
getCheckBox(index)
Get the Checkbox at the selected index (starting at 0).
getClientProperty(key)
Gets the specified client property for the element based on a key.
getItemCount()
Get the number of items in the menu.
getItemIndexByText(name)
Retrieve the index of the item by text.
getRadioButton(index)
Get the Radiobutton at the selected index (starting at 0).
void
putClientProperty(key, value)
Sets the value for the specified element client property key.
void
removeAllItems()
Remove all items from the menu.
void
removeItem(index 1, [index 2-n])
Remove the item(s) at the selected index/indices.
void
show([element], [x], [y])
Show the popup below the element or add x an y values relative to the element
{column:padding=0px|width=100%}{column}
Method Details
addCheckBox
([name], [method], [icon], [mnemonic], [enabled], [align])
Add the Checkbox at the selected index (starting at 0) or add it at the end (empty).
Parameters
[name]
[method]
[icon]
[mnemonic]
[enabled]
[align]
Returns
CheckBox
Sample
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); }
addMenu
([name], [menu], [icon], [mnemonic], [enabled], [align])
Add the submenu at the selected index (starting at 0) or add it at the end (empty).
Parameters
[name]
[menu]
[icon]
[mnemonic]
[enabled]
[align]
Returns
Menu
Sample
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); }
addMenuItem
([name], [method], [icon], [mnemonic], [enabled], [align])
Add the item at the selected index (starting at 0) or add it at the end (empty).
Parameters
[name]
[method]
[icon]
[mnemonic]
[enabled]
[align]
Returns
MenuItem
Sample
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); }
addRadioButton
([name], [method], [icon], [mnemonic], [enabled], [align])
Add the Radiobutton at the selected index (starting at 0) or add it at the end (empty).
Parameters
[name]
[method]
[icon]
[mnemonic]
[enabled]
[align]
Returns
RadioButton
Sample
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); }
void
addRadioGroup
()
Add a Radiogroup for the Radiobuttons.
Returns
void
Sample
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); }
void
addSeparator
()
Add the separator at the selected index (starting at 0) or add it at the end (empty).
Returns
void
Sample
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); }
getCheckBox
(index)
Get the Checkbox at the selected index (starting at 0).
Parameters
index
Returns
CheckBox
Sample
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); }
getClientProperty
(key)
Gets the specified client property for the element based on a key.
Parameters
key
Returns
Object
Sample
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); }
getItem
(index)
Get the item at the selected index (starting at 0).
Parameters
index
Returns
MenuItem
Sample
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); }
getItemCount
()
Get the number of items in the menu.
Returns
Number
Sample
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); }
getItemIndexByText
(name)
Retrieve the index of the item by text.
Parameters
name
Returns
Number
Sample
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); }
getMenu
(index)
Get the submenu at the selected index (starting at 0).
Parameters
index
Returns
Menu
Sample
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); }
getRadioButton
(index)
Get the Radiobutton at the selected index (starting at 0).
Parameters
index
Returns
RadioButton
Sample
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); }
void
putClientProperty
(key, value)
Sets the value for the specified element client property key.
Parameters
key
value
Returns
void
Sample
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); }
void
removeAllItems
()
Remove all items from the menu.
Returns
void
Sample
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); }
void
removeItem
(index 1, [index 2-n])
Remove the item(s) at the selected index/indices.
Parameters
index 1
[index 2-n]
Returns
void
Sample
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); }
void
show
([element], [x], [y])
Show the popup below the element or add x an y values relative to the element
Parameters
[element]
[x]
[y]
Returns
void
Sample
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); }