Hi Thomas,

I am trying to use the code from SVN to use the TextContentElement methods of FlowText but I have a lot of trouble.

1- I have looked at FlowTextElement and still don't see the TextContentElement interface.

2- I have also make a 'batik-all' jar and added to the classpath along with
- js.jar
-xerces_2_5_0.jar
-xalan-2.6.0.jar
-xml-apis-dom3.jar

And while it compiles I get a strange error at run time (see below).

Any idea?

Thanks.

java.lang.Error: Unresolved compilation problems:
    The import org.apache.xml.utils cannot be resolved
    The import org.apache.xpath cannot be resolved
    The import org.apache.xpath cannot be resolved
    The import org.apache.xpath cannot be resolved
    XPath cannot be resolved to a type
    XPathContext cannot b e resolved to a type
    xpath cannot be resolved
    XPath cannot be resolved to a type
    XPath cannot be resolved
    context cannot be resolved
    XPathContext cannot be resolved to a type
    context cannot be resolved
    XObject cannot be resolved to a type
    xpath cannot be resolved
    context cannot be resolved
    xpath cannot be resolved
    XObject cannot be resolved to a type
    XObject cannot be resolved to a type
    XObject cannot be resolved to a type
    XObject cannot be resolved to a type
    XObject cannot be resolved to a type
    PrefixResolver cannot be resolved to a type

    at org.apache.batik.dom.AbstractDocument.<init>(AbstractDocument.java:46)
    at org.apache.batik.dom.AbstractStylableDocument.<init>(AbstractStylableDocument.java:61)
    at org.apache.batik.dom.svg.SVGOMDocument.<init>(SVGOMDocument.java:126)
    at org.apache.batik.dom.svg.SVGDOMImplementation.createDocument(SVGDOMImplementation.java:152)
    at org.apache.batik.dom.util.SAXDocumentFactory.startElement(SAXDocumentFactory.java:595)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentFactory.java:411)
    at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentFactory.java:344)
    at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(SAXSVGDocumentFactory.java:200)
    at test.AppTest.testApp(AppTest.java:25)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at junit.framework.TestCase.runTest(TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)





[EMAIL PROTECTED] wrote:
Hi Oscar,

Oscar Picasso <[EMAIL PROTECTED]> wrote on 01/12/2006 08:14:41 AM:

> Actually I want to something similar to what I do with a regular text
element
> (as I asked in a previous thread): calculate a new font-size to let the
text
> fit on a particular region.


>> 'text content' interfaces from the SVG DOM should be fully
>> functional f or flow text.

> How do I get these interfaces? I have looked at the different FlowXXX
and I
> don't see which are the 'text content' interfaces and their BBox
methods.

You are correct the Flow elements didn't have the TextContent
interfaces. I have fixed this in SVN (it was really just a matter
of basing them on the right baseclass). Sorry about that...

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Yahoo! Photos – Showcase holiday pictures in hardcover
Photo Books. You design it and we’ll bind it!

Reply via email to