ilog.cpl.graph.background
Class IlpAbstractIVLBackground

java.lang.Object
  extended by ilog.cpl.graph.background.IlpAbstractBackground
      extended by ilog.cpl.graph.background.IlpAbstractIVLBackground
All Implemented Interfaces:
IlpBackground, IlvBatchable
Direct Known Subclasses:
IlpIVLFrameworkBackground, IlpIVLMapBackground

public abstract class IlpAbstractIVLBackground
extends IlpAbstractBackground

This type of background allows one to integrate backgrounds described in the ILOG JViews IVL file format as a background in JViews TGO.

The IlpAbstractIVLBackground serves as a base class for IVL based backgrounds, as it provides the common functionality behind such backgrounds. For example the ability add or remove IlvManagerLayers to the background programmatically is provided at this level.

For concrete implementations of this class see the below noted IlpBackground implementations.

With regards to the ability to add and remove IlvManagerLayers programatically the following should be noted:

  1. Background property propagation is also handled for IlvManagerLayers added to background programatically. So the properties of the IlpBackground (like visibility) are inherited and propagated to the added layers
  2. The current implementation will not restore the added IlvManagerLayers during a background reload. This case should be handled by adding additional IlpAbstractIVLBackground that points to the IVL files that represent the additional IlvManagerLayers. Or by re-adding the additional IlvManagerLayers after the background has been reloaded.

Since:
JViews 7.5
See Also:
IlpIVLFrameworkBackground, IlpIVLMapBackground

Field Summary
static String MAP_THEMED_PROPERTY
          The map themed property.
static int numberOfPaddingLayers
          Determines the number of IlvManagerLayer instances that should be used to pad the IlvManager being handled before reading and IVL file in.
 
Fields inherited from class ilog.cpl.graph.background.IlpAbstractBackground
managerLayers
 
Fields inherited from interface ilog.cpl.graph.background.IlpBackground
LOAD_ON_DEMAND_PROPERTY, THREADED_PROPERTY, URL_PROPERTY, VISIBLE_PROPERTY
 
Constructor Summary
IlpAbstractIVLBackground()
          Sets the default property values.
 
Method Summary
 void addManagerLayer(IlvManagerLayer layer, int index, IlpViewsView view)
          Adds an IlvManagerLayer to this background at the specified index.
 void create(IlvManager manager, int index, IlpViewsView view)
          Invokes super implementation and handles internal structures.
 void dispose(IlvManager manager, IlpViewsView view)
          Calls the super implementation and then disposes internal structure.
 boolean isMapThemed()
          Returns whether or not this background is using Map Themes.
 void removeManagerLayer(int index, IlpViewsView view)
          Removes the IlvManagerLayer positioned at the specified index from this background.
 void setMapThemed(boolean mapThemed)
          Sets whether or not this background is using Map Themes.
 
Methods inherited from class ilog.cpl.graph.background.IlpAbstractBackground
addLayer, addLayers, addPropertyChangeListener, endBatch, getManagerLayer, getManagerLayers, getManagerLayersCount, getProperties, getProperty, getUrl, isLoadOnDemand, isThreaded, isVisible, removeLayer, removeLayers, removePropertyChangeListener, setLoadOnDemand, setProperty, setThreaded, setUrl, setVisible, startBatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numberOfPaddingLayers

public static int numberOfPaddingLayers
Determines the number of IlvManagerLayer instances that should be used to pad the IlvManager being handled before reading and IVL file in.

Internal method or field: do not use!

MAP_THEMED_PROPERTY

public static final String MAP_THEMED_PROPERTY
The map themed property. It can be used to retrieve value of this property. It holds a Boolean.

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

Contains the Boolean that determines if this IlpAbstractIVLBackground uses a Map Theme. When specifying an IVL background via CSS, if the value of this property is set to true, an IlpIVLMapBackground will be used to represent the background, otherwise an IlpIVLFrameworkBackground is used.

See Also:
Constant Field Values
Constructor Detail

IlpAbstractIVLBackground

public IlpAbstractIVLBackground()
Sets the default property values.

Method Detail

isMapThemed

public boolean isMapThemed()
Returns whether or not this background is using Map Themes.

Defaults to false.

Returns:
true if it is and false otherwise.

setMapThemed

public void setMapThemed(boolean mapThemed)
Sets whether or not this background is using Map Themes.

Parameters:
mapThemed - true to use and false otherwise.
Internal method or field: do not use!

create

public void create(IlvManager manager,
                   int index,
                   IlpViewsView view)
            throws IlpBackgroundHandlingException
Invokes super implementation and handles internal structures.

Subclasses overriding this method must issue a super.create call.

Specified by:
create in interface IlpBackground
Overrides:
create in class IlpAbstractBackground
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.
See Also:
IlpAbstractBackground.create(ilog.views.IlvManager, int, ilog.cpl.graphic.views.IlpViewsView)

dispose

public void dispose(IlvManager manager,
                    IlpViewsView view)
             throws IlpBackgroundHandlingException
Calls the super implementation and then disposes internal structure.

Subclasses overriding this method must issue a super.dispose call.

Specified by:
dispose in interface IlpBackground
Overrides:
dispose in class IlpAbstractBackground
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.
See Also:
IlpAbstractBackground.dispose(ilog.views.IlvManager, ilog.cpl.graphic.views.IlpViewsView)

addManagerLayer

public void addManagerLayer(IlvManagerLayer layer,
                            int index,
                            IlpViewsView view)
                     throws IlpBackgroundHandlingException
Adds an IlvManagerLayer to this background at the specified index.

The IlvManagerLayer can already contain graphics. If it is indeed the case, the graphics in the layer will be incorporated into the appropriate structures of this background and removed from any pre-existing structures (like any given IlvManager with which it may have been created).

Parameters:
layer - the layer to be added.
index - must be a positive integer. If the index provided is equal or greater than the layer count, then the provided layer is added to the next available index in an incremental fashion. The index is zero based.
view - The view in which the background shall be displayed.
Throws:
IlpBackgroundHandlingException - if it cannot handle the request.

removeManagerLayer

public void removeManagerLayer(int index,
                               IlpViewsView view)
                        throws IlpBackgroundHandlingException
Removes the IlvManagerLayer positioned at the specified index from this background.

Parameters:
index - must be a positive integer that is less than the layer count. The index is zero based.
view - The view in which the background is displayed.
Throws:
IlpBackgroundHandlingException - if it cannot handle the request.


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