Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » GEF5 Problem Setting Graph Background(I'm unable to set the graph background color nor the background image.)
GEF5 Problem Setting Graph Background [message #1790407] Sat, 09 June 2018 19:14
Mark Fenbers is currently offline Mark FenbersFriend
Messages: 71
Registered: July 2009
Location: Ohio, USA
Similar to a problem from GEF3 from several years ago (see, I'm having trouble setting the graph background with GEF5 to anything but the default white. I'm using the JFace approach (Zest FX), and so I have a custom label provider that implements IGraphAttributesProvider. Therefore, I have an overridden method getGraphAttributes().

Here's what it looks like:

public Map<String, Object> getGraphAttributes() {
Map<String, Object> graphAttributes = new HashMap<>();

graphAttributes.put(IAttributeStore.ATTRIBUTES_PROPERTY, "-fx-background-color:green;");
return graphAttributes;

So, I've tried "-fx-background:green;" as well as "-fx-background-image:url('file:///home/fenbers/myImage.png');" but nothing seems to work. I *did* add a println(); statement to verify that this getGraphAttributes() method is even being called. It is.

What am I doing wrong?
Previous Topic:Set Figure ClientArea
Next Topic:GEF5 Problem Setting Graph Background
Goto Forum:

Current Time: Sun Sep 23 09:56:16 GMT 2018

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

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

Back to the top