com.jmex.bui
Class BStyleSheet.DefaultResourceProvider

java.lang.Object
  extended by com.jmex.bui.BStyleSheet.DefaultResourceProvider
All Implemented Interfaces:
BStyleSheet.ResourceProvider
Enclosing class:
BStyleSheet

public static class BStyleSheet.DefaultResourceProvider
extends Object
implements BStyleSheet.ResourceProvider

A default implementation of the stylesheet resource provider.


Field Summary
protected  HashMap<String,WeakReference<BImage>> _cache
          A cache of BImage instances.
protected  HashMap<String,WeakReference<BCursor>> _ccache
          A cache of BCursor instances.
 
Constructor Summary
BStyleSheet.DefaultResourceProvider()
           
 
Method Summary
 BTextFactory createTextFactory(String family, String style, int size)
          Creates a factory that will render text using the specified font.
 BCursor loadCursor(String path)
          Loads the cursor with the specified name.
 BImage loadImage(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 HashMap<String,WeakReference<BImage>> _cache
A cache of BImage instances.


_ccache

protected HashMap<String,WeakReference<BCursor>> _ccache
A cache of BCursor instances.

Constructor Detail

BStyleSheet.DefaultResourceProvider

public BStyleSheet.DefaultResourceProvider()
Method Detail

createTextFactory

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

Specified by:
createTextFactory in interface BStyleSheet.ResourceProvider

loadImage

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

Specified by:
loadImage in interface BStyleSheet.ResourceProvider
Throws:
IOException

loadCursor

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

Specified by:
loadCursor in interface BStyleSheet.ResourceProvider
Throws:
IOException


Copyright © 2008 Michael Bayne. All Rights Reserved.