Package org.eclipse.gef.editparts
Class ViewportExposeHelper
- java.lang.Object
-
- org.eclipse.gef.editparts.ViewportExposeHelper
-
- All Implemented Interfaces:
ExposeHelper
public class ViewportExposeHelper extends java.lang.Object implements ExposeHelper
An implementation ofExposeHelper
for use with editparts using aViewport
.- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description protected GraphicalEditPart
owner
-
Constructor Summary
Constructors Constructor Description ViewportExposeHelper(GraphicalEditPart owner)
Constructs a new ViewportExposeHelper on the specified GraphicalEditPart.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
exposeDescendant(EditPart part)
Exposes the descendant EditPart by smoothly scrolling theViewport
.protected org.eclipse.draw2d.Viewport
findViewport(GraphicalEditPart part)
int
getMaximumFrameCount()
Returns the maximumFrameCount.int
getMinimumFrameCount()
Returns the minimumFrameCount.void
setMargin(org.eclipse.draw2d.geometry.Insets margin)
Sets the amount of margin to be left around the descendant being exposed.void
setMaximumFrameCount(int maximumFrameCount)
Sets the maximumFrameCount.void
setMinimumFrameCount(int minimumFrameCount)
Sets the minimumFrameCount.
-
-
-
Field Detail
-
owner
protected GraphicalEditPart owner
-
-
Constructor Detail
-
ViewportExposeHelper
public ViewportExposeHelper(GraphicalEditPart owner)
Constructs a new ViewportExposeHelper on the specified GraphicalEditPart. The GraphicalEditPart must have aViewport
somewhere between its contentsPane and its figure inclusively.- Parameters:
owner
- the GraphicalEditPart that owns the Viewport
-
-
Method Detail
-
exposeDescendant
public void exposeDescendant(EditPart part)
Exposes the descendant EditPart by smoothly scrolling theViewport
. The smoothness is determined by the minimum and maximum frame count, and the overall amount being scrolled.- Specified by:
exposeDescendant
in interfaceExposeHelper
- Parameters:
part
- the descendant to expose- See Also:
ExposeHelper.exposeDescendant(EditPart)
-
getMaximumFrameCount
public int getMaximumFrameCount()
Returns the maximumFrameCount.- Returns:
- int
-
getMinimumFrameCount
public int getMinimumFrameCount()
Returns the minimumFrameCount.- Returns:
- int
-
setMargin
public void setMargin(org.eclipse.draw2d.geometry.Insets margin)
Sets the amount of margin to be left around the descendant being exposed. There is no margin by default.- Parameters:
margin
- the margin in pixels
-
setMaximumFrameCount
public void setMaximumFrameCount(int maximumFrameCount)
Sets the maximumFrameCount.- Parameters:
maximumFrameCount
- The maximumFrameCount to set
-
setMinimumFrameCount
public void setMinimumFrameCount(int minimumFrameCount)
Sets the minimumFrameCount.- Parameters:
minimumFrameCount
- The minimumFrameCount to set
-
findViewport
protected org.eclipse.draw2d.Viewport findViewport(GraphicalEditPart part)
-
-