org.newdawn.slick
Interface MouseListener

All Superinterfaces:
ControlledInputReciever
All Known Subinterfaces:
GameState, InputListener
All Known Implementing Classes:
AbstractComponent, AlphaMapTest, AnimationTest, AntiAliasTest, BasicComponent, BasicGame, BasicGameState, BigImageTest, BigSpriteSheetTest, CachedRenderTest, CanvasContainerTest, CanvasSizeTest, ClipTest, CopyAreaAlphaTest, CurveTest, DeferredLoadingTest, DistanceFieldTest, DoubleClickTest, DuplicateEmitterTest, FlashTest, FontPerformanceTest, FontTest, GeomAccuracyTest, GeomTest, GeomUtilTest, GeomUtilTileTest, GradientImageTest, GradientTest, GraphicsTest, GUITest, ImageBufferEndianTest, ImageBufferTest, ImageCornerTest, ImageGraphicsTest, ImageMemTest, ImageOutTest, ImageReadTest, ImageTest, InkscapeTest, InputAdapter, InputProviderTest, InputTest, IsoTiledTest, KeyRepeatTest, LameTest, LineRenderTest, MorphShapeTest, MorphSVGTest, MouseOverArea, MusicListenerTest, NavMeshTest, PackedSheetTest, ParticleTest, PedigreeTest, PolygonTest, PureFontTest, SavedStateTest, ScalableTest, ShapeTest, SlickCallableTest, SoundPositionTest, SoundTest, SoundURLTest, SpriteSheetFontTest, StateBasedGame, StateBasedTest, TestBox, TestState1, TestState2, TestState3, TextField, TexturePaintTest, TileMapTest, TransformTest, TransformTest2, TransitionTest, TransparentColorTest, TrueTypeFontPerformanceTest, UnicodeFontTest

public interface MouseListener
extends ControlledInputReciever

Description of classes that respond to mouse related input events

Author:
kevin

Method Summary
 void mouseClicked(int button, int x, int y, int clickCount)
          Notification that a mouse button was clicked.
 void mouseDragged(int oldx, int oldy, int newx, int newy)
          Notification that mouse cursor was dragged
 void mouseMoved(int oldx, int oldy, int newx, int newy)
          Notification that mouse cursor was moved
 void mousePressed(int button, int x, int y)
          Notification that a mouse button was pressed
 void mouseReleased(int button, int x, int y)
          Notification that a mouse button was released
 void mouseWheelMoved(int change)
          Notification that the mouse wheel position was updated
 
Methods inherited from interface org.newdawn.slick.ControlledInputReciever
inputEnded, inputStarted, isAcceptingInput, setInput
 

Method Detail

mouseWheelMoved

void mouseWheelMoved(int change)
Notification that the mouse wheel position was updated

Parameters:
change - The amount of the wheel has moved

mouseClicked

void mouseClicked(int button,
                  int x,
                  int y,
                  int clickCount)
Notification that a mouse button was clicked. Due to double click handling the single click may be delayed slightly. For absolute notification of single clicks use mousePressed(). To be absolute this method should only be used when considering double clicks

Parameters:
button - The index of the button (starting at 0)
x - The x position of the mouse when the button was pressed
y - The y position of the mouse when the button was pressed
clickCount - The number of times the button was clicked

mousePressed

void mousePressed(int button,
                  int x,
                  int y)
Notification that a mouse button was pressed

Parameters:
button - The index of the button (starting at 0)
x - The x position of the mouse when the button was pressed
y - The y position of the mouse when the button was pressed

mouseReleased

void mouseReleased(int button,
                   int x,
                   int y)
Notification that a mouse button was released

Parameters:
button - The index of the button (starting at 0)
x - The x position of the mouse when the button was released
y - The y position of the mouse when the button was released

mouseMoved

void mouseMoved(int oldx,
                int oldy,
                int newx,
                int newy)
Notification that mouse cursor was moved

Parameters:
oldx - The old x position of the mouse
oldy - The old y position of the mouse
newx - The new x position of the mouse
newy - The new y position of the mouse

mouseDragged

void mouseDragged(int oldx,
                  int oldy,
                  int newx,
                  int newy)
Notification that mouse cursor was dragged

Parameters:
oldx - The old x position of the mouse
oldy - The old y position of the mouse
newx - The new x position of the mouse
newy - The new y position of the mouse


Copyright © 2006 New Dawn Software. All Rights Reserved.