Package jltk.testing
Class AppTester
- java.lang.Object
-
- jltk.App
-
- jltk.testing.AppTester
-
public class AppTester extends App
Beschreiben Sie hier die Klasse AppTester.- Version:
- (eine Versionsnummer oder ein Datum)
- Author:
- (Ihr Name)
-
-
Constructor Summary
Constructors Constructor Description AppTester()
Konstruktor für Objekte der Klasse AppTester
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
act()
This method is called, every time no other eventhandler is called (on idle).void
onFocusGained()
This method is called if the window of this app get the focus.void
onFocusLost()
This method is called if the window of this app lost the focus.void
onKeyPressed(String pKey)
Will be called, if a key on the keyboard was pressed.void
onKeyReleased(String pKey)
Will be called, if a key on the keyboard was released.void
onMouseClicked(int pX, int pY)
Will be called, if the mouse was clicked.void
onMouseDoubleClicked(int pX, int pY)
Will be called, if the mouse was double clicked.void
onMouseMoved(int pX, int pY)
Will be called, if the mouse was moved.-
Methods inherited from class jltk.App
delay, getWindow, onMouseDragged, onMousePressed, onMouseReleased
-
-
-
-
Field Detail
-
pen
Pen pen
-
-
Method Detail
-
onMouseMoved
public void onMouseMoved(int pX, int pY)
Description copied from class:App
Will be called, if the mouse was moved. You have to overwrite this method in your subclass- Overrides:
onMouseMoved
in classApp
- Parameters:
pX
- The x-coordinate of the mouse positionpY
- The y-coordinate of the mouse position
-
onMouseDoubleClicked
public void onMouseDoubleClicked(int pX, int pY)
Description copied from class:App
Will be called, if the mouse was double clicked. You have to overwrite this method in your subclass- Overrides:
onMouseDoubleClicked
in classApp
- Parameters:
pX
- The x-coordinate of the mouse positionpY
- The y-coordinate of the mouse position
-
onMouseClicked
public void onMouseClicked(int pX, int pY)
Description copied from class:App
Will be called, if the mouse was clicked. You have to overwrite this method in your subclass- Overrides:
onMouseClicked
in classApp
- Parameters:
pX
- The x-coordinate of the mouse positionpY
- The y-coordinate of the mouse position
-
onKeyPressed
public void onKeyPressed(String pKey)
Description copied from class:App
Will be called, if a key on the keyboard was pressed. The parameter pKey is the corresponding key name.The following key names are recognized:
- a-z
- 0-1
- up, down, left, right (cursor keys)
- enter, space, tab, escape, backspace
- F1-F12 (function keys)
You have to overwrite this method in your subclass.
- Overrides:
onKeyPressed
in classApp
- Parameters:
pKey
- The name of the pressed key
-
onKeyReleased
public void onKeyReleased(String pKey)
Description copied from class:App
Will be called, if a key on the keyboard was released. The parameter pKey is the corresponding key nameThe following key names are recognized:
- a-z
- 0-1
- up, down, left, right (cursor keys)
- enter, space, tab, escape, backspace
- F1-F12 (function keys)
You have to overwrite this method in your subclass.
- Overrides:
onKeyReleased
in classApp
- Parameters:
pKey
- The name of the pressed key
-
act
public void act()
Description copied from class:App
This method is called, every time no other eventhandler is called (on idle). You have to overwrite this method in your subclass.
-
onFocusGained
public void onFocusGained()
Description copied from class:App
This method is called if the window of this app get the focus. You have to overwrite this method in your subclass.- Overrides:
onFocusGained
in classApp
-
onFocusLost
public void onFocusLost()
Description copied from class:App
This method is called if the window of this app lost the focus. You have to overwrite this method in your subclass.- Overrides:
onFocusLost
in classApp
-
-