Package org.eclipse.jface.action
Class Separator
- java.lang.Object
-
- org.eclipse.jface.action.ContributionItem
-
- org.eclipse.jface.action.AbstractGroupMarker
-
- org.eclipse.jface.action.Separator
-
- All Implemented Interfaces:
IContributionItem
public class Separator extends AbstractGroupMarker
A separator is a special kind of contribution item which acts as a visual separator and, optionally, acts as a group marker. Unlike group markers, separators do have a visual representation for menus and toolbars.This class may be instantiated; it is not intended to be subclassed outside the framework.
- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfill(Menu menu, int index)The default implementation of thisIContributionItemmethod does nothing.voidfill(ToolBar toolbar, int index)The default implementation of thisIContributionItemmethod does nothing.booleanisSeparator()TheSeparatorimplementation of thisIContributionItemmethod returnstrue-
Methods inherited from class org.eclipse.jface.action.AbstractGroupMarker
getGroupName, isEnabled, isGroupMarker
-
-
-
-
Constructor Detail
-
Separator
public Separator()
Creates a separator which does not start a new group.
-
Separator
public Separator(String groupName)
Creates a new separator which also defines a new group having the given group name. The group name must not benullor the empty string. The group name is also used as the item id.- Parameters:
groupName- the group name of the separator
-
-
Method Detail
-
fill
public void fill(Menu menu, int index)
Description copied from class:ContributionItemThe default implementation of thisIContributionItemmethod does nothing. Subclasses may override.- Specified by:
fillin interfaceIContributionItem- Overrides:
fillin classContributionItem- Parameters:
menu- the parent menuindex- the index where the controls are inserted, or-1to insert at the end
-
fill
public void fill(ToolBar toolbar, int index)
Description copied from class:ContributionItemThe default implementation of thisIContributionItemmethod does nothing. Subclasses may override.- Specified by:
fillin interfaceIContributionItem- Overrides:
fillin classContributionItem- Parameters:
toolbar- the parent tool barindex- the index where the controls are inserted, or-1to insert at the end
-
isSeparator
public boolean isSeparator()
TheSeparatorimplementation of thisIContributionItemmethod returnstrue- Specified by:
isSeparatorin interfaceIContributionItem- Overrides:
isSeparatorin classContributionItem- Returns:
trueif this item is a separator, andfalsefor normal items- See Also:
Separator
-
-