|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.vizzini.ui.game.AbstractEnvironmentUISwing
org.vizzini.ui.game.arcadegame.AbstractArcadeEnvUISwing
org.vizzini.example.pong.ui.EnvironmentUISwing
public class EnvironmentUISwing
Provides an environment user interface for Pong.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
EnvironmentUISwing()
|
Method Summary | |
---|---|
protected void |
init()
Initialize. |
protected void |
paintBall(Graphics g,
Ball ball,
Insets insets)
Paint the ball. |
void |
paintComponent(Graphics g)
Paint this component. |
protected void |
paintPaddle(Graphics g,
Paddle paddle,
Insets insets)
Paint the given paddle. |
protected void |
paintScores(Graphics g)
Paint the agent's scores to the screen. |
void |
setBallColor(Color color)
Set the ball color. |
void |
setPaddleColor(Color color)
Set the paddle color. |
void |
setScoreColor(Color color)
Set the score color. |
void |
setScoreFont(Font font)
Set the score font. |
void |
setScorePainted(boolean isScorePainted)
Set the score painted flag. |
Methods inherited from class org.vizzini.ui.game.arcadegame.AbstractArcadeEnvUISwing |
---|
getScaleX, getScaleY, stateChange |
Methods inherited from class org.vizzini.ui.game.AbstractEnvironmentUISwing |
---|
assignAgentListener, assignAgentListeners, configure, getEnvironment, getSupport, isAudioOn, removeAgentListener, removeAgentListeners, reset, scoreChange, setAudioOn, setEnvironment |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EnvironmentUISwing()
Method Detail |
---|
public void paintComponent(Graphics g)
paintComponent
in class AbstractArcadeEnvUISwing
public void setBallColor(Color color)
public void setPaddleColor(Color color)
public void setScoreColor(Color color)
public void setScoreFont(Font font)
public void setScorePainted(boolean isScorePainted)
protected void init()
init
in class AbstractEnvironmentUISwing
protected void paintBall(Graphics g, Ball ball, Insets insets)
protected void paintPaddle(Graphics g, Paddle paddle, Insets insets)
protected void paintScores(Graphics g)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |