Bacground colour in GEF, behind the grid [message #244687] |
Tue, 29 July 2008 04:19  |
Eclipse User |
|
|
|
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 06:13  |
Eclipse User |
|
|
|
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).
|
|
|
Powered by
FUDForum. Page generated in 0.06568 seconds