|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eesgmbh.gimv.client.presenter.ZoomBoxPresenter
public class ZoomBoxPresenter
This presenter enables to zoom the image by mouse dragging on the viewport, thus creating some kind of bounding box.
The image will be zoomed to the selection made with the
bounding box.
Currently only zooming in is supported.
The passed in view is the actual visual representation of the bounding box.
This presenter must be activated or deactivated with a StateChangeEvent. The reason behind
the mandatory activation is, that dragging can both mean zooming or moving the image. Only
this presenter or the DragImageControl can be active at the same time.
Registers with the HandlerManager to receive the following events
ViewportDragInProgressEvent (the presenter changes the position and dimension of the view accordingly)
ViewportDragFinishedEvent (will trigger a SetDomainBoundsEvent and a LoadImageDataEvent )
SetDomainBoundsEvent (mandatory, won't work otherwise)
StateChangeEvent (must be set to move for the control to do something)
SetMaxDomainBoundsEvent (optional, if not received, there will be no restriction)
Fires the following events
SetDomainBoundsEvent fired after recieving ViewportDragFinishedEvent with the new domain bounds
LoadImageDataEvent fired after recieving ViewportDragFinishedEvent
| Constructor Summary | |
|---|---|
ZoomBoxPresenter(HandlerManager handlerManager,
GenericWidgetView view)
Instantiates the presenter. |
|
| Method Summary | |
|---|---|
void |
setFireLoadImageDataEvent(boolean fireLoadImageDataEvent)
Defines, whether a LoadImageDataEvent is fired. |
void |
setMinimalDragOffsetInPixel(int minimalDragOffsetInPixel)
Specifies the minimal width and height of the zoom area. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ZoomBoxPresenter(HandlerManager handlerManager,
GenericWidgetView view)
handlerManager - A HandlerManagerview - An implementation of GenericWidgetView. This is the visual representation of the bounding box.| Method Detail |
|---|
public void setMinimalDragOffsetInPixel(int minimalDragOffsetInPixel)
SetDomainBoundsEvent or LoadImageDataEvent
will be fired. The presenter simply has no effect in this case.
This is to ensure, that the image does not get rendered with extremly small domain bounds, just because the user accidently clicked on the viewport.
The default value is 15 pixels.
minimalDragOffsetInPixel - public void setFireLoadImageDataEvent(boolean fireLoadImageDataEvent)
Defines, 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 | |||||||||