javax.rad.genui
Class UIImage

java.lang.Object
  extended by javax.rad.genui.UIResource<UI>
      extended by javax.rad.genui.UIFactoryResource<IImage>
          extended by javax.rad.genui.UIImage
All Implemented Interfaces:
IImage, IResource

public class UIImage
extends UIFactoryResource<IImage>
implements IImage

Platform and technology independent image definition. It is designed for use with AWT, Swing, SWT, JSP, JSF,... .

See Also:
Image

Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.rad.ui.IImage
IImage.ImageType
 
Field Summary
static String ABOUT_LARGE
          the name of the large(default: 24x24 px) about image (used for toolbar buttons or icons).
static String ABOUT_SMALL
          the name of the small(default: 16x16 px) about image (used for menuitems or buttons).
static String ADD_LARGE
          the name of the large(default: 24x24 px) add image (used for toolbar buttons or icons).
static String ADD_SMALL
          the name of the small(default: 16x16 px) add image (used for menuitems or buttons).
static String CANCEL_LARGE
          the name of the large(default: 24x24 px) canel image (used for toolbar buttons or icons).
static String CANCEL_SMALL
          the name of the small(default: 16x16 px) cancel image (used for menuitems or buttons).
static String CHANGE_PASSWORD_LARGE
          the name of the large(default: 24x24 px) change password image (used for toolbar buttons or icons).
static String CHANGE_PASSWORD_SMALL
          the name of the small(default: 16x16 px) change password image (used for menuitems or buttons).
static String CHECK_LARGE
          the name of the large(default: 24x24 px) check image (used for toolbar buttons or icons).
static String CHECK_NO_LARGE
          the name of the large(default: 24x24 px) no/selected check image (used for toolbar buttons or icons).
static String CHECK_NO_SMALL
          the name of the small(default: 16x16 px) no/selected check image (used for menuitems or buttons).
static String CHECK_SMALL
          the name of the small(default: 16x16 px) check image (used for menuitems or buttons).
static String CHECK_YES_LARGE
          the name of the large(default: 24x24 px) yes/selected check image (used for toolbar buttons or icons).
static String CHECK_YES_SMALL
          the name of the small(default: 16x16 px) yes/selected check image (used for menuitems or buttons).
static String COPY_LARGE
          the name of the large(default: 24x24 px) copy image (used for toolbar buttons or icons).
static String COPY_SMALL
          the name of the small(default: 16x16 px) copy image (used for menuitems or buttons).
static String CUT_LARGE
          the name of the large(default: 24x24 px) cut image (used for toolbar buttons or icons).
static String CUT_SMALL
          the name of the small(default: 16x16 px) cut image (used for menuitems or buttons).
static String EDIT_LARGE
          the name of the large(default: 24x24 px) edit image (used for toolbar buttons or icons).
static String EDIT_SMALL
          the name of the small(default: 16x16 px) edit image (used for menuitems or buttons).
static String EXIT_LARGE
          the name of the large(default: 24x24 px) exit image (used for toolbar buttons or icons).
static String EXIT_SMALL
          the name of the small(default: 16x16 px) exit image (used for menuitems or buttons).
static String EXPORT_LARGE
          the name of the large(default: 24x24 px) export image (used for toolbar buttons or icons).
static String EXPORT_SMALL
          the name of the small(default: 16x16 px) export image (used for menuitems or buttons).
static String HELP_LARGE
          the name of the large(default: 24x24 px) help image (used for toolbar buttons or icons).
static String HELP_SMALL
          the name of the small(default: 16x16 px) help image (used for menuitems or buttons).
static String IMPORT_LARGE
          the name of the large(default: 24x24 px) import image (used for toolbar buttons or icons).
static String IMPORT_SMALL
          the name of the small(default: 16x16 px) import image (used for menuitems or buttons).
static String LOGIN_LARGE
          the name of the large(default: 24x24 px) login image (used for toolbar buttons or icons).
static String LOGIN_SMALL
          the name of the small(default: 16x16 px) login image (used for menuitems or buttons).
static String LOGOUT_LARGE
          the name of the large(default: 24x24 px) logout image (used for toolbar buttons or icons).
static String LOGOUT_SMALL
          the name of the small(default: 16x16 px) logout image (used for menuitems or buttons).
static String MESSAGE_ERROR_LARGE
          the name of the large(default: 32x32 px) error image, for messages (used for toolbar buttons or icons).
static String MESSAGE_ERROR_SMALL
          the name of the small(default: 16x16 px) error image, for messages (used for menuitems or buttons).
static String MESSAGE_INFO_LARGE
          the name of the large(default: 32x32 px) information image, for messages (used for toolbar buttons or icons).
static String MESSAGE_INFO_SMALL
          the name of the small(default: 16x16 px) information image, for messages (used for menuitems or buttons).
static String MESSAGE_QUESTION_LARGE
          the name of the large(default: 32x32 px) question image, for messages (used for toolbar buttons or icons).
static String MESSAGE_QUESTION_SMALL
          the name of the small(default: 16x16 px) question image, for messages (used for menuitems or buttons).
static String MESSAGE_WARNING_LARGE
          the name of the large(default: 32x32 px) warning image, for messages (used for toolbar buttons or icons).
static String MESSAGE_WARNING_SMALL
          the name of the small(default: 16x16 px) warning image, for messages (used for menuitems or buttons).
static String MOVE_BOTTOM_LARGE
          the name of the large(default: 24x24 px) move bottom image (used for toolbar buttons or icons).
static String MOVE_BOTTOM_SMALL
          the name of the small(default: 16x16 px) move bottom image (used for menuitems or buttons).
static String MOVE_DOWN_LARGE
          the name of the large(default: 24x24 px) move down image (used for toolbar buttons or icons).
static String MOVE_DOWN_SMALL
          the name of the small(default: 16x16 px) move down image (used for menuitems or buttons).
static String MOVE_FIRST_LARGE
          the name of the large(default: 24x24 px) move first image (used for toolbar buttons or icons).
static String MOVE_FIRST_SMALL
          the name of the small(default: 16x16 px) move first image (used for menuitems or buttons).
static String MOVE_LAST_LARGE
          the name of the large(default: 24x24 px) move last image (used for toolbar buttons or icons).
static String MOVE_LAST_SMALL
          the name of the small(default: 16x16 px) move last image (used for menuitems or buttons).
static String MOVE_NEXT_LARGE
          the name of the large(default: 24x24 px) move next image (used for toolbar buttons or icons).
static String MOVE_NEXT_SMALL
          the name of the small(default: 16x16 px) move next image (used for menuitems or buttons).
static String MOVE_PREVIOUS_LARGE
          the name of the large(default: 24x24 px) move previous image (used for toolbar buttons or icons).
static String MOVE_PREVIOUS_SMALL
          the name of the small(default: 16x16 px) move previous image (used for menuitems or buttons).
static String MOVE_TOP_LARGE
          the name of the large(default: 24x24 px) move top image (used for toolbar buttons or icons).
static String MOVE_TOP_SMALL
          the name of the small(default: 16x16 px) move top image (used for menuitems or buttons).
static String MOVE_UP_LARGE
          the name of the large(default: 24x24 px) move up image (used for toolbar buttons or icons).
static String MOVE_UP_SMALL
          the name of the small(default: 16x16 px) move up image (used for menuitems or buttons).
static String OK_LARGE
          the name of the large(default: 24x24 px) ok image (used for toolbar buttons or icons).
static String OK_SMALL
          the name of the small(default: 16x16 px) ok image (used for menuitems or buttons).
static String PASTE_LARGE
          the name of the large(default: 24x24 px) paste image (used for toolbar buttons or icons).
static String PASTE_SMALL
          the name of the small(default: 16x16 px) paste image (used for menuitems or buttons).
