java.lang.Object | +--UserInterface
This class implements a simple graphical user interface with a text entry area, a text output area and an optional image.
Constructor Summary | |
UserInterface(GameEngine gameEngine)
Construct a UserInterface. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Actionlistener interface for entry textfield. |
void |
enable(boolean on)
Enable or disable input in the input field. |
void |
print(java.lang.String text)
Print out some text into the text area. |
void |
println(java.lang.String text)
Print out some text into the text area, followed by a line break. |
void |
showImage(java.lang.String imageName)
Show an image file in the interface. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public UserInterface(GameEngine gameEngine)
gameEngine
- The GameEngine object implementing the game logic.Method Detail |
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void enable(boolean on)
public void print(java.lang.String text)
public void println(java.lang.String text)
public void showImage(java.lang.String imageName)