com.vaadin.event
Class ItemClickEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.vaadin.ui.Component.Event
          extended by com.vaadin.event.MouseEvents.ClickEvent
              extended by com.vaadin.event.ItemClickEvent
All Implemented Interfaces:
Serializable

public class ItemClickEvent
extends MouseEvents.ClickEvent
implements Serializable

Click event fired by a Component implementing Container interface. ItemClickEvents happens on an Item rendered somehow on terminal. Event may also contain a specific Property on which the click event happened.

Since:
5.3
See Also:
Serialized Form

Nested Class Summary
static interface ItemClickEvent.ItemClickListener
           
static interface ItemClickEvent.ItemClickNotifier
          The interface for adding and removing ItemClickEvent listeners.
 
Field Summary
static Method ITEM_CLICK_METHOD
           
 
Fields inherited from class com.vaadin.event.MouseEvents.ClickEvent
BUTTON_LEFT, BUTTON_MIDDLE, BUTTON_RIGHT
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ItemClickEvent(Component source, Item item, Object itemId, Object propertyId, MouseEventDetails details)
           
 
Method Summary
 Item getItem()
          Gets the item on which the click event occurred.
 Object getItemId()
          Gets a possible identifier in source for clicked Item
 Object getPropertyId()
          Returns property on which click event occurred.
 
Methods inherited from class com.vaadin.event.MouseEvents.ClickEvent
getButton, getButtonName, getClientX, getClientY, getRelativeX, getRelativeY, isAltKey, isCtrlKey, isDoubleClick, isMetaKey, isShiftKey
 
Methods inherited from class com.vaadin.ui.Component.Event
getComponent
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ITEM_CLICK_METHOD

public static final Method ITEM_CLICK_METHOD
Constructor Detail

ItemClickEvent

public ItemClickEvent(Component source,
                      Item item,
                      Object itemId,
                      Object propertyId,
                      MouseEventDetails details)
Method Detail

getItem

public Item getItem()
Gets the item on which the click event occurred.

Returns:
item which was clicked

getItemId

public Object getItemId()
Gets a possible identifier in source for clicked Item

Returns:

getPropertyId

public Object getPropertyId()
Returns property on which click event occurred. Returns null if source cannot be resolved at property leve. For example if clicked a cell in table, the "column id" is returned.

Returns:
a property id of clicked property or null if click didn't occur on any distinct property.


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.