static String REDO_LARGE
          the name of the large(default: 24x24 px) redo image (used for toolbar buttons or icons).
static String REDO_SMALL
          the name of the small(default: 16x16 px) redo image (used for menuitems or buttons).
static String REGISTER_LARGE
          the name of the large(default: 24x24 px) register image (used for toolbar buttons or icons).
static String REGISTER_SMALL
          the name of the small(default: 16x16 px) register image (used for menuitems or buttons).
static String RELOAD_LARGE
          the name of the large(default: 24x24 px) reload image (used for toolbar buttons or icons).
static String RELOAD_SMALL
          the name of the small(default: 16x16 px) reload image (used for menuitems or buttons).
static String REMOVE_LARGE
          the name of the large(default: 24x24 px) remove image (used for toolbar buttons or icons).
static String REMOVE_SMALL
          the name of the small(default: 16x16 px) remove image (used for menuitems or buttons).
static String SAVE_ALL_LARGE
          the name of the large(default: 24x24 px) save all image (used for toolbar buttons or icons).
static String SAVE_ALL_SMALL
          the name of the small(default: 16x16 px) save all image (used for menuitems or buttons).
static String SAVE_LARGE
          the name of the large(default: 24x24 px) save image (used for toolbar buttons or icons).
static String SAVE_SMALL
          the name of the small(default: 16x16 px) save image (used for menuitems or buttons).
static String SEARCH_LARGE
          the name of the large(default: 24x24 px) search image (used for toolbar buttons or icons).
static String SEARCH_SMALL
          the name of the small(default: 16x16 px) search image (used for menuitems or buttons).
static String UNDO_LARGE
          the name of the large(default: 24x24 px) undo image (used for toolbar buttons or icons).
static String UNDO_SMALL
          the name of the small(default: 16x16 px) undo image (used for menuitems or buttons).
 
Fields inherited from class javax.rad.genui.UIResource
uiResource
 
Constructor Summary
  UIImage(byte[] pData)
          Creates a new instance of UIImage for specific byte data.
protected UIImage(IImage pImage)
          Creates a new instance of UIImage based on an IImage.
  UIImage(String pImageName, byte[] pData)
          Creates a new instance of UIImage for specific byte data and an image name.
 
Method Summary
static void clearImageCache()
          Removes all images from the cache.
 int getHeight()
          Determines the height of the image.
static UIImage getImage(String pImageName)
          Gets the cached instance of an image resource.
static String getImageMapping(String pMappingName)
          Gets the image name for the given mapping name.
static String[] getImageMappingNames()
          Gets all used mapping names.
 String getImageName()
          Gets the name of the image.
 int getWidth()
          Determines the width of the image.
 void saveAs(OutputStream pOut, IImage.ImageType pType)
          Saves the current image as file.
static void setDefaults()
          Sets te default image mappings.
static void setImageMapping(String pMappingName, String pImageName)
          Gets the image name for the given mapping name.
 
Methods inherited from class javax.rad.genui.UIFactoryResource
getResource, getUIResource
 
Methods inherited from class javax.rad.genui.UIResource
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Field Detail

EXIT_SMALL

public static final String EXIT_SMALL
the name of the small(default: 16x16 px) exit image (used for menuitems or buttons).

See Also:
Constant Field Values

EXIT_LARGE

public static final String EXIT_LARGE
the name of the large(default: 24x24 px) exit image (used for toolbar buttons or icons).

See Also:
Constant Field Values

LOGIN_SMALL

public static final String LOGIN_SMALL
the name of the small(default: 16x16 px) login image (used for menuitems or buttons).

See Also:
Constant Field Values

LOGIN_LARGE

public static final String LOGIN_LARGE
the name of the large(default: 24x24 px) login image (used for toolbar buttons or icons).

See Also:
Constant Field Values

LOGOUT_SMALL

public static final String LOGOUT_SMALL
the name of the small(default: 16x16 px) logout image (used for menuitems or buttons).

See Also:
Constant Field Values

