Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Drawing sections of graph at a time
Drawing sections of graph at a time [message #227566] Thu, 07 December 2006 05:55 Go to next message
Eclipse UserFriend
Originally posted by: ruth.hawkins.yahoo.com

Hi

I am a new user of GEF Tool. I want to know how can I efficiently draw
figures only on the visible area of the editor. I am trying here to draw
"RectangleFigure" and the length of the rectangle is pretty huge which
goes well beyond the screen width. Drawing the entire rectangle at once
does not make sense. And also if I want to draw multiple rectangles which
are separated by large distances, then the figures which are not within
the visible range need not be displayed.

Please, provide me with some information on drawing only sections of the
entire graph rather than loading all at once.

Thanks!
Ruth
Re: Drawing sections of graph at a time [message #227574 is a reply to message #227566] Thu, 07 December 2006 22:45 Go to previous messageGo to next message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member
There is a concept of client area for figures. Client area = visible area
of the figure, the area that will be drawn.
Re: Drawing sections of graph at a time [message #227598 is a reply to message #227574] Fri, 08 December 2006 06:22 Go to previous message
Eclipse UserFriend
Originally posted by: ruth.hawkins.yahoo.com

Hi Alex,

Thanks for the suggesstion. I will try to put it for my use.
I have another query though, is it possible to have 'n' data models but
have only 'm' figures, where 'm < n'. I want to build a framework where I
can have a factory of figures and I will request a figure when the area in
which it is required to be drawn is visible.

For example, I have a data model which is required to be mapped to a
RectangleFigure on the graph. This figure needs to be drawn at a location
say x=9000 and y=100. Initially, when the graph is shown at x=0 and y=0
this figure needs not be displayed and hence should not be instantiated.
Though, when the graph will be scrolled horizontally and will reach at the
position x = 9000 a figure will be instantiated and hence drawn at the
required location.

I want such an architecture because in my graph there are huge number of
figures to be drawn and my tool is going out of memory soon with large
number of figures on the graph. So I want to reduce the number of figure
objects created before they are actually displayed.

Thanks!
Keya
Previous Topic:how to use dialogs in editing
Next Topic:Strange problem: Element disappears on second selection of a diagram
Goto Forum:
  


Current Time: Tue Oct 19 10:10:28 GMT 2021

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

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

Back to the top