Package com.e1c.langtool.ui.common.combo
Class MenuActionComboBox.ItemFactory<V>
java.lang.Object
com.e1c.langtool.ui.common.combo.MenuActionComboBox.ItemFactory<V>
- Type Parameters:
V- the type of items contained by parentMenuActionComboBox
- All Implemented Interfaces:
MenuActionComboBox.IContributionItemFactory<V>
- Enclosing class:
- MenuActionComboBox<T>
public static class MenuActionComboBox.ItemFactory<V>
extends Object
implements MenuActionComboBox.IContributionItemFactory<V>
The base implementation of contribution item factory.
This factory creates contribution items based on Action
with text and image are gotten from ILabelProvider. Also this actions
has Action.run() method that calls IComboBox.select(int)
to select item by click.
-
Constructor Summary
ConstructorsConstructorDescriptionItemFactory(MenuActionComboBox<V> combo, ILabelProvider labelProvider) Creates a new contribution item factory. -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.jface.action.IContributionItemCreates a new contribution item for dropdown menu that is a representation of the given item in specified index.protected org.eclipse.jface.action.ActioncreateAction(V item, int index)
-
Constructor Details
-
ItemFactory
Creates a new contribution item factory.- Parameters:
combo- the parent combobox for which this factory is specifiedlabelProvider- the label provider to get data for creating items
-
-
Method Details
-
create
Description copied from interface:MenuActionComboBox.IContributionItemFactoryCreates a new contribution item for dropdown menu that is a representation of the given item in specified index.- Specified by:
createin interfaceMenuActionComboBox.IContributionItemFactory<V>- Parameters:
item- the item on basis of which theContributionItemwill be createdindex- the index of the given item (seeIComboBox.indexOf(Object)- Returns:
- a new
ContributionItemelement for dropdown menu - See Also:
-
ContributionItem
-
createAction
-