LOGOUT_LARGE

public static final String LOGOUT_LARGE
the name of the large(default: 24x24 px) logout image (used for toolbar buttons or icons).

See Also:
Constant Field Values

CHANGE_PASSWORD_SMALL

public static final String CHANGE_PASSWORD_SMALL
the name of the small(default: 16x16 px) change password image (used for menuitems or buttons).

See Also:
Constant Field Values

CHANGE_PASSWORD_LARGE

public static final String CHANGE_PASSWORD_LARGE
the name of the large(default: 24x24 px) change password image (used for toolbar buttons or icons).

See Also:
Constant Field Values

HELP_SMALL

public static final String HELP_SMALL
the name of the small(default: 16x16 px) help image (used for menuitems or buttons).

See Also:
Constant Field Values

HELP_LARGE

public static final String HELP_LARGE
the name of the large(default: 24x24 px) help image (used for toolbar buttons or icons).

See Also:
Constant Field Values

ABOUT_SMALL

public static final String ABOUT_SMALL
the name of the small(default: 16x16 px) about image (used for menuitems or buttons).

See Also:
Constant Field Values

ABOUT_LARGE

public static final String ABOUT_LARGE
the name of the large(default: 24x24 px) about image (used for toolbar buttons or icons).

See Also:
Constant Field Values

ADD_SMALL

public static final String ADD_SMALL
the name of the small(default: 16x16 px) add image (used for menuitems or buttons).

See Also:
Constant Field Values

ADD_LARGE

public static final String ADD_LARGE
the name of the large(default: 24x24 px) add image (used for toolbar buttons or icons).

See Also:
Constant Field Values

REMOVE_SMALL

public static final String REMOVE_SMALL
the name of the small(default: 16x16 px) remove image (used for menuitems or buttons).

See Also:
Constant Field Values

REMOVE_LARGE

public static final String REMOVE_LARGE
the name of the large(default: 24x24 px) remove image (used for toolbar buttons or icons).

See Also:
Constant Field Values

SAVE_SMALL

public static final String SAVE_SMALL
the name of the small(default: 16x16 px) save image (used for menuitems or buttons).

See Also:
Constant Field Values

SAVE_LARGE

public static final String SAVE_LARGE
the name of the large(default: 24x24 px) save image (used for toolbar buttons or icons).

See Also:
Constant Field Values

SAVE_ALL_SMALL

public static final String SAVE_ALL_SMALL
the name of the small(default: 16x16 px) save all image (used for menuitems or buttons).

See Also:
Constant Field Values

SAVE_ALL_LARGE

public static final String SAVE_ALL_LARGE
the name of the large(default: 24x24 px) save all image (used for toolbar buttons or icons).

See Also:
Constant Field Values

RELOAD_SMALL

public static final String RELOAD_SMALL
the name of the small(default: 16x16 px) reload image (used for menuitems or buttons).

See Also:
Constant Field Values

RELOAD_LARGE

public static final String RELOAD_LARGE
the name of the large(default: 24x24 px) reload image (used for toolbar buttons or icons).

See Also:
Constant Field Values

REDO_SMALL

public static final String REDO_SMALL
the name of the small(default: 16x16 px) redo image (used for menuitems or buttons).

See Also:
Constant Field Values

REDO_LARGE

public static final String REDO_LARGE
the name of the large(default: 24x24 px) redo image (used for toolbar buttons or icons).

See Also:
Constant Field Values

UNDO_SMALL

public static final String UNDO_SMALL
the name of the small(default: 16x16 px) undo image (used for menuitems or buttons).

See Also:
Constant Field Values

UNDO_LARGE

public static final String UNDO_LARGE
the name of the large(default: 24x24 px) undo image (used for toolbar buttons or icons).

See Also:
Constant Field Values

MOVE_UP_SMALL

public static final String MOVE_UP_SMALL
the name of the small(default: 16x16 px) move up image (used for menuitems or buttons).

