TPTP 4.6.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.report.tools.internal
Interface IDIImageProvider

All Superinterfaces:
IDisposable
All Known Implementing Classes:
AbstractIImageProvider, AWTIImageProvider, SWTIImageProvider

Deprecated. As of TPTP 4.5.0, use the TPTP Business Intelligence and Reporting Tools (BIRT) reporting infrastructure (org.eclipse.tptp.platform.report.birt).

public interface IDIImageProvider
extends IDisposable

TODO: read and comment again: Image provider is the way to get an IImage from underlaying graphic system and various sources as Http, or file system. This class have an image pool to not create Image resource each time you need, this means you don't have to dispose getted Image, image provider will do ...
It's the responsability of the IDIImageProvider creator to call dispose to free all the resource image allocated by this image provider. As some modern system have limited resources, do not dispose image might degenerate into a "no more handle" crash.
Note:: This class provides IImage for IGC, those image must use pixel coordinates measure.


Method Summary
 void addImageSearchPath(java.lang.String path)
          Deprecated. Add a search path for images for search in file system, only if search path isn't already in.
 void addResourceClass(java.lang.Class c)
          Deprecated. Add a new class to get image from it's resources (do not include if class i already in)
 void clear()
          Deprecated. Clear this object, do a full dispose of contained images, and clear search path and resources classes.
 void clearImageSearchPath()
          Deprecated. Clear current search path.
 void dispose()
          Deprecated. Dispose all image system's resource (including broken image) held by this image provider, do not forget to call this method else you'll become under hand of the "no more handle" crash...
 IImage getBrokenImage()
          Deprecated.  
 IImage getImage(java.lang.String name)
          Deprecated.  
 void removeImageSearchPath(java.lang.String path)
          Deprecated. Remove a search path for images for search in file system.
 boolean removeResourceClass(java.lang.Class c)
          Deprecated. Remove a class from the resources classes.
 java.lang.String searchImage(java.lang.String ip)
          Deprecated.  
 void setBrokenImage(IImage image)
          Deprecated. Change current broken image, disposing current one before.
 void setImage(java.lang.String name, IImage image)
          Deprecated. sets an image into the image provider with its associated name.
 void setImageSearchPath(java.lang.String[] paths)
          Deprecated. Change current search path for images, used to get image in file system.
 IImage takeImage(java.lang.String name)
          Deprecated.  
 

Method Detail

getBrokenImage

IImage getBrokenImage()
Deprecated. 
Returns:
the image used when other image aren't found.

setBrokenImage

void setBrokenImage(IImage image)
Deprecated. 
Change current broken image, disposing current one before. After this call broken imag is under the control of image provider, do not dispose it, image provide will do.


getImage

IImage getImage(java.lang.String name)
Deprecated. 
Returns:
image, first look into current image pool, then try to get image from an url, or try from search path, file system, in the worst case return the broken image. This means you don't have to dispose returned image, but the creator of DImageProvider must do this calling IDImageProvider.dispose(). If an image is found, put it in current image pool, next time it will be faster...

setImage

void setImage(java.lang.String name,
              IImage image)
Deprecated. 
sets an image into the image provider with its associated name. If the name already exists into the image provider the old image will be replaced by the new one.

See Also:
getImage(String)

takeImage

IImage takeImage(java.lang.String name)
Deprecated. 
Returns:
Image currently stored in image pool, remove this image from pool. After this the caller have the responsability to dispose taken image. (as image is no longer in image pool image provider can't dispose it). Return null if image isn't in pool...

searchImage

java.lang.String searchImage(java.lang.String ip)
Deprecated. 
Returns:
real file name for given image name using search path list, file must exist on file system.

dispose

void dispose()
Deprecated. 
Dispose all image system's resource (including broken image) held by this image provider, do not forget to call this method else you'll become under hand of the "no more handle" crash... The contract is: after dispose call, this object must not be further used.

Specified by:
dispose in interface IDisposable

clear

void clear()
Deprecated. 
Clear this object, do a full dispose of contained images, and clear search path and resources classes.


setImageSearchPath

void setImageSearchPath(java.lang.String[] paths)
Deprecated. 
Change current search path for images, used to get image in file system. set paths to null, clear current search path.


clearImageSearchPath

void clearImageSearchPath()
Deprecated. 
Clear current search path.


addImageSearchPath

void addImageSearchPath(java.lang.String path)
Deprecated. 
Add a search path for images for search in file system, only if search path isn't already in.


removeImageSearchPath

void removeImageSearchPath(java.lang.String path)
Deprecated. 
Remove a search path for images for search in file system.


addResourceClass

void addResourceClass(java.lang.Class c)
Deprecated. 
Add a new class to get image from it's resources (do not include if class i already in)

See Also:
Class.getResourceAsStream(java.lang.String)

removeResourceClass

boolean removeResourceClass(java.lang.Class c)
Deprecated. 
Remove a class from the resources classes.

Returns:
true if class was removed, false otherwise.

TPTP 4.6.0 Platform Project
Internal API Specification