com.jmex.bui.provider
Class DefaultResourceProvider

java.lang.Object
  extended by com.jmex.bui.provider.DefaultResourceProvider
All Implemented Interfaces:
ResourceProvider

public class DefaultResourceProvider
extends java.lang.Object
implements ResourceProvider


Field Summary
protected  java.util.HashMap<java.lang.String,java.lang.ref.WeakReference<BImage>> _cache
          A cache of BImage instances.
protected  java.util.HashMap<java.lang.String,java.lang.ref.WeakReference<BCursor>> _ccache
          A cache of BCursor instances.
 
Constructor Summary
DefaultResourceProvider()
           
 
Method Summary
 BTextFactory createTextFactory(java.lang.String family, java.lang.String style, int size)
          Creates a factory that will render text using the specified font.
 BCursor loadCursor(java.lang.String path)
          Loads the cursor with the specified name.
 BImage loadImage(java.lang.String path)
          Loads the image with the specified path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_cache

protected java.util.HashMap<java.lang.String,java.lang.ref.WeakReference<BImage>> _cache
A cache of BImage instances.


_ccache

protected java.util.HashMap<java.lang.String,java.lang.ref.WeakReference<BCursor>> _ccache
A cache of BCursor instances.

Constructor Detail

DefaultResourceProvider

public DefaultResourceProvider()
Method Detail

createTextFactory

public BTextFactory createTextFactory(java.lang.String family,
                                      java.lang.String style,
                                      int size)
Description copied from interface: ResourceProvider
Creates a factory that will render text using the specified font.

Specified by:
createTextFactory in interface ResourceProvider
Parameters:
family - String
style - String
size - int
Returns:
BTextFactory btf

loadImage

public BImage loadImage(java.lang.String path)
                 throws java.io.IOException
Description copied from interface: ResourceProvider
Loads the image with the specified path.

Specified by:
loadImage in interface ResourceProvider
Parameters:
path - String
Returns:
BImage
Throws:
java.io.IOException - io

loadCursor

public BCursor loadCursor(java.lang.String path)
                   throws java.io.IOException
Description copied from interface: ResourceProvider
Loads the cursor with the specified name.

Specified by:
loadCursor in interface ResourceProvider
Parameters:
path - String
Returns:
BCursor
Throws:
java.io.IOException - io


Copyright © 2011 Michael Bayne. All Rights Reserved.