See Also:
Constant Field Values

MOVE_UP_LARGE

public static final String MOVE_UP_LARGE
the name of the large(default: 24x24 px) move up image (used for toolbar buttons or icons).

See Also:
Constant Field Values

MOVE_DOWN_SMALL

public static final String MOVE_DOWN_SMALL
the name of the small(default: 16x16 px) move down image (used for menuitems or buttons).

See Also:
Constant Field Values

MOVE_DOWN_LARGE

public static final String MOVE_DOWN_LARGE
the name of the large(default: 24x24 px) move down image (used for toolbar buttons or icons).

See Also:
Constant Field Values

MOVE_FIRST_SMALL

public static final String MOVE_FIRST_SMALL
the name of the small(default: 16x16 px) move first image (used for menuitems or buttons).

See Also:
Constant Field Values

MOVE_FIRST_LARGE

public static final String MOVE_FIRST_LARGE
the name of the large(default: 24x24 px) move first image (used for toolbar buttons or icons).

See Also:
Constant Field Values

MOVE_LAST_SMALL

public static final String MOVE_LAST_SMALL
the name of the small(default: 16x16 px) move last image (used for menuitems or buttons).

See Also:
Constant Field Values

MOVE_LAST_LARGE

public static final String MOVE_LAST_LARGE
the name of the large(default: 24x24 px) move last image (used for toolbar buttons or icons).

See Also:
Constant Field Values

MOVE_TOP_SMALL

public static final String MOVE_TOP_SMALL
the name of the small(default: 16x16 px) move top image (used for menuitems or buttons).

See Also:
Constant Field Values

MOVE_TOP_LARGE

public static final String MOVE_TOP_LARGE
the name of the large(default: 24x24 px) move top image (used for toolbar buttons or icons).

See Also:
Constant Field Values

MOVE_BOTTOM_SMALL

public static final String MOVE_BOTTOM_SMALL
the name of the small(default: 16x16 px) move bottom image (used for menuitems or buttons).

See Also:
Constant Field Values

MOVE_BOTTOM_LARGE

public static final String MOVE_BOTTOM_LARGE
the name of the large(default: 24x24 px) move bottom image (used for toolbar buttons or icons).

See Also:
Constant Field Values

MOVE_NEXT_SMALL

public static final String MOVE_NEXT_SMALL
the name of the small(default: 16x16 px) move next image (used for menuitems or buttons).

See Also:
Constant Field Values

MOVE_NEXT_LARGE

public static final String MOVE_NEXT_LARGE
the name of the large(default: 24x24 px) move next image (used for toolbar buttons or icons).

See Also:
Constant Field Values

MOVE_PREVIOUS_SMALL

public static final String MOVE_PREVIOUS_SMALL
the name of the small(default: 16x16 px) move previous image (used for menuitems or buttons).

See Also:
Constant Field Values

MOVE_PREVIOUS_LARGE

public static final String MOVE_PREVIOUS_LARGE
the name of the large(default: 24x24 px) move previous image (used for toolbar buttons or icons).

See Also:
Constant Field Values

EXPORT_SMALL

public static final String EXPORT_SMALL
the name of the small(default: 16x16 px) export image (used for menuitems or buttons).

See Also:
Constant Field Values

EXPORT_LARGE

public static final String EXPORT_LARGE
the name of the large(default: 24x24 px) export image (used for toolbar buttons or icons).

See Also:
Constant Field Values

IMPORT_SMALL

public static final String IMPORT_SMALL
the name of the small(default: 16x16 px) import image (used for menuitems or buttons).

See Also:
Constant Field Values

IMPORT_LARGE

public static final String IMPORT_LARGE
the name of the large(default: 24x24 px) import image (used for toolbar buttons or icons).

See Also:
Constant Field Values

COPY_SMALL

public static final String COPY_SMALL
the name of the small(default: 16x16 px) copy image (used for menuitems or buttons).

See Also:
Constant Field Values

COPY_LARGE

