Package net.sf.gridarta.gui.map.event
Class MouseOpEvent<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- java.util.EventObject
-
- net.sf.gridarta.gui.map.event.MouseOpEvent<G,A,R>
-
- All Implemented Interfaces:
java.io.Serializable
public class MouseOpEvent<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.util.EventObjectA MouseOpEvent is an event triggered for a MouseOpListener. Note that MouseOpEvent objects may be reused.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MouseOpEvent(@NotNull MapView<G,A,R> mapView)Creates an empty instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetButton()Returns the mouse button that changed.intgetClickCount()intgetId()Returns the event type.@NotNull MapControl<G,A,R>getMapControl()@NotNull MapCursor<G,A,R>getMapCursor()java.awt.PointgetMapLocation()@NotNull MapView<G,A,R>getMapView()Returns the map view on which this event occurred.intgetModifiers()voidsetButton(int button)Sets the mouse button that changed.voidsetClickCount(int clickCount)voidsetId(int id)Sets the event type.voidsetMapLocation(java.awt.Point mapLocation)voidsetModifiers(int modifiers)
-
-
-
Method Detail
-
getMapView
@NotNull public @NotNull MapView<G,A,R> getMapView()
Returns the map view on which this event occurred.- Returns:
- the map view
-
getMapLocation
public java.awt.Point getMapLocation()
-
getModifiers
public int getModifiers()
-
getClickCount
public int getClickCount()
-
getButton
public int getButton()
Returns the mouse button that changed.- Returns:
- the changed mouse button
-
setButton
public void setButton(int button)
Sets the mouse button that changed.- Parameters:
button- the mouse button that changed
-
setMapLocation
public void setMapLocation(java.awt.Point mapLocation)
-
setModifiers
public void setModifiers(int modifiers)
-
setClickCount
public void setClickCount(int clickCount)
-
getMapControl
@NotNull public @NotNull MapControl<G,A,R> getMapControl()
-
getId
public int getId()
Returns the event type.- Returns:
- the event type
- See Also:
AWTEvent.getID()
-
setId
public void setId(int id)
Sets the event type.- Parameters:
id- the event type
-
-