|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--de.uni_paderborn.robots.gui.ArenaImages
This class organizes the images used by the arena. The class is realized as a singleton.
| Field Summary | |
private java.awt.Image |
arenaDesignerLogo
ArenaDesigner logo |
private static ArenaImages |
arenaImages
instance to the object of this class |
private java.awt.image.BufferedImage[][] |
cardsAloneBig
array with card images (big) |
private java.awt.image.BufferedImage[][] |
cardsAloneSmall
array with card images (small) |
private java.awt.image.BufferedImage[][] |
cardsBig
array with card images (big) |
private java.awt.image.BufferedImage[][] |
cardsSmall
array with card images (small) |
private java.awt.image.BufferedImage |
exitBig
image for exit (big) |
private java.awt.image.BufferedImage |
exitSmall
image for exit (small) |
private java.awt.image.BufferedImage |
floorBig
image for floor (big) |
private java.awt.image.BufferedImage |
floorSmall
image for floor (small) |
private java.awt.image.BufferedImage |
grayFloorBig
image for gray floor (wormhole mode) (big) |
private java.awt.image.BufferedImage |
grayFloorSmall
image for gray floor (wormhole mode) (small) |
private java.awt.Image |
robomaniaLogo
robomania logo |
private java.awt.image.BufferedImage |
robotFieldBig
image for robot field (big) |
private java.awt.image.BufferedImage |
robotFieldSmall
image for robot field (small) |
private java.awt.image.BufferedImage[][] |
robotsBig
array with robot images (big) |
private java.awt.image.BufferedImage[][] |
robotsSmall
array with robot images (small) |
static int |
TOOLBAR_CONTINUE_GAME
continue game icon |
static int |
TOOLBAR_DEBUG
debug icon |
static int |
TOOLBAR_DELETE_ROBOT
delete robot icon |
static int |
TOOLBAR_DISQUALIFY_ROBOT
disqualify robot icon |
static int |
TOOLBAR_EXIT_GAME
reset game icon |
static int |
TOOLBAR_LOAD_ARENA
load arena icon |
static int |
TOOLBAR_LOAD_ROBOT
load robot icon |
static int |
TOOLBAR_LOAD_ROBOTLIST
load robotlist icon |
static int |
TOOLBAR_PAUSE_GAME
pause game icon |
static int |
TOOLBAR_RESET_GAME
exit game icon |
static int |
TOOLBAR_SAVE_ROBOTLIST
save robotlist icon |
static int |
TOOLBAR_START_GAME
start game icon |
static int |
TOOLBAR_STEP
step icon |
static int |
TOOLBAR_STOP_GAME
abort game icon |
private java.awt.image.BufferedImage[] |
toolbarIcons
icons for toolbar |
private java.awt.image.BufferedImage[] |
wallBig
image for wall (big) |
private java.awt.image.BufferedImage[] |
wallSmall
image for wall (small) |
private java.awt.image.BufferedImage |
wellBig
image for well (big) |
private java.awt.image.BufferedImage |
wellSmall
image for well (small) |
private java.awt.image.BufferedImage |
wormholeBig
image for wormhole (big) |
private java.awt.image.BufferedImage |
wormholeSmall
image for wormhole (small) |
| Constructor Summary | |
private |
ArenaImages(java.awt.Component component)
Constructor, loads image data from disk and computes the other images. |
| Method Summary | |
java.awt.Image |
getAloneCardImage(int value,
int color,
boolean big)
Returns an image for a card without the floor. |
java.awt.Image |
getArenaDesignerLogo()
Returns arena Designer logo. |
static ArenaImages |
getArenaImages(java.awt.Component component)
Returns an instance of the class ArenaImages. |
java.awt.Image |
getCardImage(int value,
int color,
boolean big)
Returns an image for a card. |
java.awt.Image |
getExitImage(boolean big)
Returns an image for the exit. |
java.awt.Image |
getFloorImage(boolean big)
Returns an image for the floor. |
java.awt.Image |
getGrayFloorImage(boolean big)
Returns an image for gray floor (wormhole mode). |
java.awt.Image |
getImageForItem(Item item,
boolean zoom)
Returns an appropriate image for the given item. |
java.awt.Image |
getRobomaniaLogo()
Returns robomania logo. |
java.awt.Image |
getRobotFieldImage(boolean big)
Returns an image for a robot field. |
java.awt.Image |
getRobotImage(int number,
int direction,
boolean big)
Returns an image for a robot. |
java.awt.Image |
getToolbarIcon(int type)
Returns an icon for the toolbar. |
java.awt.Image |
getWallImage(int type,
boolean big)
Returns an image for a wall. |
java.awt.Image |
getWellImage(boolean big)
Returns an image for a well. |
java.awt.Image |
getWormholeImage(boolean big)
Returns an image for a wormhole. |
private void |
prepareCardImages(java.awt.Image cardGif,
java.awt.Image cardAloneGif,
java.awt.Image symbols16Gif,
java.awt.Image symbols8Gif)
Prepares the card images. |
private void |
prepareOtherImages(java.awt.Image floorGif,
java.awt.Image wallsGif,
java.awt.Image wellGif,
java.awt.Image wormholeGif,
java.awt.Image exitGif,
java.awt.Image robotFieldGif,
java.awt.Image grayFloorGif)
Prepares the other images. |
private void |
prepareRobotImages(java.awt.Image robots1Gif,
java.awt.Image robots2Gif)
Prepares the robot images. |
private void |
prepareToolbarIcons(java.awt.Image toolbarGif)
Prepares the toolbar icons. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private static ArenaImages arenaImages
public static final int TOOLBAR_DEBUG
public static final int TOOLBAR_DELETE_ROBOT
public static final int TOOLBAR_DISQUALIFY_ROBOT
public static final int TOOLBAR_CONTINUE_GAME
public static final int TOOLBAR_LOAD_ARENA
public static final int TOOLBAR_LOAD_ROBOTLIST
public static final int TOOLBAR_LOAD_ROBOT
public static final int TOOLBAR_PAUSE_GAME
public static final int TOOLBAR_SAVE_ROBOTLIST
public static final int TOOLBAR_START_GAME
public static final int TOOLBAR_STEP
public static final int TOOLBAR_STOP_GAME
public static final int TOOLBAR_RESET_GAME
public static final int TOOLBAR_EXIT_GAME
private java.awt.image.BufferedImage[][] robotsBig
private java.awt.image.BufferedImage[][] robotsSmall
private java.awt.image.BufferedImage[][] cardsBig
private java.awt.image.BufferedImage[][] cardsSmall
private java.awt.image.BufferedImage[][] cardsAloneBig
private java.awt.image.BufferedImage[][] cardsAloneSmall
private java.awt.image.BufferedImage wormholeBig
private java.awt.image.BufferedImage wormholeSmall
private java.awt.image.BufferedImage[] wallBig
private java.awt.image.BufferedImage[] wallSmall
private java.awt.image.BufferedImage wellBig
private java.awt.image.BufferedImage wellSmall
private java.awt.image.BufferedImage floorBig
private java.awt.image.BufferedImage floorSmall
private java.awt.image.BufferedImage exitBig
private java.awt.image.BufferedImage exitSmall
private java.awt.image.BufferedImage robotFieldBig
private java.awt.image.BufferedImage robotFieldSmall
private java.awt.image.BufferedImage grayFloorBig
private java.awt.image.BufferedImage grayFloorSmall
private java.awt.image.BufferedImage[] toolbarIcons
private java.awt.Image robomaniaLogo
private java.awt.Image arenaDesignerLogo
| Constructor Detail |
private ArenaImages(java.awt.Component component)
throws java.util.MissingResourceException
component - instance of class java.awt.Componentjava.util.MissingResourceException - if image data could not be loaded completely| Method Detail |
private void prepareRobotImages(java.awt.Image robots1Gif,
java.awt.Image robots2Gif)
robots1Gif - image containing eight robots.robots2Gif - image containing eight robots.
private void prepareCardImages(java.awt.Image cardGif,
java.awt.Image cardAloneGif,
java.awt.Image symbols16Gif,
java.awt.Image symbols8Gif)
cardGif - image containing a card.cardAloneGif - image containing a card without floor.symbols16Gif - image containing 4 symbols, 16 x 16.symbols8Gif - image containing 4 symbols, 8 x 8.
private void prepareOtherImages(java.awt.Image floorGif,
java.awt.Image wallsGif,
java.awt.Image wellGif,
java.awt.Image wormholeGif,
java.awt.Image exitGif,
java.awt.Image robotFieldGif,
java.awt.Image grayFloorGif)
floorGif - floor imagewallsGif - wall imagewellGif - well imagewormholeGif - wormhole imageexitGif - exit imagerobotFieldGif - robot field imagegrayFloorGif - gray floor imageprivate void prepareToolbarIcons(java.awt.Image toolbarGif)
toolbarGif - image containing the toolbar iconspublic static ArenaImages getArenaImages(java.awt.Component component)
component - instance of class java.awt.Component
public java.awt.Image getRobotImage(int number,
int direction,
boolean big)
number - number of wanted robotdirection - direction of wanted robotbig - big version of image wanted?
public java.awt.Image getCardImage(int value,
int color,
boolean big)
value - value of wanted cardcolor - color of wanted cardbig - version of image wanted?
public java.awt.Image getAloneCardImage(int value,
int color,
boolean big)
value - value of wanted cardcolor - color of wanted cardbig - version of image wanted?public java.awt.Image getWormholeImage(boolean big)
big - big version of image wanted?public java.awt.Image getWellImage(boolean big)
big - big version of image wanted?
public java.awt.Image getWallImage(int type,
boolean big)
type - wall type (0..15)big - big version of image wanted?public java.awt.Image getFloorImage(boolean big)
big - big version of image wanted?public java.awt.Image getExitImage(boolean big)
big - big version of image wanted?public java.awt.Image getRobotFieldImage(boolean big)
big - big version of image wanted?public java.awt.Image getGrayFloorImage(boolean big)
big - big version of image wanted?public java.awt.Image getToolbarIcon(int type)
type - type of icon specified by constantpublic java.awt.Image getRobomaniaLogo()
public java.awt.Image getArenaDesignerLogo()
public java.awt.Image getImageForItem(Item item,
boolean zoom)
item - an item
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||