Interface AutoexposeHelper
- All Known Implementing Classes:
ViewportAutoexposeHelper
GraphicalEditPart
. Certain
DragTrackers
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 its step(Point)
method for as long as necessary. An active helper can remain active even as
the mouse is moving. The client may stop calling step(Point)
at
any time, even if false
was never returned, such as when the
user releases the mouse.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Used with EditPartViewers to find the AutoexposeHelper at a Point. -
Method Summary
-
Method Details
-
detect
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
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
-