### robocode

# Class MouseEvent

- `java.lang.Object`
- - `robocode.Event`
  - - `robocode.MouseEvent`

Implemented Interfaces:
  Comparable, Serializable

Known Direct Subclasses:
  MouseClickedEvent, MouseDraggedEvent, MouseEnteredEvent, MouseExitedEvent, MouseMovedEvent, MousePressedEvent, MouseReleasedEvent, MouseWheelMovedEvent

`public abstract class MouseEvent`
`extends Event`

Super class of all events that originates from the mouse.

Author:
  Pavel Savara (original)

Since:
  1.6.1

  ## Constructor Summary

  `MouseEvent(MouseEvent source)`
    Called by the game to create a new MouseEvent.

  ## Method Summary

  `MouseEvent`

  `getSourceEvent()`
    Do not call this method!

    This method is used by the game to determine the type of the source mouse event that occurred in the AWT.

  ### Methods inherited from class robocode.Event

  `compareTo`, `getPriority`, `getTime`

## Constructor Details

### MouseEvent

    public MouseEvent(MouseEvent source)

> Called by the game to create a new MouseEvent.
> Parameters:
>   `source` - the source mouse event originating from the AWT.

## Method Details

### getSourceEvent

    public MouseEvent getSourceEvent()

> Do not call this method!

> This method is used by the game to determine the type of the source mouse event that occurred in the AWT.
> Returns:
>   the source mouse event that originates from the AWT.