yostinso
Class SuitImages

java.lang.Object
  |
  +--yostinso.SuitImages
All Implemented Interfaces:
java.lang.Runnable

public class SuitImages
extends java.lang.Object
implements java.lang.Runnable

Responsible for returning images for SuitPileViews.

Preloads images using Media tracker. Creation date: (12/3/2001 11:59:34 AM)


Field Summary
protected static SuitImages _suitImages
           
protected static java.util.Hashtable imageCache
           
static boolean ready
           
protected static java.lang.String suitImageDirectory
           
 java.lang.Thread thread
           
 java.awt.Component viewPeer
           
 
Constructor Summary
SuitImages(java.awt.Component viewPeer)
          SuitImages constructor comment.
 
Method Summary
protected  java.awt.Image cacheLookup(java.lang.String key)
          The key is the resource name (such as "10H" or "Back").
static SuitImages getInstance(java.awt.Component viewPeer)
           
 java.awt.Image getSuitImage(int suit)
           
 java.awt.Image getSuitImage(SuitPile suitpile)
           
static boolean isReady()
           
 void run()
          Retrieve all tracker objects..
static void setReady(boolean newReady)
           
 void start()
          Launch the thread to execute run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_suitImages

protected static SuitImages _suitImages

suitImageDirectory

protected static final java.lang.String suitImageDirectory
See Also:
Constant Field Values

imageCache

protected static java.util.Hashtable imageCache

thread

public java.lang.Thread thread

viewPeer

public java.awt.Component viewPeer

ready

public static boolean ready
Constructor Detail

SuitImages

public SuitImages(java.awt.Component viewPeer)
SuitImages constructor comment.

Method Detail

cacheLookup

protected java.awt.Image cacheLookup(java.lang.String key)
The key is the resource name (such as "10H" or "Back"). The initial thread will have already placed images into the cache. Creation date: (10/1/01 10:18:44 PM)

Parameters:
key - java.lang.String
Returns:
java.awt.Image

getInstance

public static SuitImages getInstance(java.awt.Component viewPeer)

getSuitImage

public java.awt.Image getSuitImage(int suit)

getSuitImage

public java.awt.Image getSuitImage(SuitPile suitpile)

isReady

public static boolean isReady()

run

public void run()
Retrieve all tracker objects.. Creation date: (10/2/01 5:17:01 PM)

Specified by:
run in interface java.lang.Runnable

setReady

public static void setReady(boolean newReady)

start

public void start()
Launch the thread to execute run. Creation date: (10/2/01 5:17:12 PM)