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
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.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
The default implementation of thisIContributionItem
method does nothing.void
The default implementation of thisIContributionItem
method does nothing.boolean
TheSeparator
implementation of thisIContributionItem
method returnstrue
Methods inherited from class org.eclipse.jface.action.AbstractGroupMarker
getGroupName, isEnabled, isGroupMarker
-
Constructor Details
-
Separator
public Separator()Creates a separator which does not start a new group. -
Separator
Creates a new separator which also defines a new group having the given group name. The group name must not benull
or the empty string. The group name is also used as the item id.- Parameters:
groupName
- the group name of the separator
-
-
Method Details
-
fill
Description copied from class:ContributionItem
The default implementation of thisIContributionItem
method does nothing. Subclasses may override.- Specified by:
fill
in interfaceIContributionItem
- Overrides:
fill
in classContributionItem
- Parameters:
menu
- the parent menuindex
- the index where the controls are inserted, or-1
to insert at the end
-
fill
Description copied from class:ContributionItem
The default implementation of thisIContributionItem
method does nothing. Subclasses may override.- Specified by:
fill
in interfaceIContributionItem
- Overrides:
fill
in classContributionItem
- Parameters:
toolbar
- the parent tool barindex
- the index where the controls are inserted, or-1
to insert at the end
-
isSeparator
public boolean isSeparator()TheSeparator
implementation of thisIContributionItem
method returnstrue
- Specified by:
isSeparator
in interfaceIContributionItem
- Overrides:
isSeparator
in classContributionItem
- Returns:
true
if this item is a separator, andfalse
for normal items- See Also:
-