org.wings.event
Class SMouseEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.wings.event.SMouseEvent
All Implemented Interfaces:
Serializable

public class SMouseEvent
extends EventObject

A 'virtual' mouse event. To convert the inner SPoint to a sensefule meaning you should use the according converions methods like STree.rowAtPoint(org.wings.SPoint) or STable.columnAtPoint(org.wings.SPoint) .

Author:
hengels, Benjamin Schmid
See Also:
Serialized Form

Field Summary
protected  SComponent component
           
protected  boolean consumed
           
protected  int id
           
protected  SPoint point
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
SMouseEvent(SComponent component, int id, SPoint point)
          Constructs a new mouse event
 
Method Summary
 void consume()
          Call of this method inhibits the further dispatching of this mouse event.
 SComponent getComponent()
          Gets the mouse event source component
 int getId()
           
 SPoint getPoint()
          The object denoting where inside the source component a mouse click occured.
 boolean isConsumed()
          Denotes if this event was already consumed.
 void setComponent(SComponent component)
          Sets the mouse event source component.
 void setPoint(SPoint point)
          The object denoting where inside the source component a mouse click occured.
 String 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

id

protected int id

consumed

protected boolean consumed

component

protected SComponent component

point

protected SPoint point
Constructor Detail

SMouseEvent

public SMouseEvent(SComponent component,
                   int id,
                   SPoint point)
Constructs a new mouse event

Parameters:
component - source component
id - id
point - An SPoint. Intepretation is component dependent.
Method Detail

getId

public int getId()

isConsumed

public boolean isConsumed()
Denotes if this event was already consumed.

Returns:
true if the mouse event was consumed an no furter event processing should occur.

consume

public void consume()
Call of this method inhibits the further dispatching of this mouse event. I.e. if you want to avoid the default actions for a mouse click (like call of normal table cell editor.


getComponent

public SComponent getComponent()
Gets the mouse event source component

Returns:
The mouse event source component

setComponent

public void setComponent(SComponent component)
Sets the mouse event source component.

Parameters:
component - The mouse event source component

getPoint

public SPoint getPoint()
The object denoting where inside the source component a mouse click occured.

Returns:
An virtual mouse click point. Intepretation is component dependent.

setPoint

public void setPoint(SPoint point)
The object denoting where inside the source component a mouse click occured.

Parameters:
point - An virtual mouse click point. Intepretation is component dependent.

toString

public String toString()
Overrides:
toString in class EventObject


wingS Swings ;-)