ilog.cpl.graph.background
Interface IlpBackground

All Known Subinterfaces:
IlpMapDataSourceBackground
All Known Implementing Classes:
IlpAbstractBackground, IlpAbstractIVLBackground, IlpAbstractMapDataSourceBackground, IlpImageBackground, IlpImageTileBackground, IlpIVLFrameworkBackground, IlpIVLMapBackground, IlpMIDMIFBackground, IlpShapeBackground, IlpSVGBackground, IlpSVGZBackground

public interface IlpBackground

This interface represents the abstraction that is in charge of handling the lifecycle of a background as it is managed by an IlpBackgroundSupport implementation.

It defines the contract that allows its implementation to handle the generation and maintenace of the underlying graphical structures that represent the background.

A background is typically represented by multiple instances of IlvManagerLayer that are contained in a given Ilvmanager, but it can be also represented in a single IlvManagerLayer if such is the requirement.

The two main methods of this interface are the create and the dispose methods. The former has the responsibility of populating the provided IlvManager with the appropriate graphics that represent the background identified by the URL property of this background. The latter is in responsible for disposing of such graphics to ensure that the background specified by the URL property is no longer represented and any resources associated with it are properly made disposed of.

For more details see each method's documentation.

A background allows to be customized by the use of properties. It defines a set of built-in properties that are to be taken into account during the process of generating and handling of its graphic representation. Users can define custom properties that may serve custom needs.

Since:
JViews 7.5

Field Summary
static String LOAD_ON_DEMAND_PROPERTY
          The load-on-demand property.
static String THREADED_PROPERTY
          The threaded property.
static String URL_PROPERTY
          The url property.
static String VISIBLE_PROPERTY
          The visible property.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChangeListener to this background.
 void create(IlvManager manager, int index, IlpViewsView view)
          Called by the IlpBackgroundSupport to indicate to this background that it should create the provided IlvManager with the graphics that are to represent the background.
 void dispose(IlvManager manager, IlpViewsView view)
          Called by the IlpBackgroundSupport to indicate to this background that it should dispose the graphics that are representing this background from the provided IlvManager.
 IlvManagerLayer getManagerLayer(int index)
          Return the IlvManagerLayer at the provided index.
 List getManagerLayers()
          Returns a read-only List that contains instances of IlvManagerLayer that compose this background.
 int getManagerLayersCount()
          Returns the number of IlvManagerLayer instances that are used by this background.
 Object getProperty(String property)
          Returns the value of a property of this background.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Remove a PropertyChangeListener from this background.
 void setProperty(String property, Object propertyValue)
          Sets the value of a property of this background.
 

Field Detail

LOAD_ON_DEMAND_PROPERTY

static final String LOAD_ON_DEMAND_PROPERTY
The load-on-demand property. It can be used to retrieve/set value of this property. It holds a Boolean.

Setting this property causes the background to be re-generated.

Note: Not all backgrounds support this property. See the documentation for details on which backgrounds support it and how they support it.

If a background supports lod-on-demand, it typically means that it provides some sort of tiling capability where the overall background is divided into smaller sub-regions that are loaded on demand as the user navigates the background area.

See Also:
Constant Field Values

THREADED_PROPERTY

static final String THREADED_PROPERTY
The threaded property. It can be used to retrieve/set value of this property. It holds a Boolean.

Setting this property causes the background to be re-generated.

This property is used to indicate to a given background implementation that it should, or not, (if it can) take advantage of multi-threaded schemes to improve the overall performance of background processing.

This multi-threaded support can manifest itself in different ways, for example:

The precise meaning is left open so that background implementations can be free to expand on the possible improvements.

See Also:
Constant Field Values

URL_PROPERTY

static final String URL_PROPERTY
The url property. It can be used to retrieve value of this property. It holds a String.

Note: This is a readonly property, it should not be modified.

Contains the background URL.

See Also:
Constant Field Values

VISIBLE_PROPERTY

static final String VISIBLE_PROPERTY
The visible property. It can be used to retrieve/set value of this property. It holds a Boolean.

Determines if the background is visible or not.

See Also:
Constant Field Values
Method Detail

create

void create(IlvManager manager,
            int index,
            IlpViewsView view)
            throws IlpBackgroundHandlingException
Called by the IlpBackgroundSupport to indicate to this background that it should create the provided IlvManager with the graphics that are to represent the background.

This background should start inserting layers for its graphics in the manager at the given index.

Important: This background is expected to:

  1. Generate its own IlvManagerLayer instances off of the IlvManager provided
  2. Populate the created IlvManagerLayer instances
  3. Maintain references to the created IlvManagerLayer instances

Important: This background is must not reuse, nor alter any of the IlvManagerLayer instances currently in the IlvManager. Instead it must insert in the provided IlvManager (at the specified index) the IlvManagerLayer instances that it uses. This guarantees that other graphic representations are not corrupted.

Parameters:
manager - the manager where the graphics should be added to
index - the IlvManagerLayer index in the manager from which this background should start inserting the graphics.
view - the associated IlpViewsView
Throws:
IlpBackgroundHandlingException - in case there is a problem handling this operation.

dispose

void dispose(IlvManager manager,
             IlpViewsView view)
             throws IlpBackgroundHandlingException
Called by the IlpBackgroundSupport to indicate to this background that it should dispose the graphics that are representing this background from the provided IlvManager.

Parameters:
manager - the manager where the graphics are being displayed.
view - the associated IlpViewsView
Throws:
IlpBackgroundHandlingException - in case there is a problem handling this operation.

getManagerLayers

List getManagerLayers()
Returns a read-only List that contains instances of IlvManagerLayer that compose this background.

Returns:
a read-only List that contains instances of IlvManagerLayer that compose this background.

getManagerLayersCount

int getManagerLayersCount()
Returns the number of IlvManagerLayer instances that are used by this background.

Returns:
the number of IlvManagerLayer instances that are used by this background.

getManagerLayer

IlvManagerLayer getManagerLayer(int index)
                                throws IllegalArgumentException
Return the IlvManagerLayer at the provided index.

Parameters:
index - the IlvManagerLayer at the provided index.
Throws:
IllegalArgumentException - if an illegal index is provided.

setProperty

void setProperty(String property,
                 Object propertyValue)
Sets the value of a property of this background.

If a null value is passed as the property value, the property is removed from the this background.

Parameters:
property - The property name
propertyValue - The property value

getProperty

Object getProperty(String property)
Returns the value of a property of this background.

Parameters:
property - The property
Returns:
The property value

addPropertyChangeListener

void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to this background.

Parameters:
listener - a PropertyChangeListener that will be notified of property changes.

removePropertyChangeListener

void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from this background.

Parameters:
listener - a PropertyChangeListener that will be no longer be notified of property changes.


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