Led Ticker Component v2.2
www.ledticker.net

net.ledticker.elements.event
Class ElementEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byjava.awt.AWTEvent
          extended bynet.ledticker.elements.event.ElementEvent
All Implemented Interfaces:
java.io.Serializable

public class ElementEvent
extends java.awt.AWTEvent

An event generated by a TickerElement when the mouse is clicked within its area. The event is passed to every ElementListener object that registered to receive such events using the LedTicker's addElementListener method.

See Also:
LedTicker, ElementListener, Serialized Form

Field Summary
static int ELEMENT_EVENT
          The event id signaling a click occured inside an element
 
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASK
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ElementEvent(java.lang.Object source, TickerElement element, int tokenIndex, int modifiers)
          Creates an ElementEvent with the specified source, the element and the index of the token where it originated and the mask of the mouse buttons pressed when the event occured
 
Method Summary
 TickerElement getElement()
          Gets the TickerElement where the event originated
 int getModifiers()
          Gets the mask of the mouse buttons pressed when the event occured
 Token getToken()
          Gets the Token of the TickerElement where the event originated
 
Methods inherited from class java.awt.AWTEvent
consume, getID, isConsumed, paramString, setSource, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ELEMENT_EVENT

public static final int ELEMENT_EVENT
The event id signaling a click occured inside an element

See Also:
Constant Field Values
Constructor Detail

ElementEvent

public ElementEvent(java.lang.Object source,
                    TickerElement element,
                    int tokenIndex,
                    int modifiers)
Creates an ElementEvent with the specified source, the element and the index of the token where it originated and the mask of the mouse buttons pressed when the event occured

Parameters:
source - the LedTicker where the event originated
element - the TickerElement where the event originated
tokenIndex - the index if the Token where the event originated
modifiers - the mask of the mouse buttons pressed when the event occured
Method Detail

getElement

public TickerElement getElement()
Gets the TickerElement where the event originated

Returns:
the TickerElement where the event originated

getToken

public Token getToken()
Gets the Token of the TickerElement where the event originated

Returns:
the Token where the event originated

getModifiers

public int getModifiers()
Gets the mask of the mouse buttons pressed when the event occured

Returns:
the mask of the mouse buttons pressed when the event occured
See Also:
MouseEvent.BUTTON1_MASK, MouseEvent.BUTTON2_MASK, MouseEvent.BUTTON3_MASK

Led Ticker Component v2.2
www.ledticker.net