Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Draw2D: figures with real coordinates.
Draw2D: figures with real coordinates. [message #234258] Thu, 17 May 2007 12:24
Eclipse UserFriend
Originally posted by:


I have many rectangles with real (double) coordinates and some additional
data associated with each rectangle. I want to draw them on the screen
with additional information inside tooltips that will appear when mouse
cursor points to some rectangle.

The problem is that coordinates are real numbers and rectangles vary in
size very much (for example, from 0.001 to 1000.0). So I need the ability
to zoom to some area and to scroll it with mouse gestures.

Is it possible to use in my situation draw2d class RectangleFigure? It
keeps only integer coordinates (bounds). May be I should write my own
layout manager with constraints that will contain real coordinates? Or
there is a solution with draw2d classes only?

What is the best way to implement zoom and scroll? Suppose I know the area
(rectangle with real coordinates) and want to view only figures that are
inside (or intersect) this area. I have found FigureCanvas, Viewport and
ScalableLayeredPane classes. It seems that they can help me. But how can
they be used together?

Thanks in advance.
Previous Topic:Relayout the entire editor?
Next Topic:Externalizing Policies
Goto Forum:

Current Time: Tue Aug 09 11:21:31 GMT 2022

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

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

Back to the top