|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eesgmbh.gimv.client.presenter.BoundsShiftPresenter
public class BoundsShiftPresenter
This presenter changes the bounds of the currently displayed image. The
passed in View must have a method to register a ClickHandler.
The underlying widget could just be an Image that shows an arrow
and will shift the image towards a configured direction.
The only BoundsShiftPresenter.View implementation shipped with the framework is BoundsShiftViewImpl.
After instantiating the presenter, the direction and amount of shift is
specified with either configureAbsoluteShift(double, double) or
configureProportionalShift(double, double). The presenter won't do anything if the shift
is not configured.
By default the image gets immediately repositioned on the client side, prior to requesting a new image
to be rendered (see setFireChangeImagePixelBoundsEvent(boolean)).
Registers with the HandlerManager to receive the following events
SetDomainBoundsEvent (mandatory, won't work otherwise)
SetDataAreaPixelBoundsEvent (optional, client side repositioning won't be accurate
if the domain bounds of the image do not cover the complete image)
SetViewportPixelBoundsEvent (optional, either SetDataAreaPixelBoundsEvent or
SetViewportPixelBoundsEvent must be recieced in order for client side repositioning to work)
SetMaxDomainBoundsEvent (optional, if not received, there will be no restriction)
Fires the following events
| Nested Class Summary | |
|---|---|
static interface |
BoundsShiftPresenter.View
The View interface for BoundsShiftPresenter |
| Constructor Summary | |
|---|---|
BoundsShiftPresenter(HandlerManager handlerManager,
BoundsShiftPresenter.View view)
Instantiates the presenter. |
|
| Method Summary | |
|---|---|
void |
configureAbsoluteShift(double horizontalShift,
double verticalShift)
Configures the presenter to shift the domain bounds by an absolute value. |
void |
configureProportionalShift(double horizontalShift,
double verticalShift)
Configures the presenter to shift the domain bounds by an absolute value. |
void |
setFireChangeImagePixelBoundsEvent(boolean fireChangeImagePixelBoundsEvent)
Specify whether the image gets immediately repositioned prior to loading the newly rendered one. |
void |
setFireLoadImageDataEvent(boolean fireLoadImageDataEvent)
Specify whether a LoadImageDataEvent is fired. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BoundsShiftPresenter(HandlerManager handlerManager,
BoundsShiftPresenter.View view)
handlerManager - A HandlerManagerview - A BoundsShiftPresenter.View implementation| Method Detail |
|---|
public void configureAbsoluteShift(double horizontalShift,
double verticalShift)
For example horizontalShift=100, verticalShift=0 will add 100 to both left and right and kepp top and bottom unchanged, thus shifting the domain bounds to the right.
horizontalShift - An absolute value in the units of the domain bounds (e.g. time or coordinates). Positive, negative or 0.verticalShift - An absolute value in the units of the domain bounds (e.g. time or coordinates). Positive, negative or 0.
public void configureProportionalShift(double horizontalShift,
double verticalShift)
For example horizontalShift=0, verticalShift=-0.2 will keep left and right unchanged and subtract 20% of the total domain bounds from top and bottom, thus shifting the domain bounds to the top.
horizontalShift - A proportional value (0 to 1 based). Positive, negative or 0.verticalShift - A proportional value (0 to 1 based). Positive, negative or 0.public void setFireChangeImagePixelBoundsEvent(boolean fireChangeImagePixelBoundsEvent)
Specify whether the image gets immediately repositioned prior to loading the newly rendered one.
Default is true.
fireChangeImagePixelBoundsEvent - public void setFireLoadImageDataEvent(boolean fireLoadImageDataEvent)
Specify whether a LoadImageDataEvent is fired.
Default is true.
fireLoadImageDataEvent - fire it, or not
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||