Package org.eclipse.gef.ui.actions
Class ZoomComboContributionItem
java.lang.Object
org.eclipse.jface.action.ContributionItem
org.eclipse.gef.ui.actions.ZoomComboContributionItem
- All Implemented Interfaces:
- org.eclipse.draw2d.zoom.ZoomListener,- IContributionItem
public class ZoomComboContributionItem
extends ContributionItem
implements org.eclipse.draw2d.zoom.ZoomListener
A ControlContribution that uses a 
Combo as
 its control- 
Constructor SummaryConstructorsConstructorDescriptionZoomComboContributionItem(IPartService partService) Constructor for ComboToolItem.ZoomComboContributionItem(IPartService partService, String initString) Constructor for ComboToolItem.ZoomComboContributionItem(IPartService partService, String[] initStrings) Constructor for ComboToolItem.
- 
Method SummaryModifier and TypeMethodDescriptionprotected intcomputeWidth(Control control) Computes the width required by controlprotected ControlcreateControl(Composite parent) Creates and returns the control for this contribution item under the given parent composite.voiddispose()final voidThe control item implementation of thisIContributionItemmethod calls thecreateControlframework method.final voidThe control item implementation of thisIContributionItemmethod throws an exception since controls cannot be added to menus.voidThe control item implementation of thisIContributionItemmethod calls thecreateControlframework method to create a control under the given parent, and then creates a new tool item to hold it.Returns the zoomManager.voidSets the ZoomManagervoidzoomChanged(double zoom) Methods inherited from class org.eclipse.jface.action.ContributionItemfill, getId, getParent, isDirty, isDynamic, isEnabled, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setParent, setVisible, toString, update, update
- 
Constructor Details- 
ZoomComboContributionItemConstructor for ComboToolItem.- Parameters:
- partService- used to add a PartListener
 
- 
ZoomComboContributionItemConstructor for ComboToolItem.- Parameters:
- partService- used to add a PartListener
- initString- the initial string displayed in the combo
 
- 
ZoomComboContributionItemConstructor for ComboToolItem.- Parameters:
- partService- used to add a PartListener
- initStrings- the initial string displayed in the combo
 
 
- 
- 
Method Details- 
computeWidthComputes the width required by control- Parameters:
- control- The control to compute width
- Returns:
- int The width required
 
- 
createControlCreates and returns the control for this contribution item under the given parent composite.- Parameters:
- parent- the parent composite
- Returns:
- the new control
 
- 
disposepublic void dispose()- Specified by:
- disposein interface- IContributionItem
- Overrides:
- disposein class- ContributionItem
- See Also:
 
- 
fillThe control item implementation of thisIContributionItemmethod calls thecreateControlframework method. Subclasses must implementcreateControlrather than overriding this method.- Specified by:
- fillin interface- IContributionItem
- Overrides:
- fillin class- ContributionItem
- Parameters:
- parent- The parent of the control to fill
 
- 
fillThe control item implementation of thisIContributionItemmethod throws an exception since controls cannot be added to menus.- Specified by:
- fillin interface- IContributionItem
- Overrides:
- fillin class- ContributionItem
- Parameters:
- parent- The menu
- index- Menu index
 
- 
fillThe control item implementation of thisIContributionItemmethod calls thecreateControlframework method to create a control under the given parent, and then creates a new tool item to hold it. Subclasses must implementcreateControlrather than overriding this method.- Specified by:
- fillin interface- IContributionItem
- Overrides:
- fillin class- ContributionItem
- Parameters:
- parent- The ToolBar to add the new control to
- index- Index
 
- 
getZoomManagerReturns the zoomManager.- Returns:
- ZoomManager
 
- 
setZoomManagerSets the ZoomManager- Parameters:
- zm- The ZoomManager
 
- 
zoomChangedpublic void zoomChanged(double zoom) - Specified by:
- zoomChangedin interface- org.eclipse.draw2d.zoom.ZoomListener
- See Also:
 
 
-