jskat.gui
Class JSkatGraphicRepository

java.lang.Object
  extended by java.util.Observable
      extended by jskat.gui.JSkatGraphicRepository
All Implemented Interfaces:
java.util.Observer

public class JSkatGraphicRepository
extends java.util.Observable
implements java.util.Observer

The JSkatGraphicRepository that holds all images used in JSkat

Author:
Jan Schäfer

Field Summary
static int ABOUT_ICON
          Code for the About icon
static int BIG_ICON
          Code for big icons
static int EXIT_ICON
          Code for the Exit icon
static int FIRST_ICON
          Code for the First Trick icon
static int HELP_ICON
          Code for the Help icon
static int LAST_ICON
          Code for the Last Trick icon
static int NEW_ICON
          Code for the New Skat Round icon
static int NEXT_ICON
          Code for the Next Trick icon
static int OPEN_ICON
          Code for the Open Skat Round icon
static int PREFERENCES_ICON
          Code for the Preferences icon
static int PREVIOUS_ICON
          Code for the Previous Trick icon
static int SAVE_ICON
          Code for the Save Skat Round Icon
static int SMALL_ICON
          Code for small icons
 
Constructor Summary
JSkatGraphicRepository(JSkatOptions jskatOptions)
          Creates a new instance of JSkatGraphicRepository
 
Method Summary
 java.awt.Image getCardImage(int suit, int value)
          Gets the card image
 java.awt.Image getIconImage(int iconNo, int bigSmall)
          Gets an icon image
 java.awt.Image getJSkatLogoImage()
          Gets the image for the JSkat logo
 java.awt.Image getSkatTableImage()
          Gets the image for the skat table
 void loadCards(java.lang.String cardType)
          Load all card images
 void loadIcons()
          Loads all icons
 void update(java.util.Observable observ, java.lang.Object obj)
           
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ABOUT_ICON

public static final int ABOUT_ICON
Code for the About icon

See Also:
Constant Field Values

EXIT_ICON

public static final int EXIT_ICON
Code for the Exit icon

See Also:
Constant Field Values

HELP_ICON

public static final int HELP_ICON
Code for the Help icon

See Also:
Constant Field Values

NEW_ICON

public static final int NEW_ICON
Code for the New Skat Round icon

See Also:
Constant Field Values

OPEN_ICON

public static final int OPEN_ICON
Code for the Open Skat Round icon

See Also:
Constant Field Values

SAVE_ICON

public static final int SAVE_ICON
Code for the Save Skat Round Icon

See Also:
Constant Field Values

FIRST_ICON

public static final int FIRST_ICON
Code for the First Trick icon

See Also:
Constant Field Values

PREVIOUS_ICON

public static final int PREVIOUS_ICON
Code for the Previous Trick icon

See Also:
Constant Field Values

NEXT_ICON

public static final int NEXT_ICON
Code for the Next Trick icon

See Also:
Constant Field Values

LAST_ICON

public static final int LAST_ICON
Code for the Last Trick icon

See Also:
Constant Field Values

PREFERENCES_ICON

public static final int PREFERENCES_ICON
Code for the Preferences icon

See Also:
Constant Field Values

BIG_ICON

public static final int BIG_ICON
Code for big icons

See Also:
Constant Field Values

SMALL_ICON

public static final int SMALL_ICON
Code for small icons

See Also:
Constant Field Values
Constructor Detail

JSkatGraphicRepository

public JSkatGraphicRepository(JSkatOptions jskatOptions)
Creates a new instance of JSkatGraphicRepository

Method Detail

loadIcons

public void loadIcons()
Loads all icons


loadCards

public void loadCards(java.lang.String cardType)
Load all card images

Parameters:
cardType - The directory name for the card set to be loaded

getIconImage

public java.awt.Image getIconImage(int iconNo,
                                   int bigSmall)
Gets an icon image

Parameters:
iconNo - The icon code
bigSmall - code for big or small icons
Returns:
The icon image

getCardImage

public java.awt.Image getCardImage(int suit,
                                   int value)
Gets the card image

Parameters:
suit - The suit of the card
value - The value of the card
Returns:
The card image

getSkatTableImage

public java.awt.Image getSkatTableImage()
Gets the image for the skat table

Returns:
The image for the skat table

getJSkatLogoImage

public java.awt.Image getJSkatLogoImage()
Gets the image for the JSkat logo

Returns:
The image for the JSkat logo

update

public void update(java.util.Observable observ,
                   java.lang.Object obj)
Specified by:
update in interface java.util.Observer