Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Bacground colour in GEF, behind the grid
Bacground colour in GEF, behind the grid [message #244687] Tue, 29 July 2008 08:19 Go to next message
Graham is currently offline GrahamFriend
Messages: 9
Registered: July 2009
Junior Member
I have been trying to set the background colour in a GEF editor and have
tried two different ways. They both change the colour OK except that the
grid is obliterated. I am using the grid as per the Logic Diagram example.

So far I have tried in LogicEditor...
getEditor().setBackground(Color)

and I have also tried setting the background colour in
LogicDiagramEditPart in the createFigure() method.


Is there a figure or composite where I can set the background colour which
is underneath the grid?
Re: Bacground colour in GEF, behind the grid [message #244713 is a reply to message #244687] Tue, 29 July 2008 10:13 Go to previous message
Graham is currently offline GrahamFriend
Messages: 9
Registered: July 2009
Junior Member
Ooops, I have now found some posts on this, although I am having
difficulty understanding them.

It seems as if I need to re-arrange the order in which the layers are
added to make the grid layer appear above the background image, but below
all the child edit parts. I am guessing that I will need to make the
change in my root edit part's createImage() method, but I can't seem to
find the existing Grid Layer to move?

Where is the original grid layer created in the LogicDiagram example?

I have found a reference to the action which toggles the grid's visibility
(GEFActionConstants.TOGGLE_GRID_VISIBILITY) but I cannot seem to find the
grid layer itself, nor anything which links the action in the contributor
to a particular grid layer.

Also, one post mentions that a root edit part will have a layer called
GRID_LAYER... Where is this? I can't find it anywhere in
LogicDiagramEditPart? (in fact a text search through the whole logic
example failed to find it).
Previous Topic:Zoom Tool for Zest
Next Topic:Arrow navigation doesn't jump to next parent
Goto Forum:
  


Current Time: Thu Apr 25 19:43:53 GMT 2024

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

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

Back to the top