Interface AutoexposeHelper
-
- All Known Implementing Classes:
ViewportAutoexposeHelper
public interface AutoexposeHelper
A helper returned from aGraphicalEditPart
. CertainDragTrackers
tools and native drop listeners will make use of autoexpose helpers to reveal any potential drop areas that are currently not visible to the user. An example of this is scrolling a container to reveal unexposed area. Another example is a bunch of stacked containers in a "tab folder" arrangement, whever hovering over a tab should switch which container is on top.Autoexpose helpers are obtained from editparts that are target of whatever operation is being performed. If the target provides no helper, its parent chain is traversed looking for helpers. A helper will be obtained under conditions deemed appropriate by the caller, such as when the mouse has paused for some amount of time in the current location.
An autoexpose helper may be short-lived or long-running. A short-lived helper would be something like the example described above when a "page" is being flipped. A long-running example is auto-scrolling. A helper requests to remains active by returning
true
from itsstep(Point)
method for as long as necessary. An active helper can remain active even as the mouse is moving. The client may stop callingstep(Point)
at any time, even iffalse
was never returned, such as when the user releases the mouse.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AutoexposeHelper.Search
Used with EditPartViewers to find the AutoexposeHelper at a Point.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
detect(org.eclipse.draw2d.geometry.Point where)
Returnstrue
if the specified location is interesting to the helper.boolean
step(org.eclipse.draw2d.geometry.Point where)
Performs the autoexpose and returns a hint indicating that the helper would like to remain active.
-
-
-
Method Detail
-
detect
boolean detect(org.eclipse.draw2d.geometry.Point where)
Returnstrue
if the specified location is interesting to the helper. This method gets called as part of the search for an AutoexposeHelper. The helper should do something if it returnstrue
, or it may wait forstep(Point)
to be called later.- Parameters:
where
- the mouse's current location in the viewer- Returns:
true
if the location is interesting
-
step
boolean step(org.eclipse.draw2d.geometry.Point where)
Performs the autoexpose and returns a hint indicating that the helper would like to remain active. The client will continue to call step() for as long as it previously returnedtrue
, and the conditions are deemed appropriate to continue the autoexpose process.The client may stop calling this method at any time, even if the previous invocation returned
true
. The return value is a hint.- Parameters:
where
- the current location of the mouse in the viewer- Returns:
- a hint indicating whether this helper should continue to be invoked
-
-