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 voidact()This method is called, every time no other eventhandler is called (on idle).voidonFocusGained()This method is called if the window of this app get the focus.voidonFocusLost()This method is called if the window of this app lost the focus.voidonKeyPressed(String pKey)Will be called, if a key on the keyboard was pressed.voidonKeyReleased(String pKey)Will be called, if a key on the keyboard was released.voidonMouseClicked(int pX, int pY)Will be called, if the mouse was clicked.voidonMouseDoubleClicked(int pX, int pY)Will be called, if the mouse was double clicked.voidonMouseMoved(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:AppWill be called, if the mouse was moved. You have to overwrite this method in your subclass- Overrides:
onMouseMovedin 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:AppWill be called, if the mouse was double clicked. You have to overwrite this method in your subclass- Overrides:
onMouseDoubleClickedin 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:AppWill be called, if the mouse was clicked. You have to overwrite this method in your subclass- Overrides:
onMouseClickedin 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:AppWill 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:
onKeyPressedin classApp- Parameters:
pKey- The name of the pressed key
-
onKeyReleased
public void onKeyReleased(String pKey)
Description copied from class:AppWill 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:
onKeyReleasedin classApp- Parameters:
pKey- The name of the pressed key
-
act
public void act()
Description copied from class:AppThis 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:AppThis method is called if the window of this app get the focus. You have to overwrite this method in your subclass.- Overrides:
onFocusGainedin classApp
-
onFocusLost
public void onFocusLost()
Description copied from class:AppThis method is called if the window of this app lost the focus. You have to overwrite this method in your subclass.- Overrides:
onFocusLostin classApp
-
-