Class ViewportMouseWheelHelper

  • All Implemented Interfaces:
    MouseWheelHelper

    public class ViewportMouseWheelHelper
    extends java.lang.Object
    implements MouseWheelHelper
    ViewportMouseWheelHelper is the default MouseWheelHelper that should be used to scroll edit parts.
    Since:
    3.1
    • Constructor Detail

      • ViewportMouseWheelHelper

        public ViewportMouseWheelHelper​(GraphicalEditPart part)
        Constructor
        Parameters:
        part - the EditPArt that has to be scrolled
      • ViewportMouseWheelHelper

        public ViewportMouseWheelHelper​(GraphicalEditPart part,
                                        int lineHeight,
                                        int pageHeight)
        Constructor
        Parameters:
        part - the EditPart that has to be scrolled
        lineHeight - the new line height
        pageHeight - the new page height
        See Also:
        setLineHeight(int), setPageHeight(int)
    • Method Detail

      • setLineHeight

        public void setLineHeight​(int height)
        Sets the height (in pixels) that will be scrolled when line scrolling is 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
      • setPageHeight

        public void setPageHeight​(int height)
        Sets the height (in pixels) that will be scrolled when page scrolling is 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

        protected org.eclipse.draw2d.Viewport findViewport​(GraphicalEditPart part)