ilog.tgo.service
Class IltDefaultImageRepository

java.lang.Object
  extended by ilog.cpl.service.IlpDefaultImageRepository
      extended by ilog.tgo.service.IltDefaultImageRepository
All Implemented Interfaces:
IlpImageRepository
Direct Known Subclasses:
IltDefaultImageRepository

public class IltDefaultImageRepository
extends IlpDefaultImageRepository

Default implementation of the IlpImageRepository.

This image repository contains a set of images which are internally used by JTGO.

Since:
JTGO 4.0
See Also:
IlpImageRepository

Constructor Summary
IltDefaultImageRepository(IlpContext context)
          Creates an image repository.
IltDefaultImageRepository(IlpContext context, String defaultImageName)
          Creates an image repository.
 
Method Summary
 Image getImage(String location)
          Gets an image by location.
 String getImageLocation(Image image)
          Gets the location string associated with an image in the repository.
 List getImageLocations()
          Gets a list of all the image locations currently in the repository.
static Image getPredefinedImageByName(String name)
           
 
Methods inherited from class ilog.cpl.service.IlpDefaultImageRepository
createDefaultImage, getContext, getImageURL, getLocalImage, getRepository, removeImage, setLocalImage, setRepository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IltDefaultImageRepository

public IltDefaultImageRepository(IlpContext context)
Creates an image repository.

Parameters:
context - The service context used to get the URL access service that helps the repository load data.

IltDefaultImageRepository

public IltDefaultImageRepository(IlpContext context,
                                 String defaultImageName)
Creates an image repository.

Parameters:
context - The service context used to get the URL access service that helps the repository load data.
defaultImageName - The name of the default image used if an image cannot be loaded.
Method Detail

getPredefinedImageByName

public static Image getPredefinedImageByName(String name)
Parameters:
name - Image name, as defined in IltrImage
Returns:
Image or null, if name is unknown
Since:
JViews 7.5
Internal method or field: do not use!

getImage

public Image getImage(String location)
Gets an image by location. The location is described in the form of a string indicating the relative path of the image. If the image is not already in the repository, it will be retrieved from the given location (as resolved by the URL access service). If it cannot be found, a default image will be returned.

Specified by:
getImage in interface IlpImageRepository
Overrides:
getImage in class IlpDefaultImageRepository
Parameters:
location - The relative path of the image
Returns:
The image associated with the given location

getImageLocation

public String getImageLocation(Image image)
Gets the location string associated with an image in the repository. This method searches the repository for the given image and returns the location of the image if it is found or null otherwise.

Specified by:
getImageLocation in interface IlpImageRepository
Overrides:
getImageLocation in class IlpDefaultImageRepository
Parameters:
image - The image to search for.
Returns:
Location string associated with the image or null if the image was not found.

getImageLocations

public List getImageLocations()
Gets a list of all the image locations currently in the repository.

Specified by:
getImageLocations in interface IlpImageRepository
Overrides:
getImageLocations in class IlpDefaultImageRepository
Returns:
The list of image locations as String instances for the images currently in the repository.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.