You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by "Jakub W. Jozwicki" <ja...@go2.pl> on 2005/12/04 04:26:20 UTC

changing text inside flowPara

I've got SVG document with content:

 <g
     id="infoBaloonContainer">
    <rect
       rx="2.0480058"
       ry="3.774688"
       y="650"
       x="220"
       height="100"
       width="600"
       id="rect13884"
      
style="text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;opacity:1;fill:#ffffe1;fill-opacity:0.0893617;fill-rule:nonzero;stroke:#ffffff;stroke-width:0.94295299;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.22978723;display:block"
       inkscape:label="#rect13884" />
       
    <flowText font-size="12" fill="white" xml:space="preserve"
xmlns="http://xml.apache.org/batik/ext">
        <flowRegion>
	        <rect x="220"  y="650" width="600" height="100"/>
	    </flowRegion>
       
        <flowDiv>
	        <flowPara id="infoBaloon" margin="10"
justification="full">SOME_TEXT_HERE</flowPara>
	    </flowDiv>
    </flowText>    
  </g>

and Java code to change it:

setInfoText(String text)
{
	svg.getElementById("infoBaloon").setTextContent(text);	
}

After setInfoText, getTextContent shows that the text is changed in
DOM tree, however the change is not visible looking at JSVGCanvas.

I can call setInfo text inside new Runnable passed to
canvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(),
but there is no difference.

Am I doing it in a wrong way?

Regards,
Jakub


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: changing text inside flowPara

Posted by th...@kodak.com.
Hi Jakub,

"Jakub W. Jozwicki" <ja...@go2.pl> wrote on 12/05/2005 10:35:23 PM:

> Hmm. I've got version 20051124 from SVN. Modifying text inside 
<flowPara> 
> doesn't work. With <text> it is quite slow, but there is noticeable 
change on 
> JSVGCanvas. I will try to do some profiling.

   I just tried this and it worked fine for me.  Can you post a small 
example
that works for you.  BTW my code was:
 
onclick="document.getElementById('foo').appendChild(document.createTextNode( 
'Blah Blah'))"

   Where I tried id="foo" on both a flowSpan and a flowPara element.

   I don't think this has changed since 11/24.

> Dnia poniedziałek, 5 grudnia 2005 02:34, thomas.deweese@kodak.com 
napisał:

> >    I don't think the 1.6 release supported dynamic modification of the
> > flowText contents.
> > I'm pretty sure that the SVN version currently does support dynamic
> > modification.
> >
> > "Jakub W. Jozwicki" <ja...@go2.pl> wrote on 12/03/2005 10:26:20 PM:
> > > I've got SVG document with content:
> > >
> > >  <g
> > >      id="infoBaloonContainer">
> > >     <rect
> > >        rx="2.0480058"
> > >        ry="3.774688"
> > >        y="650"
> > >        x="220"
> > >        height="100"
> > >        width="600"
> > >        id="rect13884"
> >
> > 
style="text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:sta
> >rt;
> >
> > > 
opacity:1;fill:#ffffe1;fill-opacity:0.0893617;fill-rule:nonzero;stroke:
> >
> > 
#ffffff;stroke-width:0.94295299;stroke-linecap:round;stroke-linejoin:round;
> >
> > 
stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.22978723;display:b
> >lock"
> >
> > >        inkscape:label="#rect13884" />
> > >
> > >     <flowText font-size="12" fill="white" xml:space="preserve"
> > > xmlns="http://xml.apache.org/batik/ext">
> > >         <flowRegion>
> > >            <rect x="220"  y="650" width="600" height="100"/>
> > >        </flowRegion>
> > >
> > >         <flowDiv>
> > >            <flowPara id="infoBaloon" margin="10"
> > > justification="full">SOME_TEXT_HERE</flowPara>
> > >        </flowDiv>
> > >     </flowText>
> > >   </g>
> > >
> > > and Java code to change it:
> > >
> > > setInfoText(String text)
> > > {
> > >    svg.getElementById("infoBaloon").setTextContent(text);
> > > }
> > >
> > > After setInfoText, getTextContent shows that the text is changed in
> > > DOM tree, however the change is not visible looking at JSVGCanvas.
> > >
> > > I can call setInfo text inside new Runnable passed to
> > > canvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(),
> > > but there is no difference.
> > >
> > > Am I doing it in a wrong way?
> > >
> > > Regards,
> > > Jakub
> > >
> > >
> > > 
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: 
batik-users-unsubscribe@xmlgraphics.apache.org
> > > For additional commands, e-mail: 
batik-users-help@xmlgraphics.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: 
batik-users-help@xmlgraphics.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: changing text inside flowPara

