ilog.cpl.graph.background
Interface IlpBackgroundSupport

All Known Subinterfaces:
IlpBackgroundSupport
All Known Implementing Classes:
IlpDefaultBackgroundSupport, IlpDefaultBackgroundSupport

public interface IlpBackgroundSupport

This interface provides the functionality needed for the IlpViewsViews to handle the background support needs of background based components such as the IlpNetwork and IlpEquipment.

The functions in this interface can be called by the view, the controller, or an interactor.

Since:
JViews 7.5
See Also:
IlpBackgroundFactory, IlpBackgroundListener

Method Summary
 void addBackground(URL backgroundURL)
          Adds the background pointed by the provided URL as the last background.
 void addBackground(URL backgroundURL, IlpBackground background, int index)
          Adds the background specified in the URL using the the provided IlpBackground at the specified index.
 void addBackground(URL backgroundURL, int index)
          Adds the background pointed by the provided URL at the specified index.
 void addBackgroundListener(IlpBackgroundListener listener)
          Allows individuals to add an IlpBackgroundListener to this IlpBackgroundSupport.
 void addBackgrounds(List backgroundURLs)
          Adds the provided backgrounds.
 IlpBackgroundFactory getBackgroundFactory(String extension)
          Returns the IlpBackgroundFactory for the given extension.
 IlpBackground getBackgroundInstance(URL backgroundURL)
          Returns the IlpBackground instance associated with the URL provided.
 List getBackgrounds()
          Returns a read-only List of URL instances in the same order as they were indexed.
 IlpViewsView getView()
          Returns the IlpViewsView that this background support is associated with.
 void moveBackground(URL backgroundURL, int index)
          Allows individuals to move the background specified by the provided URL to the index provided.
 void registerBackgroundFactory(String extension, IlpBackgroundFactory factory)
          Registers the provided IlpBackgroundFactory for the given extension.
 void reloadBackground(URL backgroundURL)
          Reloads the background pointed to by the provided URL.
 void reloadBackgrounds()
          Reloads all the background.
 void removeBackground(URL backgroundURL)
          Removes the background pointed to by the provided URL.
 void removeBackgroundListener(IlpBackgroundListener listener)
          Allows individuals to removed an IlpBackgroundListener to from IlpBackgroundSupport.
 void removeBackgrounds()
          Removes all backgrounds.
 void setView(IlpViewsView view)
          Associates this background support with the provided view.
 

Method Detail

addBackground

void addBackground(URL backgroundURL)
                   throws IlpBackgroundHandlingException
Adds the background pointed by the provided URL as the last background.

Parameters:
backgroundURL - the URL of the background to be added
Throws:
IlpBackgroundHandlingException - in case a problem occurs when adding background for the provided URL.

addBackground

void addBackground(URL backgroundURL,
                   int index)
                   throws IlpBackgroundHandlingException
Adds the background pointed by the provided URL at the specified index.

Parameters:
backgroundURL - the URL of the background to be added
index - the index where to add the background
Throws:
IlpBackgroundHandlingException - in case a problem occurs when adding background for the provided URL at the given index.

addBackground

void addBackground(URL backgroundURL,
                   IlpBackground background,
                   int index)
                   throws IlpBackgroundHandlingException
Adds the background specified in the URL using the the provided IlpBackground at the specified index.

Parameters:
backgroundURL - the URL of the background to be added
background - the IlpBackground instance to be used
index - the index where to add the background
Throws:
IlpBackgroundHandlingException - in case a problem occurs when adding background for the provided URL and IlpBackground.

removeBackground

void removeBackground(URL backgroundURL)
                      throws IlpBackgroundHandlingException
Removes the background pointed to by the provided URL.

Parameters:
backgroundURL - the URL of the background of interest
Throws:
IlpBackgroundHandlingException - in case a problem occurs when removing the IlpBackground associated with the provide URL.

removeBackgrounds

