|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.ui.painter.ResourceMapImp
ResourceMap
Field Summary | |
private ColorPalette |
colorpalette
Color Palette |
private static int |
IGNORE_SIZE
|
private boolean |
initialized
Flag for lazy initialization |
private java.lang.String |
resourceDir
Resource directory |
private java.util.Hashtable |
resources
The Resource repository |
private static long |
serialVersionUID
Serial Version UID |
Constructor Summary | |
ResourceMapImp()
Constructor |
Method Summary | |
protected abstract void |
doRegisterColors()
Registers all local colors |
protected abstract void |
doRegisterImages()
Registers all local images |
protected abstract void |
doRegisterStrings()
Registers all local strings |
Color |
getColor(java.lang.String resourceId)
Retrieves a color for the specified Id |
ColorPalette |
getColorPalette()
Returns the color palette |
java.lang.String |
getId(int size,
java.lang.String resourceId)
Creates a resource identifier for an image |
ImageModel |
getImage(int size,
java.lang.String resourceId)
Retrieves an image for the specified Id |
ImageModel |
getImage(java.lang.String resourceId)
Retrieves an image for the specified Id |
java.lang.Object |
getResource(int size,
java.lang.String resourceId)
Retrieves an image for the specified Id |
java.lang.String |
getResourceDir()
Returns the base directory used for resource by the PainterFactory |
java.util.Set |
getResourceKeys()
Returns a set with all the Resource Keys of this Resource Map |
java.lang.String |
getString(java.lang.String resourceId,
boolean returnNull)
Retrieves an String for the specified Id |
java.lang.String |
getString(java.lang.String resourceId,
java.lang.Object[] params,
boolean returnNull)
Retrieves an String for the specified Id |
protected void |
init()
For initialization |
void |
register(java.lang.String resourceId,
java.lang.Object resource)
Registers a locale resource |
void |
registerColor(java.lang.String resourceId,
Color color)
Registers one locale color |
void |
registerImage(int size,
java.lang.String resourceId,
ImageModel image)
Registers one locale image |
void |
registerImage(java.lang.String resourceId,
ImageModel image)
Registers one local image |
void |
registerString(java.lang.String resourceId,
java.lang.String text)
Registers a string resource |
void |
setColorPalette(ColorPalette palette)
Sets the color palette. |
void |
setResourceDir(java.lang.String resourceDir)
Sets the directory used for resource by the PainterFactory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final long serialVersionUID
private static final int IGNORE_SIZE
private java.lang.String resourceDir
private java.util.Hashtable resources
private ColorPalette colorpalette
private boolean initialized
Constructor Detail |
public ResourceMapImp()
Method Detail |
protected void init()
protected abstract void doRegisterImages()
protected abstract void doRegisterColors()
protected abstract void doRegisterStrings()
public void registerImage(java.lang.String resourceId, ImageModel image)
ResourceMap
registerImage
in interface ResourceMap
resourceId
- The Image Resource Idimage
- The ImageResourceMap.registerImage(java.lang.String, com.cc.framework.ui.model.ImageModel)
public java.lang.String getId(int size, java.lang.String resourceId)
ResourceMap
getId
in interface ResourceMap
size
- The image sizeresourceId
- The Image Resource Id
ResourceMap.getId(int, java.lang.String)
public void registerImage(int size, java.lang.String resourceId, ImageModel image)
ResourceMap
registerImage
in interface ResourceMap
size
- The image sizeresourceId
- The Image Resource Idimage
- The ImageResourceMap.registerImage(int, java.lang.String, com.cc.framework.ui.model.ImageModel)
public void registerColor(java.lang.String resourceId, Color color)
ResourceMap
registerColor
in interface ResourceMap
resourceId
- The Image Resource Idcolor
- the ColorResourceMap.registerColor(java.lang.String, com.cc.framework.ui.Color)
public void registerString(java.lang.String resourceId, java.lang.String text)
ResourceMap
registerString
in interface ResourceMap
resourceId
- The string resource Idtext
- The text associated with the resource IdResourceMap.registerString(java.lang.String, java.lang.String)
public void setColorPalette(ColorPalette palette)
ResourceMap
setColorPalette
in interface ResourceMap
palette
- Color PaletteResourceMap.setColorPalette(com.cc.framework.ui.painter.ColorPalette)
public void register(java.lang.String resourceId, java.lang.Object resource)
ResourceMap
register
in interface ResourceMap
resourceId
- The Resource Idresource
- The ResourceResourceMap.register(java.lang.String, java.lang.Object)
public final ImageModel getImage(java.lang.String resourceId)
ResourceMap
getImage
in interface ResourceMap
resourceId
- Image Id
null
ResourceMap.getImage(java.lang.String)
public ImageModel getImage(int size, java.lang.String resourceId)
ResourceMap
getImage
in interface ResourceMap
size
- Image SizeresourceId
- Image Id
null
ResourceMap.getImage(int, java.lang.String)
public Color getColor(java.lang.String resourceId)
ResourceMap
getColor
in interface ResourceMap
resourceId
- Color Id
null
ResourceMap.getColor(java.lang.String)
public java.lang.Object getResource(int size, java.lang.String resourceId)
ResourceMap
getResource
in interface ResourceMap
size
- The sizeresourceId
- The resource id
null
ResourceMap.getResource(int, java.lang.String)
public final java.lang.String getString(java.lang.String resourceId, boolean returnNull)
ResourceMap
getString
in interface ResourceMap
resourceId
- String IdreturnNull
- controls whether to return null or a not present indicator
null
ResourceMap.getString(java.lang.String, boolean)
public java.lang.String getString(java.lang.String resourceId, java.lang.Object[] params, boolean returnNull)
ResourceMap
getString
in interface ResourceMap
resourceId
- String Idparams
- Array with parameters for markup substitutionreturnNull
- controls whether to return null or a not present indicator
null
ResourceMap.getString(java.lang.String, java.lang.Object[], boolean)
public java.lang.String getResourceDir()
ResourceMap
getResourceDir
in interface ResourceMap
ResourceMap.getResourceDir()
public void setResourceDir(java.lang.String resourceDir)
ResourceMap
setResourceDir
in interface ResourceMap
resourceDir
- The resource directoryResourceMap.setResourceDir(java.lang.String)
public java.util.Set getResourceKeys()
public ColorPalette getColorPalette()
null
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |