public class ContextMenuItem extends AbstractHandler
Modifier and Type | Field and Description |
---|---|
int |
accelerator
The accelerator.
|
static String |
HANDLER_ID
This Handler ID.
|
Constructor and Description |
---|
ContextMenuItem()
The Eclipse constructor.
|
ContextMenuItem(String label,
IContextMenuAction adder)
Creates the Add Item instance for a DesignerProp class.
|
ContextMenuItem(String label,
ImageDescriptor icon,
IContextMenuAction adder)
Creates the Add Item instance for a DesignerProp class.
|
ContextMenuItem(String label,
String mnemonic,
IContextMenuAction adder)
Creates the Add Item instance for a DesignerProp class.
|
ContextMenuItem(String label,
String mnemonic,
ImageDescriptor icon,
IContextMenuAction adder)
Creates the Add Item instance for a DesignerProp class.
|
ContextMenuItem(String label,
String mnemonic,
int accelerator,
ImageDescriptor icon,
IContextMenuAction adder)
Creates the Add Item instance for a DesignerProp class.
|
Modifier and Type | Method and Description |
---|---|
CommandContributionItem |
createCommandContributionItem()
Gets the command contribution item.
|
IzMenuItem |
createMenuItem(DesignerProp target,
Control control,
IzMenu menu,
IPropUndoRedo undoRedo)
Creates a menu item for this Add-Item.
|
IzMenuItem |
createMenuItem(Viewer viewer,
IzMenu menu,
IPropUndoRedo undoRedo)
Creates a menu item for this Add-Item.
|
boolean |
doAddSeparator()
Checks if this item requires a separator before.
|
Object |
execute(ExecutionEvent event)
Performs the Handler operation.
|
CommandContributionItem |
getCommandContributionItem()
Gets the command contribution item.
|
boolean |
isEnabled(DesignerProp target)
Checks if the Add Item is enabled in order not to add it in a pop-up menu if disabled.
|
void |
setSeparatorBefore()
Adds a separator before this item.
|
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
public static final String HANDLER_ID
public final int accelerator
public ContextMenuItem()
public ContextMenuItem(String label, IContextMenuAction adder)
public ContextMenuItem(String label, ImageDescriptor icon, IContextMenuAction adder)
public ContextMenuItem(String label, String mnemonic, IContextMenuAction adder)
public ContextMenuItem(String label, String mnemonic, ImageDescriptor icon, IContextMenuAction adder)
public ContextMenuItem(String label, String mnemonic, int accelerator, ImageDescriptor icon, IContextMenuAction adder)
public void setSeparatorBefore()
public boolean doAddSeparator()
public boolean isEnabled(DesignerProp target)
public CommandContributionItem getCommandContributionItem()
public CommandContributionItem createCommandContributionItem()
public Object execute(ExecutionEvent event) throws ExecutionException
ExecutionException
public IzMenuItem createMenuItem(Viewer viewer, IzMenu menu, IPropUndoRedo undoRedo)
public IzMenuItem createMenuItem(DesignerProp target, Control control, IzMenu menu, IPropUndoRedo undoRedo)
iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.