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: eremchenko.gmail.com

Hello.

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:wizard during command execution
Next Topic:Externalizing Policies
Goto Forum:
  


Current Time: Tue Mar 19 09:12:53 GMT 2024

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

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

Back to the top