Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to control the adding of child figures
How to control the adding of child figures [message #215339] Sun, 30 April 2006 11:19
Johannes Herr is currently offline Johannes HerrFriend
Messages: 1
Registered: July 2009
Junior Member
Hi

I am new to GEF and currently working on a editor similar to an uml class
diagram editor. That is I have 'class'-figures, which contain lists of
'method'-figures. What I would like to do, is set the background color of
the 'method'-figure-children to alternating values (similar to the lines
in a propertysheet).

For example:
- classname -
# method1 (blue)
# method2 (red)
# method3 (blue)
# method4 (red)

My problem is, that since the 'methods' are model children of 'class', gef
adds them automatically to the 'class' figure, without me being able to
influence it.
As a way to get it working I overrode the add method in 'class'-figure and
set the color of the 'method'-figures before adding them. But this
certainly is a terrible hack. So my question is, what would be a clean way
to achieve this.

I have a similar problem when I want to add an additional picture to the
'class'-figure. I would like to have the picture aligned centered and the
methods left aligned, but once again I would need a hook to influence the
adding of child-figures.
'addChildVisual' looks like like a place to do that, but the javadoc seems
to discourage using it.

Thank you for your help.

Johannes Herr
Previous Topic:Help: Error , thread with GEF
Next Topic:Drag and Drop issue --TransferDropTargetListener
Goto Forum:
  


Current Time: Thu Apr 25 05:37:11 GMT 2024

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

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

Back to the top