javax.rad.genui
Class UIImage

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

See Also:
Constant Field Values

TRASH_SMALL

public static final java.lang.String TRASH_SMALL
the name of the small(default: 16x16 px) trash image (used for menuitems or buttons).

See Also:
Constant Field Values

TRASH_LARGE

public static final java.lang.String TRASH_LARGE
the name of the large(default: 24x24 px) trash 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(java.lang.String pImageName)
Creates a new instance of UIImage for the specified name.

Parameters:
pImageName - the name of the image

UIImage

public UIImage(java.lang.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 java.lang.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(java.io.OutputStream pOut,
                   IImage.ImageType pType)
            throws java.io.IOException
Saves the current image as file.

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

equals

public boolean equals(java.lang.Object pObject)

Specified by:
equals in class UIFactoryResource<IImage>

hashCode

public int hashCode()

Specified by:
hashCode in class UIFactoryResource<IImage>

toString

public java.lang.String toString()

Specified by:
toString in class UIFactoryResource<IImage>

setDefaults

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


getImage

public static UIImage getImage(java.lang.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 java.lang.String getImageMapping(java.lang.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(java.lang.String pMappingName,
                                   java.lang.String pImageName)
Gets the image name for the given mapping name.

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

getImageMappingNames

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

Returns:
the mapping names

getImageNames

public static java.lang.String[] getImageNames()
Gets all available image names.

Returns:
the image names

clearImageMappings

public static void clearImageMappings()
Removes all image mappings and also clears the image cache for mapped images.


clearImage

public static void clearImage(java.lang.String pImageName)
Clears the cache for the given image.

Parameters:
pImageName - the image name

clearImageCache

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



Copyright © 2009 SIB Visions GmbH. All Rights Reserved.