com.cc.framework.ui.painter
Interface ResourceMap

All Known Implementing Classes:
ResourceMapImp

public interface ResourceMap

Painter Resource Map

Since:
1.1
Version:
$Revision: 1.15 $
Author:
Harald Schulz

Method Summary
 Color getColor(java.lang.String resourceId)
          Retrieves a color for the specified Id
 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.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
 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
 

Method Detail

getResourceDir

public java.lang.String getResourceDir()
Returns the base directory used for resource by the PainterFactory

Returns:
The web resource directory

getResource

public java.lang.Object getResource(int size,
                                    java.lang.String resourceId)
Retrieves an image for the specified Id

Parameters:
size - The size
resourceId - The resource id
Returns:
The Resource or null

setResourceDir

public void setResourceDir(java.lang.String resourceDir)
Sets the directory used for resource by the PainterFactory

Parameters:
resourceDir - The resource directory

getImage

public ImageModel getImage(java.lang.String resourceId)
Retrieves an image for the specified Id

Parameters:
resourceId - Image Id
Returns:
The Image or null

getImage

public ImageModel getImage(int size,
                           java.lang.String resourceId)
Retrieves an image for the specified Id

Parameters:
size - Image Size
resourceId - Image Id
Returns:
The Image or null

getColor

public Color getColor(java.lang.String resourceId)
Retrieves a color for the specified Id

Parameters:
resourceId - Color Id
Returns:
The Color or null

getString

public java.lang.String getString(java.lang.String resourceId,
                                  boolean returnNull)
Retrieves an String for the specified Id

Parameters:
resourceId - String Id
returnNull - controls whether to return null or a not present indicator
Returns:
The String or null

getString

public java.lang.String getString(java.lang.String resourceId,
                                  java.lang.Object[] params,
                                  boolean returnNull)
Retrieves an String for the specified Id

Parameters:
resourceId - String Id
params - Array with parameters for markup substitution
returnNull - controls whether to return null or a not present indicator
Returns:
The String or null

setColorPalette

public void setColorPalette(ColorPalette palette)
Sets the color palette. You can register individual colors with registerColor which will hide the entries of the color palette.

Parameters:
palette - Color Palette

registerImage

public void registerImage(java.lang.String resourceId,
                          ImageModel image)
Registers one local image

Parameters:
resourceId - The Image Resource Id
image - The Image

registerImage

public void registerImage(int size,
                          java.lang.String resourceId,
                          ImageModel image)
Registers one locale image

Parameters:
size - The image size
resourceId - The Image Resource Id
image - The Image

registerColor

public void registerColor(java.lang.String resourceId,
                          Color color)
Registers one locale color

Parameters:
resourceId - The Image Resource Id
color - the Color

registerString

public void registerString(java.lang.String resourceId,
                           java.lang.String text)
Registers a string resource

Parameters:
resourceId - The string resource Id
text - The text associated with the resource Id

register

public void register(java.lang.String resourceId,
                     java.lang.Object resource)
Registers a locale resource

Parameters:
resourceId - The Resource Id
resource - The Resource

getId

public java.lang.String getId(int size,
                              java.lang.String resourceId)
Creates a resource identifier for an image

Parameters:
size - The image size
resourceId - The Image Resource Id
Returns:
Resource Identifier


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.