Top Description Fields Constructors Methods
org.lwjgl.test.input

public Class MouseTest

extends Object
Class Inheritance
Imports
org.lwjgl.input.Keyboard, .Mouse, org.lwjgl.opengl.Display, .DisplayMode, org.lwjgl.util.vector.Vector2f, .Vector3f


Mouse test
Author
Brian Matzon
Version
$Revision$ $Id$

Field Summary

Modifier and TypeField and Description
private boolean
closing

Whether the test is closing

private int
direction

Direction mouse has moved

public static final boolean
FULLSCREEN

Fullscreen or not

private int
lastButton

Last button pressed

private int
lastScrollDirection

Last direction we scrolled in

private Vector3f[]
private Vector3f[]
triangleColors

Triangle color

private Vector2f[]
triangles

Triangles to paint

private Vector2f
triangleSize

Triangle size

private static int
WINDOW_HEIGHT

Height of window

private static int
WINDOW_WIDTH

Width of window

Constructor Summary

AccessConstructor and Description
public
MouseTest()

Creates a new instance of MouseTest

Method Summary

Modifier and TypeMethod and Description
public void
executeTest()

Executes the actual test

private void
handleKeyboard()

Handles the keyboard

private void
handleMouse()

handles the mouse

private void
handleWindow()

Handles the window

private void
private void
initializeOpenGL()

Initializes OpenGL

private void
logic()

Does the "model logic"

public static void
main(String[]
the command line arguments
args
)

private void
pause(long
milliseconds to pause
time
)

Pauses the current thread for a specified time

private void
readBufferedMouse()

reads a mouse in buffered mode

private void
render()

Render our triangles

private void
runTest()

Runs the test

protected boolean
setDisplayMode()

Sets the display mode for fullscreen mode

private void
setupDisplay()

Setup display

private void
setupKeyboard()

Creates the keyboard

private void
setupMouse()

Creates the mouse

private void
updateState()

Updates our "model"

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

closingback to summary
private boolean closing

Whether the test is closing

directionback to summary
private int direction

Direction mouse has moved

FULLSCREENback to summary
public static final boolean FULLSCREEN

Fullscreen or not

lastButtonback to summary
private int lastButton

Last button pressed

lastScrollDirectionback to summary
private int lastScrollDirection

Last direction we scrolled in

quadColorsback to summary
private Vector3f[] quadColors
triangleColorsback to summary
private Vector3f[] triangleColors

Triangle color

trianglesback to summary
private Vector2f[] triangles

Triangles to paint

triangleSizeback to summary
private Vector2f triangleSize

Triangle size

WINDOW_HEIGHTback to summary
private static int WINDOW_HEIGHT

Height of window

WINDOW_WIDTHback to summary
private static int WINDOW_WIDTH

Width of window

Constructor Detail

MouseTestback to summary
public MouseTest()

Creates a new instance of MouseTest

Method Detail

executeTestback to summary
public void executeTest()

Executes the actual test

handleKeyboardback to summary
private void handleKeyboard()

Handles the keyboard

handleMouseback to summary
private void handleMouse()

handles the mouse

handleWindowback to summary
private void handleWindow()

Handles the window

initializeback to summary
private void initialize()
initializeOpenGLback to summary
private void initializeOpenGL()

Initializes OpenGL

logicback to summary
private void logic()

Does the "model logic"

mainback to summary
public static void main(String[] args)
Parameters
args:String[]

the command line arguments

pauseback to summary
private void pause(long time)

Pauses the current thread for a specified time

Parameters
time:long

milliseconds to pause

readBufferedMouseback to summary
private void readBufferedMouse()

reads a mouse in buffered mode

renderback to summary
private void render()

Render our triangles

runTestback to summary
private void runTest()

Runs the test

setDisplayModeback to summary
protected boolean setDisplayMode()

Sets the display mode for fullscreen mode

setupDisplayback to summary
private void setupDisplay()

Setup display

setupKeyboardback to summary
private void setupKeyboard()

Creates the keyboard

setupMouseback to summary
private void setupMouse()

Creates the mouse

updateStateback to summary
private void updateState()

Updates our "model"