ilog.cpl.graph.background
Class IlpXMLBackgroundFactory

java.lang.Object
  extended by ilog.cpl.graph.background.IlpXMLBackgroundFactory
All Implemented Interfaces:
IlpBackgroundFactory

public class IlpXMLBackgroundFactory
extends Object
implements IlpBackgroundFactory

Reads an XML file that describes a background map with parameters, and creates an IlpBackground representing the background and its parameters.

It can be represented through a piece of XML such as

 <background type="ShapeFile">
   <property name="loadOnDemand">true</property>
   <property name="url">data/world.shp</property>
 </background>
 

A type or class attribute should be specified. The value of the type attribute should be one of IVL, Image, ImageTile, SVG, MIDMIF, ShapeFile. The value of the class attribute should be the name of a class that implements IlpBackground and has a public no-argument constructor.

The allowed properties and their values depend on the type or class. See the corresponding classes: IlpIVLBackground, IlpImageBackground, IlpImageTileBackground, IlpSVGBackground, IlpMIDMIFBackground, IlpShapeFileBackground. All background types support a property named "url". The value of this property is the URL of the designated image or data file.

Since:
JViews 7.5

Constructor Summary
IlpXMLBackgroundFactory()
           
 
Method Summary
 IlpBackground createBackground(IlpViewsView view, URL XMLfileURL)
          Creates an IlpBackground representing the contents of the given XML file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlpXMLBackgroundFactory

public IlpXMLBackgroundFactory()
Method Detail

createBackground

public IlpBackground createBackground(IlpViewsView view,
                                      URL XMLfileURL)
                               throws IlpBackgroundHandlingException
Creates an IlpBackground representing the contents of the given XML file.

Specified by:
createBackground in interface IlpBackgroundFactory
Parameters:
view - the view in which the background will be displayed.
XMLfileURL - the URL of interest.
Returns:
an IlpBackground representing the given file.
Throws:
IlpBackgroundHandlingException - in case a problem occurs.


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