Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » draw2d "scrolling monitor" question
draw2d "scrolling monitor" question [message #227675] Sat, 09 December 2006 16:35 Go to next message
Eclipse UserFriend
Originally posted by: jan.infomail.ch

Hi,

I'm writing a process monitor graphing plugin with a functional much
like the graphs in Windows Task Monitor Manager.

I'm using the org.eclipse.draw2d.graph package and have pretty good grip
on using Node and Edge and related classes. So far I managed to draw the
sample points and connected them together.

However, I lack some understanding in how to offset all samples when I
run out of space on x axis. I always draw from left to right and when I
reach the end of the x axis I'd like to scroll all existing figures out
off the left side. What would the preferred way to this?

Thanks

Jan Petersen
Re: draw2d "scrolling monitor" question [message #227741 is a reply to message #227675] Mon, 11 December 2006 03:35 Go to previous message
Eclipse UserFriend
Originally posted by: none.unknown.com

Turn the scrollbars off and start scrolling. That's probably the easiest
and most performance efficient way to do it. Of course, to free up memory,
you might also want to do occasional garbage collection (removing all
figures that are not visible anymore). Keep in mind, however, that you
can't keep growing infinitely. If that is a requirement, at some reasonable
point, you should reset the coordinates so that ints don't overflow and the
canvas doesn't become too huge. Or you can actually move the figures as
time passes. I don't think that'd be very efficient though. You might find
Graphics#translate() useful in certain situations.

"Jan Petersen" <jan@infomail.ch> wrote in message
news:eleole$gj2$1@utils.eclipse.org...
> Hi,
>
> I'm writing a process monitor graphing plugin with a functional much like
> the graphs in Windows Task Monitor Manager.
>
> I'm using the org.eclipse.draw2d.graph package and have pretty good grip
> on using Node and Edge and related classes. So far I managed to draw the
> sample points and connected them together.
>
> However, I lack some understanding in how to offset all samples when I run
> out of space on x axis. I always draw from left to right and when I reach
> the end of the x axis I'd like to scroll all existing figures out off the
> left side. What would the preferred way to this?
>
> Thanks
>
> Jan Petersen
Previous Topic:Problem sizing the LayeredPane
Next Topic:SnapTo : How to find nearest snap to point
Goto Forum:
  


Current Time: Mon Oct 25 02:32:58 GMT 2021

Powered by FUDForum. Page generated in 0.01869 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top