Package com.iizigo.jface
Class EnabledItemsCompoundItem
java.lang.Object
org.eclipse.jface.action.ContributionItem
org.eclipse.ui.actions.CompoundContributionItem
com.iizigo.jface.EnabledItemsCompoundItem
- All Implemented Interfaces:
- IAddActionsOrContributions,- IContributionItem
public class EnabledItemsCompoundItem extends CompoundContributionItem implements IAddActionsOrContributions
Class for enabled items.
- Author:
- Christopher Mindus
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescriptionAdds an action.- add- (IContributionItem item) Adds an item.Adds a separator.- protected IContributionItem[]Overrides to return only enabled items, skipping separators as required in order not to duplicate or have single ones.- booleanChecks the state of all items.- void- setRemoveSeparators- (boolean skipLeading, boolean skipTrailing) Sets removal of separators.- void- update()Updates state.- voidUpdates state.- Methods inherited from class org.eclipse.ui.actions.CompoundContributionItem- dispose, fill, isDirty, isDynamic, setParent- Methods inherited from class org.eclipse.jface.action.ContributionItem- fill, fill, fill, getId, getParent, isEnabled, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setVisible, toString
- Constructor Details- EnabledItemsCompoundItempublic EnabledItemsCompoundItem()
 
- Method Details- setRemoveSeparatorspublic void setRemoveSeparators- (boolean skipLeading, boolean skipTrailing) Sets removal of separators.- Parameters:
- skipLeading- Leading separators skip flag.
- skipTrailing- Trailing separators skip flag.
 
- getContributionItemsOverrides to return only enabled items, skipping separators as required in order not to duplicate or have single ones.- Specified by:
- getContributionItemsin class- CompoundContributionItem
 
- addAdds an item.- Specified by:
- addin interface- IAddActionsOrContributions
 
- addAdds an action.- Specified by:
- addin interface- IAddActionsOrContributions
 
- addSeparatorAdds a separator.- Specified by:
- addSeparatorin interface- IAddActionsOrContributions
 
- updatepublic void update()Updates state.- Specified by:
- updatein interface- IContributionItem
- Overrides:
- updatein class- ContributionItem
 
- updateUpdates state.- Specified by:
- updatein interface- IContributionItem
- Overrides:
- updatein class- ContributionItem
 
- hasVisibleEnabledItemspublic boolean hasVisibleEnabledItems()Checks the state of all items.