Draw2D: figures with real coordinates. [message #234258] |
Thu, 17 May 2007 12:24 |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.02157 seconds