|
Eclipse GEF 3.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gef.editparts.ViewportHelper
org.eclipse.gef.editparts.ViewportMouseWheelHelper
ViewportMouseWheelHelper is the default MouseWheelHelper that should be used to scroll edit parts.
Field Summary | |
protected GraphicalEditPart |
owner
|
Constructor Summary | |
ViewportMouseWheelHelper(GraphicalEditPart part)
Constructor |
|
ViewportMouseWheelHelper(GraphicalEditPart part,
int lineHeight,
int pageHeight)
Constructor |
Method Summary | |
protected Viewport |
findViewport(GraphicalEditPart part)
|
void |
handleMouseWheelScrolled(Event event)
Finds the viewport of the given EditPart and scrolls it as requested. |
void |
setLineHeight(int height)
Sets the height (in pixels) that will be scrolled when line scrolling is requested. |
void |
setPageHeight(int height)
Sets the height (in pixels) that will be scrolled when page scrolling is requested. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected GraphicalEditPart owner
Constructor Detail |
public ViewportMouseWheelHelper(GraphicalEditPart part)
part
- the EditPArt that has to be scrolledpublic ViewportMouseWheelHelper(GraphicalEditPart part, int lineHeight, int pageHeight)
part
- the EditPart that has to be scrolledlineHeight
- the new line heightpageHeight
- the new page heightsetLineHeight(int)
,
setPageHeight(int)
Method Detail |
public void handleMouseWheelScrolled(Event event)
handleMouseWheelScrolled
in interface MouseWheelHelper
event
- The SWT event that was generated as a result of the mouse-wheel scrollingMouseWheelHelper.handleMouseWheelScrolled(org.eclipse.swt.widgets.Event)
public void setLineHeight(int height)
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.
height
- the new line heightpublic void setPageHeight(int height)
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.
height
- the new page heightprotected Viewport findViewport(GraphicalEditPart part)
|
Eclipse GEF 3.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |