Thanks Thomas and Frederik.
Since I'm replying to both of you rather than picking one I'll just
reply to myself.

Someone reminded me that one of the editors I use checks for a new file
when the window regains focus.
So I did a couple of tests and it seems that it checks the filesystem
every 5 seconds or so while it had focus but checks instantly when it
gains focus.  I think I may implement something like that.  Plus maybe
listening for pings on a port like Thomas suggested.  If I have all
three of those things going it should be pretty smooth.

As for the JSVGCanvas are those keys customizable?
I'd like a middle drag to pan, a right drag up/down to zoom in/out, and
a left drag to do a box zoom.
Maybe a middle click to reset.
I'd try to get the same behavior as some of our other viewers we use
here.

Thanks again,
~Eric

> -----Original Message-----
> From: Frederich, Eric P21322 
> Sent: Monday, October 22, 2007 3:20 PM
> To: [email protected]
> Subject: need some suggestions
> 
> I am writing a program in Java.
> 
> In the end I need a program which will generate vector graphics.  This
> program will need to save the graphics in SVG format as well as a
> rasterized version.
> 
> These graphics need to be viewed in a standalone viewer which can pan
> and zoom.  This viewer will need to update automatically when the
> program is re-ran.
> 
> I am hoping that Batik can help me out with a lot of this but 
> I'm having
> some trouble making decisions.
> What would be the best way for my program to generate these graphics?
> Should I use a StringBuilder and keep adding my <rect />'s or should I
> use a Document class?
> 
> On the viewer side, is it possible to get panning and zooming working
> with a JSVGCanvas?  I haven't seen any examples of this.
> And as for the viewer updating...Should the program that is generating
> the graphics notify the viewer that the file has been updated through
> RMI?  Should the viewer periodically check the filesystem?
> Having an RMI client/server setup seems like overkill and checking the
> filesystem every second seems like a bad idea too.
> I've seen text editors that know when a file has been modified
> externally.  Any ideas how they work?
> 
> Thanks for the help,
> ~Eric
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: 
> [EMAIL PROTECTED]
> 
> 

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

Reply via email to