public class PinballFrame
extends java.lang.Object
implements org.jdesktop.core.animation.rendering.JRendererTarget<java.awt.GraphicsConfiguration,java.awt.Graphics2D>
Modifier and Type | Field and Description |
---|---|
static int |
ANIMATION_SPEED |
static int |
TICKS_PER_TURN |
Constructor and Description |
---|
PinballFrame(java.lang.String[] args) |
Modifier and Type | Method and Description |
---|---|
int |
getHeight() |
static java.net.URL |
getResource(java.lang.String name) |
int |
getWidth() |
static void |
main(java.lang.String[] args) |
void |
render(java.awt.Graphics2D g2d,
int width,
int height)
Invoked once per rendering cycle to allow the implementation to paint onto
a graphics object that is either the screen or an off-screen image that
will subsequently painted onto the screen.
|
void |
renderSetup(java.awt.GraphicsConfiguration gc)
Invoked once when the component being rendered is made visible to allow the
implementation to perform any necessary setup.
|
void |
renderShutdown()
Invoked when rendering is shutdown to allow the implementation to perform
any necessary cleanup.
|
void |
renderUpdate()
Invoked once per rendering cycle to allow the implementation to update its
state.
|
void |
start() |
public static final int ANIMATION_SPEED
public static final int TICKS_PER_TURN
public static java.net.URL getResource(java.lang.String name)
public static void main(java.lang.String[] args)
public void renderSetup(java.awt.GraphicsConfiguration gc)
org.jdesktop.core.animation.rendering.JRendererTarget
The passed screen information allows the the creation of compatible images.
renderSetup
in interface org.jdesktop.core.animation.rendering.JRendererTarget<java.awt.GraphicsConfiguration,java.awt.Graphics2D>
gc
- describes the characteristics of the screen.public void renderUpdate()
org.jdesktop.core.animation.rendering.JRendererTarget
Invoked prior to JRendererTarget.render(Object, int, int)
.
renderUpdate
in interface org.jdesktop.core.animation.rendering.JRendererTarget<java.awt.GraphicsConfiguration,java.awt.Graphics2D>
public void start()
public void render(java.awt.Graphics2D g2d, int width, int height)
org.jdesktop.core.animation.rendering.JRendererTarget
Invoked after JRendererTarget.renderUpdate()
.
render
in interface org.jdesktop.core.animation.rendering.JRendererTarget<java.awt.GraphicsConfiguration,java.awt.Graphics2D>
g2d
- a graphics context to paint/draw with.width
- the width of the drawing area.height
- the height of the drawing area.public int getWidth()
public int getHeight()
public void renderShutdown()
org.jdesktop.core.animation.rendering.JRendererTarget
renderShutdown
in interface org.jdesktop.core.animation.rendering.JRendererTarget<java.awt.GraphicsConfiguration,java.awt.Graphics2D>