public class SVGStreamFactory extends Object implements IlvManagerStreamFactory
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.
SVGInputStream
,
SVGOutputStream
Constructor and Description |
---|
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 . |
Modifier and Type | Method and Description |
---|---|
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() |
public SVGStreamFactory()
SVGStreamFactory
instance with default
SVGDocumentReaderConfigurator
and SVGDocumentBuilderConfigurator
.public SVGStreamFactory(SVGDocumentReaderConfigurator rc, SVGDocumentBuilderConfigurator bc)
SVGStreamFactory
instance configured with
an SVGDocumentReaderConfigurator
and
an SVGDocumentBuilderConfigurator
.IlvManager.setStreamFactory(ilog.views.io.IlvManagerStreamFactory)
public final SVGDocumentReaderConfigurator getReaderConfigurator()
SVGDocumentReaderConfigurator
.public final SVGDocumentBuilderConfigurator getBuilderConfigurator()
SVGDocumentBuilderConfigurator
.@Deprecated public final void setUserStyleSheetURL(String url)
SVGDocumentReaderConfigurator.setUserStyleSheetURL(java.lang.String)
instead
on getReaderConfigurator()
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.@Deprecated public final String getUserStyleSheetURL()
SVGDocumentReaderConfigurator.getUserStyleSheetURL()
instead
on getReaderConfigurator()
URL
.setUserStyleSheetURL(java.lang.String)
public final void setIVLMode(boolean ivl)
public final boolean isIVLMode()
true
if using the standard IVL format.setIVLMode(boolean)
@Deprecated public final void setQuadTreeEnabled(boolean value)
SVGDocumentReaderConfigurator.setQuadTreeEnabled(boolean)
insteadIlvManager
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
.@Deprecated public final boolean isQuadTreeEnabled()
SVGDocumentReaderConfigurator.setQuadTreeEnabled(boolean)
insteadtrue
if the quadtree is enabled.setQuadTreeEnabled(boolean)
protected SVGDocumentBuilder createSVGDocumentBuilder()
SVGDocumentBuilder
that will be used by the
SVGOutputStream
to build an SVGDocument
from
the contents of an IlvManager
.protected SVGDocumentReader createSVGDocumentReader()
SVGDocumentReader
that will be used by the
SVGInputStream
to fill an IlvManager
from
the contents of an SVGDocument
createOutputStream(java.io.OutputStream)
,
SVGDocumentBuilder
public IlvOutputStream createOutputStream(OutputStream stream)
SVGOutputStream
to write to an SVG file.
In IVL mode it returns an instance of IlvOutStream
.createOutputStream
in interface IlvManagerStreamFactory
createSVGDocumentBuilder()
public IlvInputStream createInputStream(InputStream stream)
SVGInputStream
to read an SVG file.
In IVL mode it returns an instance of IlvInputStream
.createInputStream
in interface IlvManagerStreamFactory
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.