ilog.views.svg
Class SVGStreamFactory

java.lang.Object
  extended by ilog.views.svg.SVGStreamFactory
All Implemented Interfaces:
IlvManagerStreamFactory

public class SVGStreamFactory
extends Object
implements IlvManagerStreamFactory

This class allows an IlvManager to read and write an XML file using SVG grammar specifications. To achieve this, it uses SVGInputStream and SVGOutputStream instances. For example, to save an IlvManager as SVG you can proceed as below:


 SVGStreamFactory factory = new SVGStreamFactory();
 // eventually configure your factory
 myManager.setStreamFactory(factory);
 myManager.write("file.svg");
 

Warning: Beginning with JViews 6.0, this class does no longer inherit from SVGDocumentBuilderConfigurator. You have to use methods on the result of getBuilderConfigurator() instead of methods on the class.

See Also:
SVGInputStream, SVGOutputStream

Constructor Summary
SVGStreamFactory()
          Builds an SVGStreamFactory instance with default SVGDocumentReaderConfigurator and SVGDocumentBuilderConfigurator.
SVGStreamFactory(SVGDocumentReaderConfigurator rc, SVGDocumentBuilderConfigurator bc)
          Builds an SVGStreamFactory instance configured with an SVGDocumentReaderConfigurator and an SVGDocumentBuilderConfigurator.
 
Method Summary
 IlvInputStream createInputStream(InputStream stream)
          By default, this method returns an SVGInputStream to read an SVG file.
 IlvOutputStream createOutputStream(OutputStream stream)
          By default, this method returns an SVGOutputStream to write to an SVG file.
protected  SVGDocumentBuilder createSVGDocumentBuilder()
          Creates an SVGDocumentBuilder that will be used by the SVGOutputStream to build an SVGDocument from the contents of an IlvManager.
protected  SVGDocumentReader createSVGDocumentReader()
          Creates an SVGDocumentReader that will be used by the SVGInputStream to fill an IlvManager from the contents of an SVGDocument
 SVGDocumentBuilderConfigurator getBuilderConfigurator()
          Returns the SVGDocumentBuilderConfigurator.
 SVGDocumentReaderConfigurator getReaderConfigurator()
          Returns the SVGDocumentReaderConfigurator.
 String getUserStyleSheetURL()
          Deprecated. Beginning with JViews 5.5 use SVGDocumentReaderConfigurator.getUserStyleSheetURL() instead on getReaderConfigurator()
 boolean isIVLMode()
          Returns true if using the standard IVL format.
 boolean isQuadTreeEnabled()
          Deprecated. Beginning with JViews 5.5 use SVGDocumentReaderConfigurator.setQuadTreeEnabled(boolean) instead
 void setIVLMode(boolean ivl)
          Allows you to revert to the standard IVL format.
 void setQuadTreeEnabled(boolean value)
          Deprecated. Beginning with JViews 5.5 use SVGDocumentReaderConfigurator.setQuadTreeEnabled(boolean) instead
 void setUserStyleSheetURL(String url)
          Deprecated. Beginning with JViews 5.5 use SVGDocumentReaderConfigurator.setUserStyleSheetURL(java.lang.String) instead on getReaderConfigurator()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SVGStreamFactory

public SVGStreamFactory()
Builds an SVGStreamFactory instance with default SVGDocumentReaderConfigurator and SVGDocumentBuilderConfigurator.

See Also:
IlvManager.setStreamFactory(ilog.views.io.IlvManagerStreamFactory)

SVGStreamFactory

public SVGStreamFactory(SVGDocumentReaderConfigurator rc,
                        SVGDocumentBuilderConfigurator bc)
Builds an SVGStreamFactory instance configured with an SVGDocumentReaderConfigurator and an SVGDocumentBuilderConfigurator.

Since:
JViews 5.5
See Also:
IlvManager.setStreamFactory(ilog.views.io.IlvManagerStreamFactory)
Method Detail

getReaderConfigurator

public final SVGDocumentReaderConfigurator getReaderConfigurator()
Returns the SVGDocumentReaderConfigurator.

Since:
JViews 5.5

getBuilderConfigurator

public final SVGDocumentBuilderConfigurator getBuilderConfigurator()
Returns the SVGDocumentBuilderConfigurator.

Since:
JViews 5.5

setUserStyleSheetURL

public final void setUserStyleSheetURL(String url)
Deprecated. Beginning with JViews 5.5 use SVGDocumentReaderConfigurator.setUserStyleSheetURL(java.lang.String) instead on getReaderConfigurator()

Sets the URL String to retrieve the user style sheet when importing SVG files. If no protocol is specified, the URL is considered to be relative to the file being read.


getUserStyleSheetURL

public final String getUserStyleSheetURL()
Deprecated. Beginning with JViews 5.5 use SVGDocumentReaderConfigurator.getUserStyleSheetURL() instead on getReaderConfigurator()

Returns the user style sheet's URL.

See Also:
setUserStyleSheetURL(java.lang.String)

setIVLMode

public final void setIVLMode(boolean ivl)
Allows you to revert to the standard IVL format.


isIVLMode

public final boolean isIVLMode()
Returns true if using the standard IVL format.

See Also:
setIVLMode(boolean)

setQuadTreeEnabled

public final void setQuadTreeEnabled(boolean value)
Deprecated. Beginning with JViews 5.5 use SVGDocumentReaderConfigurator.setQuadTreeEnabled(boolean) instead

Enables the quadtree on the IlvManager in which the SVG file will be read. If true, the IlvGraphic in the IlvManager may not be displayed in the correct SVG order. The default is false.


isQuadTreeEnabled

public final boolean isQuadTreeEnabled()
Deprecated. Beginning with JViews 5.5 use SVGDocumentReaderConfigurator.setQuadTreeEnabled(boolean) instead

Returns true if the quadtree is enabled.

See Also:
setQuadTreeEnabled(boolean)

createSVGDocumentBuilder

protected SVGDocumentBuilder createSVGDocumentBuilder()
Creates an SVGDocumentBuilder that will be used by the SVGOutputStream to build an SVGDocument from the contents of an IlvManager.

See Also:
createOutputStream(java.io.OutputStream), SVGDocumentBuilder

createSVGDocumentReader

protected SVGDocumentReader createSVGDocumentReader()
Creates an SVGDocumentReader that will be used by the SVGInputStream to fill an IlvManager from the contents of an SVGDocument

Since:
JViews 5.5
See Also:
createOutputStream(java.io.OutputStream), SVGDocumentBuilder

createOutputStream

public IlvOutputStream createOutputStream(OutputStream stream)
By default, this method returns an SVGOutputStream to write to an SVG file. In IVL mode it returns an instance of IlvOutStream.

Specified by:
createOutputStream in interface IlvManagerStreamFactory
See Also:
createSVGDocumentBuilder()

createInputStream

public IlvInputStream createInputStream(InputStream stream)
By default, this method returns an SVGInputStream to read an SVG file. In IVL mode it returns an instance of IlvInputStream.

Specified by:
createInputStream in interface IlvManagerStreamFactory


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