public static final String COPY_LARGE
the name of the large(default: 24x24 px) copy image (used for toolbar buttons or icons).

See Also:
Constant Field Values

PASTE_SMALL

public static final String PASTE_SMALL
the name of the small(default: 16x16 px) paste image (used for menuitems or buttons).

See Also:
Constant Field Values

PASTE_LARGE

public static final String PASTE_LARGE
the name of the large(default: 24x24 px) paste image (used for toolbar buttons or icons).

See Also:
Constant Field Values

CUT_SMALL

public static final String CUT_SMALL
the name of the small(default: 16x16 px) cut image (used for menuitems or buttons).

See Also:
Constant Field Values

CUT_LARGE

public static final String CUT_LARGE
the name of the large(default: 24x24 px) cut image (used for toolbar buttons or icons).

See Also:
Constant Field Values

SEARCH_SMALL

public static final String SEARCH_SMALL
the name of the small(default: 16x16 px) search image (used for menuitems or buttons).

See Also:
Constant Field Values

SEARCH_LARGE

public static final String SEARCH_LARGE
the name of the large(default: 24x24 px) search image (used for toolbar buttons or icons).

See Also:
Constant Field Values

OK_SMALL

public static final String OK_SMALL
the name of the small(default: 16x16 px) ok image (used for menuitems or buttons).

See Also:
Constant Field Values

OK_LARGE

public static final String OK_LARGE
the name of the large(default: 24x24 px) ok image (used for toolbar buttons or icons).

See Also:
Constant Field Values

CANCEL_SMALL

public static final String CANCEL_SMALL
the name of the small(default: 16x16 px) cancel image (used for menuitems or buttons).

See Also:
Constant Field Values

CANCEL_LARGE

public static final String CANCEL_LARGE
the name of the large(default: 24x24 px) canel image (used for toolbar buttons or icons).

See Also:
Constant Field Values

MESSAGE_INFO_SMALL

public static final String MESSAGE_INFO_SMALL
the name of the small(default: 16x16 px) information image, for messages (used for menuitems or buttons).

See Also:
Constant Field Values

MESSAGE_INFO_LARGE

public static final String MESSAGE_INFO_LARGE
the name of the large(default: 32x32 px) information image, for messages (used for toolbar buttons or icons).

See Also:
Constant Field Values

MESSAGE_WARNING_SMALL

public static final String MESSAGE_WARNING_SMALL
the name of the small(default: 16x16 px) warning image, for messages (used for menuitems or buttons).

See Also:
Constant Field Values

MESSAGE_WARNING_LARGE

public static final String MESSAGE_WARNING_LARGE
the name of the large(default: 32x32 px) warning image, for messages (used for toolbar buttons or icons).

See Also:
Constant Field Values

MESSAGE_ERROR_SMALL

public static final String MESSAGE_ERROR_SMALL
the name of the small(default: 16x16 px) error image, for messages (used for menuitems or buttons).

See Also:
Constant Field Values

MESSAGE_ERROR_LARGE

public static final String MESSAGE_ERROR_LARGE
the name of the large(default: 32x32 px) error image, for messages (used for toolbar buttons or icons).

See Also:
Constant Field Values

MESSAGE_QUESTION_SMALL

public static final String MESSAGE_QUESTION_SMALL
the name of the small(default: 16x16 px) question image, for messages (used for menuitems or buttons).

See Also:
Constant Field Values

MESSAGE_QUESTION_LARGE

public static final String MESSAGE_QUESTION_LARGE
the name of the large(default: 32x32 px) question image, for messages (used for toolbar buttons or icons).

See Also:
Constant Field Values

CHECK_SMALL

public static final String CHECK_SMALL
the name of the small(default: 16x16 px) check image (used for menuitems or buttons).

See Also:
Constant Field Values

CHECK_LARGE

public static final String CHECK_LARGE
the name of the large(default: 24x24 px) check image (used for toolbar buttons or icons).

See Also:
Constant Field Values

