org.viewaframework.controller
Class AbstractMouseClickController

java.lang.Object
  extended by org.viewaframework.controller.AbstractViewController<MouseListener,MouseEvent>
      extended by org.viewaframework.controller.AbstractMouseClickController
All Implemented Interfaces:
InvocationHandler, ListenerProxy<MouseListener,MouseEvent>, ViewController<MouseListener,MouseEvent>, ViewContainerLocatorAware
Direct Known Subclasses:
MasterViewTableController

public abstract class AbstractMouseClickController
extends AbstractViewController<MouseListener,MouseEvent>

This class is a helper mouse controller. You can dispatch the actions establishing at startup the number of clicks the controller is going to listen at.

Author:
Mario Garcia

Constructor Summary
AbstractMouseClickController()
           
AbstractMouseClickController(int numberOfClicks)
           
 
Method Summary
 void executeHandler(ViewContainer view, MouseEvent eventObject)
          Its the callback method.
 int getNumberOfClicks()
           
 Class<MouseListener> getSupportedClass()
          This method tells the controller the source listener to be proxied.
 
Methods inherited from class org.viewaframework.controller.AbstractViewController
getTargetController, getViewManager, handleView, invoke, locate, locate, locateRootView, postHandlingView, preHandlingView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMouseClickController

public AbstractMouseClickController()

AbstractMouseClickController

public AbstractMouseClickController(int numberOfClicks)
Parameters:
numberOfClicks -
Method Detail

executeHandler

public void executeHandler(ViewContainer view,
                           MouseEvent eventObject)
Description copied from interface: ViewController
Its the callback method. It is called from a given component of the view in order to perform some action. It should call first to preHandlingView() for cleaning up some information data then it calls to handleView(..) and finally calls to postHandlingView(...).

Notice that depending on the listener proxied the EventObject should be casted in order to get the desired information from it.

Specified by:
executeHandler in interface ViewController<MouseListener,MouseEvent>
Overrides:
executeHandler in class AbstractViewController<MouseListener,MouseEvent>
Parameters:
view - The view where this listener belongs
eventObject - The event fired by the proxied listener.

getNumberOfClicks

public int getNumberOfClicks()
Returns:

getSupportedClass

public Class<MouseListener> getSupportedClass()
Description copied from interface: ViewController
This method tells the controller the source listener to be proxied.

Returns:
The type of the proxied listener


Copyright © 2010. All Rights Reserved.