com.itmill.toolkit.event
Class ItemClickEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.itmill.toolkit.ui.Component.Event
          extended by com.itmill.toolkit.event.ItemClickEvent
All Implemented Interfaces:
Serializable

public class ItemClickEvent
extends Component.Event

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. ClickEvents are rather terminal dependent events. Correct values in event details cannot be guaranteed. EXPERIMENTAL FEATURE, user input is welcome

Since:
5.3 TODO extract generic super class/interfaces if we implement some other click events.
See Also:
Serialized Form

Nested Class Summary
static interface ItemClickEvent.ItemClickListener
           
static interface ItemClickEvent.ItemClickSource
          Components implementing
 
Field Summary
static int BUTTON_LEFT
           
static int BUTTON_MIDDLE
           
static int BUTTON_RIGHT
           
static Method ITEM_CLICK_METHOD
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ItemClickEvent(Component source, Item item, Object itemId, Object propertyId, MouseEventDetails details)
           
 
Method Summary
 int getButton()
           
 int getClientX()
           
 int getClientY()
           
 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.
 boolean isAltKey()
           
 boolean isCtrlKey()
           
 boolean isDoubleClick()
           
 boolean isMetaKey()
           
 boolean isShiftKey()
           
 
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

BUTTON_LEFT

public static final int BUTTON_LEFT
See Also:
Constant Field Values

BUTTON_MIDDLE

public static final int BUTTON_MIDDLE
See Also:
Constant Field Values

BUTTON_RIGHT

public static final int BUTTON_RIGHT
See Also:
Constant Field Values

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.

getButton

public int getButton()

getClientX

public int getClientX()

getClientY

public int getClientY()

isDoubleClick

public boolean isDoubleClick()

isAltKey

public boolean isAltKey()

isCtrlKey

public boolean isCtrlKey()

isMetaKey

public boolean isMetaKey()

isShiftKey

public boolean isShiftKey()


Copyright © 2000-2009 IT Mill Ltd. All Rights Reserved.