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