org.eclipse.jface.action
Class SubContributionItem
java.lang.Object
org.eclipse.jface.action.SubContributionItem
- All Implemented Interfaces:
- IContributionItem
- public class SubContributionItem
- extends Object
- implements IContributionItem
A SubContributionItem is a wrapper for an IContributionItem.
It is used within a SubContributionManager to control the visibility
of items.
This class is not intended to be subclassed.
Method Summary
|
void
| dispose()
The default implementation of this IContributionItem
delegates to the inner item.
|
void
| fill(Composite parent)
Fills the given composite control with controls representing this
contribution item.
|
void
| fill(CoolBar parent,
int index)
Fills the given cool bar with controls representing this contribution item.
|
void
| fill(Menu parent,
int index)
Fills the given menu with controls representing this contribution item.
|
void
| fill(ToolBar parent,
int index)
Fills the given tool bar with controls representing this contribution item.
|
String
| getId()
Returns the identifier of this contribution item.
|
IContributionItem
| getInnerItem()
Returns the inner contribution item.
|
boolean
| isDirty()
Returns whether this contribution item is dirty.
|
boolean
| isDynamic()
Returns whether this contribution item is dynamic.
|
boolean
| isEnabled()
Returns whether this contribution item is enabled.
|
boolean
| isGroupMarker()
Returns whether this contribution item is a group marker.
|
boolean
| isSeparator()
Returns whether this contribution item is a separator.
|
boolean
| isVisible()
Returns whether this contribution item is visibile within its manager.
|
void
| saveWidgetState()
Saves any state information of the control(s) owned by this contribution item.
|
void
| setParent(IContributionManager parent)
Sets the parent manager of this item
|
void
| setVisible(boolean visible)
Sets whether this contribution item is visibile within its manager.
|
void
| update()
Updates any SWT controls cached by this contribution item with any
changes which have been made to this contribution item since the last update.
|
void
| update(String id)
Updates any SWT controls cached by this contribution item with changes
for the the given property.
|
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
SubContributionItem
public SubContributionItem(IContributionItem item)
- Creates a new SubContributionItem.
dispose
public void dispose()
- The default implementation of this IContributionItem
delegates to the inner item. Subclasses may override.
- Specified by:
- dispose in interface IContributionItem
fill
public void fill(Composite parent)
- Description copied from interface: IContributionItem
- Fills the given composite control with controls representing this
contribution item. Used by StatusLineManager.
- Specified by:
- fill in interface IContributionItem
- Parameters:
- parent - the parent control
fill
public void fill(Menu parent,
int index)
- Description copied from interface: IContributionItem
- Fills the given menu with controls representing this contribution item.
Used by MenuManager.
- Specified by:
- fill in interface IContributionItem
- Parameters:
- parent - the parent menu
- index - the index where the controls are inserted,
or -1 to insert at the end
fill
public void fill(ToolBar parent,
int index)
- Description copied from interface: IContributionItem
- Fills the given tool bar with controls representing this contribution item.
Used by ToolBarManager.
- Specified by:
- fill in interface IContributionItem
- Parameters:
- parent - the parent tool bar
- index - the index where the controls are inserted,
or -1 to insert at the end
getId
public String getId()
- Description copied from interface: IContributionItem
- Returns the identifier of this contribution item.
The id is used for retrieving an item from its manager.
- Specified by:
- getId in interface IContributionItem
- Returns:
- the contribution item identifier, or null
if none
getInnerItem
public IContributionItem getInnerItem()
- Returns the inner contribution item.
- Returns:
- the inner contribution item
isEnabled
public boolean isEnabled()
- Description copied from interface: IContributionItem
- Returns whether this contribution item is enabled.
- Specified by:
- isEnabled in interface IContributionItem
- Returns:
- true if this item is enabled
isDirty
public boolean isDirty()
- Description copied from interface: IContributionItem
- Returns whether this contribution item is dirty. A dirty item will be
recreated when the action bar is updated.
- Specified by:
- isDirty in interface IContributionItem
- Returns:
- true if this item is dirty
isDynamic
public boolean isDynamic()
- Description copied from interface: IContributionItem
- Returns whether this contribution item is dynamic. A dynamic contribution
item contributes items conditionally, dependent on some internal state.
- Specified by:
- isDynamic in interface IContributionItem
- Returns:
- true if this item is dynamic, and
false for normal items
isGroupMarker
public boolean isGroupMarker()
- Description copied from interface: IContributionItem
- Returns whether this contribution item is a group marker.
This information is used when adding items to a group.
- Specified by:
- isGroupMarker in interface IContributionItem
- Returns:
- true if this item is a group marker, and
false for normal items
- See Also:
- GroupMarker,
IContributionManager.appendToGroup(java.lang.String, org.eclipse.jface.action.IAction),
IContributionManager.prependToGroup(java.lang.String, org.eclipse.jface.action.IAction)
isSeparator
public boolean isSeparator()
- Description copied from interface: IContributionItem
- Returns whether this contribution item is a separator.
This information is used to enable hiding of unnecessary separators.
- Specified by:
- isSeparator in interface IContributionItem
- Returns:
- true if this item is a separator, and
false for normal items
- See Also:
- Separator
isVisible
public boolean isVisible()
- Description copied from interface: IContributionItem
- Returns whether this contribution item is visibile within its manager.
- Specified by:
- isVisible in interface IContributionItem
- Returns:
- true if this item is visible, and
false otherwise
setParent
public void setParent(IContributionManager parent)
- Description copied from interface: IContributionItem
- Sets the parent manager of this item
- Specified by:
- setParent in interface IContributionItem
- Parameters:
- parent - the parent contribution manager
setVisible
public void setVisible(boolean visible)
- Description copied from interface: IContributionItem
- Sets whether this contribution item is visibile within its manager.
- Specified by:
- setVisible in interface IContributionItem
- Parameters:
- visible - true if this item should be visible, and
false otherwise
update
public void update()
- Description copied from interface: IContributionItem
- Updates any SWT controls cached by this contribution item with any
changes which have been made to this contribution item since the last update.
Called by contribution manager update methods.
- Specified by:
- update in interface IContributionItem
update
public void update(String id)
- Description copied from interface: IContributionItem
- Updates any SWT controls cached by this contribution item with changes
for the the given property.
- Specified by:
- update in interface IContributionItem
- Parameters:
- id - the id of the changed property
fill
public void fill(CoolBar parent,
int index)
- Description copied from interface: IContributionItem
- Fills the given cool bar with controls representing this contribution item.
Used by CoolBarManager.
- Specified by:
- fill in interface IContributionItem
- Parameters:
- parent - the parent cool bar
- index - the index where the controls are inserted,
or -1 to insert at the end
saveWidgetState
public void saveWidgetState()
- Description copied from interface: IContributionItem
- Saves any state information of the control(s) owned by this contribution item.
The contribution manager calls this method before disposing of the controls.
- Specified by:
- saveWidgetState in interface IContributionItem
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.