void removeBackgrounds()
                       throws IlpBackgroundHandlingException
Removes all backgrounds.

Throws:
IlpBackgroundHandlingException - in case a problem occurs when removing all the backgrounds.

reloadBackground

void reloadBackground(URL backgroundURL)
                      throws IlpBackgroundHandlingException
Reloads the background pointed to by the provided URL.

Parameters:
backgroundURL - the URL that points to a given background.
Throws:
IlpBackgroundHandlingException - in case a problem occurs when reloading the provided URL.

reloadBackgrounds

void reloadBackgrounds()
                       throws IlpBackgroundHandlingException
Reloads all the background.

Throws:
IlpBackgroundHandlingException - in case a problem occurs when reloading all the backgrounds.

getBackgrounds

List getBackgrounds()
Returns a read-only List of URL instances in the same order as they were indexed.

Returns:
a read-only List of URL instances in the same order as they were indexed

addBackgrounds

void addBackgrounds(List backgroundURLs)
                    throws IlpBackgroundHandlingException
Adds the provided backgrounds.

Parameters:
backgroundURLs - a List of URL instances
Throws:
IlpBackgroundHandlingException - in case a problem occurs when adding all the backgrounds.

getBackgroundInstance

IlpBackground getBackgroundInstance(URL backgroundURL)
                                    throws IlpBackgroundHandlingException
Returns the IlpBackground instance associated with the URL provided.

Parameters:
backgroundURL - the URL of interest.
Returns:
the IlpBackground instance that represents the provided URL
Throws:
IlpBackgroundHandlingException - in case a problem occurs when obtaining the IlpBackground instance for the provide URL.

setView

void setView(IlpViewsView view)
             throws IlpBackgroundHandlingException
Associates this background support with the provided view.

If a null value is passed as the view, this background support disengages support for its previous IlpViewsView.

Parameters:
view - the IlpViewsView of interest.
Throws:
IlpBackgroundHandlingException - in case a problem occurs when setting IlpViewsView.

getView

IlpViewsView getView()
Returns the IlpViewsView that this background support is associated with.

Returns:
view the IlpViewsView that this background support is associated with.

getBackgroundFactory

IlpBackgroundFactory getBackgroundFactory(String extension)
Returns the IlpBackgroundFactory for the given extension.

Parameters:
extension - the extension that should specified in the form: "gif", "png"...
Returns:
the IlpBackgroundFactory registered for the given extension or null if no factory has been registered for it.

registerBackgroundFactory

void registerBackgroundFactory(String extension,
                               IlpBackgroundFactory factory)
                               throws IlpBackgroundHandlingException
Registers the provided IlpBackgroundFactory for the given extension.

If a null value is passed as the factory, the factory is removed from the list of registered factories.

If a this method is called multiple times with different instances of factories, the last instance provided will be the one into effect.

Parameters:
extension - the extension that should specified in the form: "gif", "png"...
factory - the IlpBackgroundFactory to be used for the given extension or null
Throws:
IlpBackgroundHandlingException - in case a problem occurs when registering the IlpBackgroundFactory for the given extension.

addBackgroundListener

void addBackgroundListener(IlpBackgroundListener listener)
Allows individuals to add an IlpBackgroundListener to this IlpBackgroundSupport.

Parameters:
listener - IlpBackgroundListener to be notified of changes.

removeBackgroundListener

void removeBackgroundListener(IlpBackgroundListener listener)
Allows individuals to removed an IlpBackgroundListener to from IlpBackgroundSupport.

Parameters:
listener - IlpBackgroundListener to be removed.

moveBackground

void moveBackground(URL backgroundURL,
                    int index)
                    throws IlpBackgroundHandlingException
Allows individuals to move the background specified by the provided URL to the index provided.

Parameters:
backgroundURL - the URL of the background of interest.
index - the index where the background should now be located.
Throws:
IlpBackgroundHandlingException - in case a problem occurs when moving the background.


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