CHECK_YES_SMALL

public static final String CHECK_YES_SMALL
the name of the small(default: 16x16 px) yes/selected check image (used for menuitems or buttons).

See Also:
Constant Field Values

CHECK_YES_LARGE

public static final String CHECK_YES_LARGE
the name of the large(default: 24x24 px) yes/selected check image (used for toolbar buttons or icons).

See Also:
Constant Field Values

CHECK_NO_SMALL

public static final String CHECK_NO_SMALL
the name of the small(default: 16x16 px) no/selected check image (used for menuitems or buttons).

See Also:
Constant Field Values

CHECK_NO_LARGE

public static final String CHECK_NO_LARGE
the name of the large(default: 24x24 px) no/selected check image (used for toolbar buttons or icons).

See Also:
Constant Field Values

REGISTER_SMALL

public static final String REGISTER_SMALL
the name of the small(default: 16x16 px) register image (used for menuitems or buttons).

See Also:
Constant Field Values

REGISTER_LARGE

public static final String REGISTER_LARGE
the name of the large(default: 24x24 px) register image (used for toolbar buttons or icons).

See Also:
Constant Field Values

EDIT_SMALL

public static final String EDIT_SMALL
the name of the small(default: 16x16 px) edit image (used for menuitems or buttons).

See Also:
Constant Field Values

EDIT_LARGE

public static final String EDIT_LARGE
the name of the large(default: 24x24 px) edit image (used for toolbar buttons or icons).

See Also:
Constant Field Values
Constructor Detail

UIImage

protected UIImage(IImage pImage)
Creates a new instance of UIImage based on an IImage.

Parameters:
pImage - the Image.
See Also:
IImage

UIImage

public UIImage(byte[] pData)
Creates a new instance of UIImage for specific byte data.

Parameters:
pData - the image data

UIImage

public UIImage(String pImageName,
               byte[] pData)
Creates a new instance of UIImage for specific byte data and an image name.

Parameters:
pImageName - the name of the image specified with byData
pData - the image data
Method Detail

getImageName

public String getImageName()
Gets the name of the image.

Specified by:
getImageName in interface IImage
Returns:
the name of the image.

getWidth

public int getWidth()
Determines the width of the image. If the width is not yet known, this method returns -1.

Specified by:
getWidth in interface IImage
Returns:
the width of this image, or -1 if the width is not yet known.
See Also:
Image.getHeight(java.awt.image.ImageObserver)

getHeight

public int getHeight()
Determines the height of the image. If the height is not yet known, this method returns -1.

Specified by:
getHeight in interface IImage
Returns:
the height of this image, or -1 if the height is not yet known.
See Also:
Image.getWidth(java.awt.image.ImageObserver)

saveAs

public void saveAs(OutputStream pOut,
                   IImage.ImageType pType)
            throws IOException
Saves the current image as file.

Specified by:
saveAs in interface IImage
Parameters:
pOut - the output stream
pType - the image type
Throws:
IOException - if the image can not be saved

setDefaults

public static void setDefaults()
Sets te default image mappings.


getImage

public static UIImage getImage(String pImageName)
Gets the cached instance of an image resource. If the image was not cached, then a new instance of the image will be created.

Parameters:
pImageName - the path for the image (filename or resource path)
Returns:
the image instance for pImagePath

getImageMapping

public static String getImageMapping(String pMappingName)
Gets the image name for the given mapping name.

Parameters:
pMappingName - the mapping name.
Returns:
the image name.

setImageMapping

public static void setImageMapping(String pMappingName,
                                   String pImageName)
Gets the image name for the given mapping name.

Parameters:
pMappingName - the mapping name.
pImageName - the image name.

getImageMappingNames

public static String[] getImageMappingNames()
Gets all used mapping names.

Returns:
the mapping names.

clearImageCache

public static void clearImageCache()
Removes all images from the cache.



Copyright © 2009 SIB Visions GmbH. All Rights Reserved.