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 Shekhar Bhati <sh...@gmail.com> on 2009/05/29 09:40:43 UTC

Document doesnt get refreshed until I take mouse on it

Hi ,

I am using Batik 1.7 in my application.
I have two frames , top one for filtering and second frame contains my SVG
document.
I have  a rectangle and description containing three fields.
Task is that when I change some filter then the derscription should appear
or hide as per the filter,eg. if I select "none" then the description should
disappear.
What I am doing is that I use CSS and display it as none when I select
"none" so the description does not appears.
The problem is that it works only if I take mouse over my document and I
want it to appear as I change the filter.

Any suggestions?

Thanks & regards,
Shekhar

Re: Document doesnt get refreshed until I take mouse on it

Posted by Abraham Rodriguez Mota <ab...@gmail.com>.
Hi,

Well, as you don't provide more information about your implementation, I
guess it will be enough to do something like this inside your instance of
JSVGCanvas and call the method: whenever you update the graph.

private void updatingGraph(){

UpdateManager um = getUpdateManager();

um.getUpdateRunnableQueue().invokeLater(
*new* Runnable() {

*public* *void* run() {

initCanvas();

}

});
}

Where initCanvas() contains the specific code for whatever action you are
performing (create nodes, add atrributes, etc).

All the best
Abraham
On Fri, May 29, 2009 at 1:55 PM, Shekhar Bhati <sh...@gmail.com>wrote:

> Hi Abraham,
> Thanks for your instant reply.
> I have one applet and one class extending JSVg Canvas which contains all
> the code rendering  the document.The document says I have to write that
> updatemanager code inside GVT Renderedcompleted method, which in my case is
> in class extending JSVGCanvas.
> Even I dont have any init() method.So what exactly should I put in
>
> UpdateManager um = getUpdateManager();
>
> um.getUpdateRunnableQueue().invokeLater(
> *new* Runnable() {
>
> *public* *void* run() {
>
> initCanvas();
>
> }
>
> });
> method and where should I write it.
>
>   On Fri, May 29, 2009 at 2:31 PM, Abraham Rodriguez Mota <
> abraham.rdgz@gmail.com> wrote:
>
>> Hi Shekhar,
>>
>> Are you including your update action inside the thread of the
>> updateManager?
>> Have a look to the batik website:
>> http://xmlgraphics.apache.org/batik/faq.html#display-does-not-update
>>
>> I hope it helps
>>
>> Abraham
>>
>>   On Fri, May 29, 2009 at 8:40 AM, Shekhar Bhati <shekhar.bhati@gmail.com
>> > wrote:
>>
>>> Hi ,
>>>
>>> I am using Batik 1.7 in my application.
>>> I have two frames , top one for filtering and second frame contains my
>>> SVG document.
>>> I have  a rectangle and description containing three fields.
>>> Task is that when I change some filter then the derscription should
>>> appear or hide as per the filter,eg. if I select "none" then the description
>>> should disappear.
>>> What I am doing is that I use CSS and display it as none when I select
>>> "none" so the description does not appears.
>>> The problem is that it works only if I take mouse over my document and I
>>> want it to appear as I change the filter.
>>>
>>> Any suggestions?
>>>
>>> Thanks & regards,
>>> Shekhar
>>>
>>
>>
>

Re: Document doesnt get refreshed until I take mouse on it

Posted by Shekhar Bhati <sh...@gmail.com>.
Hi Abraham,
Thanks for your instant reply.
I have one applet and one class extending JSVg Canvas which contains all the
code rendering  the document.The document says I have to write that
updatemanager code inside GVT Renderedcompleted method, which in my case is
in class extending JSVGCanvas.
Even I dont have any init() method.So what exactly should I put in

UpdateManager um = getUpdateManager();

um.getUpdateRunnableQueue().invokeLater(*new* Runnable() {

*public* *void* run() {

initCanvas();

}

});
method and where should I write it.

On Fri, May 29, 2009 at 2:31 PM, Abraham Rodriguez Mota <
abraham.rdgz@gmail.com> wrote:

> Hi Shekhar,
>
> Are you including your update action inside the thread of the
> updateManager?
> Have a look to the batik website:
> http://xmlgraphics.apache.org/batik/faq.html#display-does-not-update
>
> I hope it helps
>
> Abraham
>
>   On Fri, May 29, 2009 at 8:40 AM, Shekhar Bhati <sh...@gmail.com>wrote:
>
>> Hi ,
>>
>> I am using Batik 1.7 in my application.
>> I have two frames , top one for filtering and second frame contains my SVG
>> document.
>> I have  a rectangle and description containing three fields.
>> Task is that when I change some filter then the derscription should appear
>> or hide as per the filter,eg. if I select "none" then the description should
>> disappear.
>> What I am doing is that I use CSS and display it as none when I select
>> "none" so the description does not appears.
>> The problem is that it works only if I take mouse over my document and I
>> want it to appear as I change the filter.
>>
>> Any suggestions?
>>
>> Thanks & regards,
>> Shekhar
>>
>
>

Re: Document doesnt get refreshed until I take mouse on it

Posted by Abraham Rodriguez Mota <ab...@gmail.com>.
Hi Shekhar,

Are you including your update action inside the thread of the updateManager?
Have a look to the batik website:
http://xmlgraphics.apache.org/batik/faq.html#display-does-not-update

I hope it helps

Abraham

On Fri, May 29, 2009 at 8:40 AM, Shekhar Bhati <sh...@gmail.com>wrote:

> Hi ,
>
> I am using Batik 1.7 in my application.
> I have two frames , top one for filtering and second frame contains my SVG
> document.
> I have  a rectangle and description containing three fields.
> Task is that when I change some filter then the derscription should appear
> or hide as per the filter,eg. if I select "none" then the description should
> disappear.
> What I am doing is that I use CSS and display it as none when I select
> "none" so the description does not appears.
> The problem is that it works only if I take mouse over my document and I
> want it to appear as I change the filter.
>
> Any suggestions?
>
> Thanks & regards,
> Shekhar
>