EventListener for all components/layouts

Regarding to
this ticket
, vaadin 6.2 comes with clickable layouts/components. I have a few questions on this:

  1. I tried to make Tabs right-clickable, but it doesn’t seem to be implemented for them. Why?

  2. What is the difference between the following methods which are available for “event” parameter in the listener’s implementation?:


   // Class Event
   /**
     * Gets the Component where the event occurred.
     * 
     * @return the Source of the event.
     */
    public Component getComponent()

    // Class EventObject
    /**
     * The object on which the Event initially occurred.
     *
     * @return   The object on which the Event initially occurred.
     */
    public Object getSource()
  1. Finally: Having everything clickable is cool, but usually a right-click does open a context menu rather than anything else. Is planned/possible to have a context menu on right click? This is what I initially expected with “clickable”.

Hi,

…a bit of a delayed answer… and now it’s Monday morning, before my morning coffee - but I’ll try :wink:

I guess the tab content could be made clickable, but the actual tabs don’t implement that functionality. Yet, that is. There are probably many places that could use some clickability, but so far it’s only implemented for layouts and some fields (for blur/focus).

getSource() comes from java.util.EventObject, while getComponent() comes from Vaadin’s Component.Event - in effect, getComponent() is just more convenient. Some component events add even more specific methods that do the same thing, e.g Button.ClickEvent.getButton(). Once again, the javadoc leaves much to be desired…

For Table and Tree the context menus are implemented using Actions. It would certainly be useful to implement those on more components - you could get a context menu almost anywhere if for example layouts implemented that…

Best Regards,
Marc