rp1.rossum.event
Class RsMouseClickEvent

java.lang.Object
  extended by rp1.rossum.event.RsEvent
      extended by rp1.rossum.event.RsMouseClickEvent
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class RsMouseClickEvent
extends RsEvent

An eventgenerated by the simulator when the client clicks the mouse within the simulator GUI. RsMouseClickEvents occur when one of the mouse buttons is pressed while the mouse pointer is within the simulation graphics area. The mouse-click event is intended mainly for diagnostic and testing purposes. For example, it can be used as a way of specifying a goal for a robot simulation performing navigation. The Rs simulation is not intended as a graphics tool and supports very limited mouse interactions. Indeed, when the Rs simulation is run with the "no gui" option, the mouse-click event is not available. Note also that the coordinates are doubles giving the cartesian coordinates of the click point in meters, not integral pixel points. Note also that unlike the java.awt counterpart, the fields are publicly available and no "get" methods are provided.

See Also:
Serialized Form

Field Summary
 int button
           
 int clickCount
           
 double x
           
 double y
           
 
Fields inherited from class rp1.rossum.event.RsEvent
eventID, EVT_ARRAY_SIZE, EVT_CONTACT_SENSOR, EVT_ENCODER_STATUS, EVT_HEARTBEAT, EVT_MAX_CODE, EVT_MOTION_HALTED, EVT_MOTION_STARTED, EVT_MOUSE_CLICK, EVT_PAINT_SENSOR, EVT_PLACEMENT, EVT_PLAN, EVT_POSITION, EVT_RANGE_SENSOR, EVT_TARGET_SELECTION, EVT_TARGET_SENSOR, EVT_TIMEOUT, simTime
 
Constructor Summary
RsMouseClickEvent(double simTime, int button, int clickCount, double x, double y)
           
 
Method Summary
 
Methods inherited from class rp1.rossum.event.RsEvent
consume, getEventID, getIndex, getSimTime, isConsumed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

button

public final int button

clickCount

public final int clickCount

x

public final double x

y

public final double y
Constructor Detail

RsMouseClickEvent

public RsMouseClickEvent(double simTime,
                         int button,
                         int clickCount,
                         double x,
                         double y)