dd.ui
Class GameSupport
java.lang.Object
dd.ui.GameSupport
- Direct Known Subclasses:
- Main
- public class GameSupport
- extends java.lang.Object
Support for Game code. This class provides generic resources for
managing a game, such as retrieving icons. Subclasses should implement
the game logic, which this class does not provide.
If a game is already running and the automatic network broadcast
mechanism can locate the game, running this as the main class will
connect to that existing game. If no game is found, a server will be
started on this machine, and the game will connect to this (local) server.
Subsequent clients will connect to the server.
- Author:
- Eric Scharff
Method Summary |
protected static void |
cacheImages(java.lang.String[] preload)
|
static void |
centerWindow(javax.swing.JFrame f)
|
static javax.swing.ImageIcon |
createImageIcon(java.lang.String image)
|
static javax.swing.ImageIcon |
emptyImageIcon(int w,
int h)
|
static javax.swing.ImageIcon |
getImage(java.lang.String imageName)
|
static void |
sizeCols(javax.swing.JTable t)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GameSupport
public GameSupport()
cacheImages
protected static void cacheImages(java.lang.String[] preload)
getImage
public static javax.swing.ImageIcon getImage(java.lang.String imageName)
emptyImageIcon
public static javax.swing.ImageIcon emptyImageIcon(int w,
int h)
createImageIcon
public static javax.swing.ImageIcon createImageIcon(java.lang.String image)
centerWindow
public static void centerWindow(javax.swing.JFrame f)
sizeCols
public static void sizeCols(javax.swing.JTable t)