org.apache.tapestry.event
Class BrowserEvent

java.lang.Object
  extended by org.apache.tapestry.event.BrowserEvent

public class BrowserEvent
extends Object

Represents a client side generated browser event.

Author:
jkuhnert

Field Summary
static String CHAR_CODE
           
static String KEYS
           
static String LAYER_X
           
static String LAYER_Y
           
static String NAME
           
static String PAGE_X
           
static String PAGE_Y
           
static String TARGET
           
static String TARGET_ATTR_ID
           
static String TYPE
           
 
Constructor Summary
BrowserEvent(IRequestCycle cycle)
          Creates a new browser event that will extract its own parameters.
BrowserEvent(String name, EventTarget target)
          Creates a new browser event with the specified name/target properties.
 
Method Summary
 String getCharCode()
           
 String[] getKeys()
           
 String getLayerX()
           
 String getLayerY()
           
 String getName()
          The name of the event that was generated.
 String getPageX()
           
 String getPageY()
           
 EventTarget getTarget()
          Returns the target of the client side event.
 String getType()
           
static boolean hasBrowserEvent(IRequestCycle cycle)
          Utility method to check if the current request contains a browser event.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values

TYPE

public static final String TYPE
See Also:
Constant Field Values

KEYS

public static final String KEYS
See Also:
Constant Field Values

CHAR_CODE

public static final String CHAR_CODE
See Also:
Constant Field Values

PAGE_X

public static final String PAGE_X
See Also:
Constant Field Values

PAGE_Y

public static final String PAGE_Y
See Also:
Constant Field Values

LAYER_X

public static final String LAYER_X
See Also:
Constant Field Values

LAYER_Y

public static final String LAYER_Y
See Also:
Constant Field Values

TARGET

public static final String TARGET
See Also:
Constant Field Values

TARGET_ATTR_ID

public static final String TARGET_ATTR_ID
See Also:
Constant Field Values
Constructor Detail

BrowserEvent

public BrowserEvent(IRequestCycle cycle)
Creates a new browser event that will extract its own parameters.

Parameters:
cycle - The request cycle to extract parameters from.

BrowserEvent

public BrowserEvent(String name,
                    EventTarget target)
Creates a new browser event with the specified name/target properties.

Parameters:
name - The name of the event, ie "onClick", "onBlur", etc..
target - The target of the client side event.
Method Detail

getName

public String getName()
The name of the event that was generated.

Examples would be onClick,onSelect,onLoad,etc....

Returns:
The event name.

getTarget

public EventTarget getTarget()
Returns the target of the client side event.

Returns:
The target representation of the client side object event originally bound for.

getCharCode

public String getCharCode()
Returns:
the charCode

getKeys

public String[] getKeys()
Returns:
the keys

getLayerX

public String getLayerX()
Returns:
the layerX

getLayerY

public String getLayerY()
Returns:
the layerY

getPageX

public String getPageX()
Returns:
the pageX

getPageY

public String getPageY()
Returns:
the pageY

getType

public String getType()
Returns:
the type

hasBrowserEvent

public static boolean hasBrowserEvent(IRequestCycle cycle)
Utility method to check if the current request contains a browser event.

Parameters:
cycle - The associated request.
Returns:
True if the request contains browser event data.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2007 Apache Software Foundation. All Rights Reserved.