Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Help needed working with draw2d sample code for graphical tree layout
Help needed working with draw2d sample code for graphical tree layout [message #167674] Thu, 10 February 2005 02:59
Eclipse UserFriend
Originally posted by: kgidley.mail.arc.nasa.gov

Hi,

Just getting my feet wet with draw2d/GEF and I've been trying to modify =
=

the draw2d example code that creates a graphical tree layout. The sampl=
e =

code allows the tree to be displayed top-down or left-to-right - I'm =

trying to get it to display right-to-left to represent a =

playoff/tournament hierarchy.

It seems like I should be able to do the following to create a mirror =

image:

1) determine the maximum 'x' coordinate for all figures,
2) multiply the 'x' coordinates of each figure by -1,
3) then translate all figures by the max found in step one

So, f1 is at (10,x), f2 is at (60, x), and f3 is at (100, x). After my =
=

algorithm, it should be f1 at (90, x), f2 at (40, x) and f3 is at (0, x)=
..

I'm having trouble figuring out where to apply this formula - it seems =

that there are several different layout managers that do various things =
=

and I can't seem to find a place to insert my logic.

Has anyone else tried to modify this code? Any pointers to reference =

materials on how the tree algorithm in the example works would be =

appreciated.

Thanks,

Ken
Previous Topic:Spell checker like decoration (~~~~~~) for org.eclipse.draw2d.Label
Next Topic:Centering text in TextFlow
Goto Forum:
  


Current Time: Fri Mar 29 02:27:08 GMT 2024

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

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

Back to the top