org.eesgmbh.gimv.client.presenter
Class MousePointerPresenter

java.lang.Object
  extended by org.eesgmbh.gimv.client.presenter.MousePointerPresenter

public class MousePointerPresenter
extends Object

The presenter is used to display some form of visual clue at the current mouse cursor position inside the Viewport, e.g. a vertical line in the samples.

The underlying view is a GenericWidgetView. The shipped implementation is GenericWidgetViewImpl.

After instantiating the presenter, it has to be configured how the view position will relate to the current mouse position. The view's position can either correspond to the mouse' x-coordinate, the y-coordinate or both.

Registers with the HandlerManager to receive the following events

Fires no events.


Constructor Summary
MousePointerPresenter(HandlerManager handlerManager, GenericWidgetView view)
          Instantiates the presenter.
 
Method Summary
 void configure(boolean enableHorizontalPositioning, boolean enableVerticalPositioning)
          Configures the view to either correspond to the mouse' x-coordinate, the y-coordinate or both.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MousePointerPresenter

public MousePointerPresenter(HandlerManager handlerManager,
                             GenericWidgetView view)
Instantiates the presenter.

Parameters:
handlerManager - A HandlerManager
view - A GenericWidgetView implementation
Method Detail

configure

public void configure(boolean enableHorizontalPositioning,
                      boolean enableVerticalPositioning)
Configures the view to either correspond to the mouse' x-coordinate, the y-coordinate or both.

If e.g. true, false is passed in, the view will move from right to left, but not up or down.

Parameters:
enableHorizontalPositioning - If the x-position of the mouse should be set in the view.
enableVerticalPositioning - If the y-position of the mouse should be set in the view.


Copyright © 2010 - EES GmbH