Package org.openpatch.scratch.internal
Interface StageHooks
public interface StageHooks
The four things the render loop needs to do to a stage.
A stage hands one of these to Applet when it is created. That way the
methods behind them can stay private on the stage itself, instead of having to
be public only so that a class in another package can reach them.
Nothing outside the library should implement or call this.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(processing.core.PGraphics buffer) Draws the stage.voidkeyEvent(processing.event.KeyEvent e) Passes a key press or release to the stage.voidmouseEvent(processing.event.MouseEvent e) Passes a mouse event to the stage.voidpre()Runs once before the stage is drawn.
-
Method Details
-
pre
void pre()Runs once before the stage is drawn. -
draw
void draw(processing.core.PGraphics buffer) Draws the stage.- Parameters:
buffer- where to draw
-
keyEvent
void keyEvent(processing.event.KeyEvent e) Passes a key press or release to the stage.- Parameters:
e- the key event
-
mouseEvent
void mouseEvent(processing.event.MouseEvent e) Passes a mouse event to the stage.- Parameters:
e- the mouse event
-