Posted by "Jakub W. Jozwicki" <ja...@go2.pl>.
Hmm. I've got version 20051124 from SVN. Modifying text inside <flowPara> 
doesn't work. With <text> it is quite slow, but there is noticeable change on 
JSVGCanvas. I will try to do some profiling.

Dnia poniedziałek, 5 grudnia 2005 02:34, thomas.deweese@kodak.com napisał:
> Hi Jakub,
>
>    I don't think the 1.6 release supported dynamic modification of the
> flowText contents.
> I'm pretty sure that the SVN version currently does support dynamic
> modification.
>
> "Jakub W. Jozwicki" <ja...@go2.pl> wrote on 12/03/2005 10:26:20 PM:
> > I've got SVG document with content:
> >
> >  <g
> >      id="infoBaloonContainer">
> >     <rect
> >        rx="2.0480058"
> >        ry="3.774688"
> >        y="650"
> >        x="220"
> >        height="100"
> >        width="600"
> >        id="rect13884"
>
> style="text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:sta
>rt;
>
> > opacity:1;fill:#ffffe1;fill-opacity:0.0893617;fill-rule:nonzero;stroke:
>
> #ffffff;stroke-width:0.94295299;stroke-linecap:round;stroke-linejoin:round;
>
> stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.22978723;display:b
>lock"
>
> >        inkscape:label="#rect13884" />
> >
> >     <flowText font-size="12" fill="white" xml:space="preserve"
> > xmlns="http://xml.apache.org/batik/ext">
> >         <flowRegion>
> >            <rect x="220"  y="650" width="600" height="100"/>
> >        </flowRegion>
> >
> >         <flowDiv>
> >            <flowPara id="infoBaloon" margin="10"
> > justification="full">SOME_TEXT_HERE</flowPara>
> >        </flowDiv>
> >     </flowText>
> >   </g>
> >
> > and Java code to change it:
> >
> > setInfoText(String text)
> > {
> >    svg.getElementById("infoBaloon").setTextContent(text);
> > }
> >
> > After setInfoText, getTextContent shows that the text is changed in
> > DOM tree, however the change is not visible looking at JSVGCanvas.
> >
> > I can call setInfo text inside new Runnable passed to
> > canvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(),
> > but there is no difference.
> >
> > Am I doing it in a wrong way?
> >
> > Regards,
> > Jakub
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: changing text inside flowPara

Posted by th...@kodak.com.
Hi Jakub,

   I don't think the 1.6 release supported dynamic modification of the 
flowText contents.
I'm pretty sure that the SVN version currently does support dynamic 
modification.


"Jakub W. Jozwicki" <ja...@go2.pl> wrote on 12/03/2005 10:26:20 PM:

> I've got SVG document with content:
> 
>  <g
>      id="infoBaloonContainer">
>     <rect
>        rx="2.0480058"
>        ry="3.774688"
>        y="650"
>        x="220"
>        height="100"
>        width="600"
>        id="rect13884"
> 
> 
style="text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;
> opacity:1;fill:#ffffe1;fill-opacity:0.0893617;fill-rule:nonzero;stroke:
> 
#ffffff;stroke-width:0.94295299;stroke-linecap:round;stroke-linejoin:round;
> 
stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.22978723;display:block"
>        inkscape:label="#rect13884" />
> 
>     <flowText font-size="12" fill="white" xml:space="preserve"
> xmlns="http://xml.apache.org/batik/ext">
>         <flowRegion>
>            <rect x="220"  y="650" width="600" height="100"/>
>        </flowRegion>
> 
>         <flowDiv>
>            <flowPara id="infoBaloon" margin="10"
> justification="full">SOME_TEXT_HERE</flowPara>
>        </flowDiv>
>     </flowText> 
>   </g>
> 
> and Java code to change it:
> 
> setInfoText(String text)
> {
>    svg.getElementById("infoBaloon").setTextContent(text); 
> }
> 
> After setInfoText, getTextContent shows that the text is changed in
> DOM tree, however the change is not visible looking at JSVGCanvas.
> 
> I can call setInfo text inside new Runnable passed to
> canvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(),
> but there is no difference.
> 
> Am I doing it in a wrong way?
> 
> Regards,
> Jakub
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org