Package org.eclipse.gef.editparts
Class ViewportMouseWheelHelper
java.lang.Object
org.eclipse.gef.editparts.ViewportMouseWheelHelper
- All Implemented Interfaces:
- MouseWheelHelper
ViewportMouseWheelHelper is the default MouseWheelHelper that should be used
 to scroll edit parts.
- Since:
- 3.1
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionConstructorViewportMouseWheelHelper(GraphicalEditPart part, int lineHeight, int pageHeight) Constructor
- 
Method SummaryModifier and TypeMethodDescriptionprotected ViewportvoidhandleMouseWheelScrolled(Event event) Finds the viewport of the given EditPart and scrolls it as requested.voidsetLineHeight(int height) Sets the height (in pixels) that will be scrolled whenline scrollingis requested.voidsetPageHeight(int height) Sets the height (in pixels) that will be scrolled whenpage scrollingis requested.
- 
Field Details- 
owner
 
- 
- 
Constructor Details- 
ViewportMouseWheelHelperConstructor- Parameters:
- part- the EditPArt that has to be scrolled
 
- 
ViewportMouseWheelHelperConstructor- Parameters:
- part- the EditPart that has to be scrolled
- lineHeight- the new line height
- pageHeight- the new page height
- See Also:
 
 
- 
- 
Method Details- 
handleMouseWheelScrolledFinds the viewport of the given EditPart and scrolls it as requested. If it can't be scrolled then leaves doit to be true so that the given EditPart's ancestors might have a chance to scroll.- Specified by:
- handleMouseWheelScrolledin interface- MouseWheelHelper
- Parameters:
- event- The SWT event that was generated as a result of the mouse-wheel scrolling
- See Also:
 
- 
setLineHeightpublic void setLineHeight(int height) Sets the height (in pixels) that will be scrolled whenline scrollingis requested. If the line height is set to 0 or less, or not set at all, a default height will be used.- Parameters:
- height- the new line height
 
- 
setPageHeightpublic void setPageHeight(int height) Sets the height (in pixels) that will be scrolled whenpage scrollingis requested. A page height that is less than the line height will not be respected. If the page height is set to -1, or one is not set at all, the default height will be used. The default height is calculated based on the given EditPart's figure's viewport's size. It will not be less than the line height.- Parameters:
- height- the new page height
 
- 
findViewport
 
-