cz.nipax.hippo.pexeso
Class PGTheme

java.lang.Object
  extended by cz.nipax.hippo.pexeso.PGTheme

public class PGTheme
extends java.lang.Object

This class should hold description of visualisation. It holds images of cards, how lagre they are, spacing,... TODO: Loadtable themes from a file would be a nice feature.


Field Summary
private  java.awt.Image[] m_image
           
 
Constructor Summary
PGTheme()
           
 
Method Summary
 int getH()
          Gets width of pisture.
 java.awt.Image getImage(int ID)
          Return Image associated with ID.
 int getSpace()
          Gets spacing between pictures when drawn in grid on the screen.
 int getW()
          Gets width of pisture.
 java.awt.Image loadImage(java.lang.String imageName)
          Helper method to load an image file from the CLASSPATH or current dir
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_image

private java.awt.Image[] m_image
Constructor Detail

PGTheme

public PGTheme()
Method Detail

getW

public int getW()
Gets width of pisture.

Returns:
width of pictures

getH

public int getH()
Gets width of pisture.

Returns:
height of pictures

getSpace

public int getSpace()
Gets spacing between pictures when drawn in grid on the screen.

Returns:
space between pictures

getImage

public java.awt.Image getImage(int ID)
Return Image associated with ID. Or null if no such an ID is valid. Negative ID is allways invalid.

Parameters:
ID - the ID of wanted image
Returns:
image of ID

loadImage

public java.awt.Image loadImage(java.lang.String imageName)
Helper method to load an image file from the CLASSPATH or current dir

Parameters:
imageName - the package and name of the file to load relative to the CLASSPATH or curent dir
Returns:
an Image instance with the specified image file