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 Mising name is currently offline Mark Mising nameFriend
Messages: 73
Registered: July 2009
Location: Ohio, USA
Member
Similar to a problem from GEF3 from several years ago (see https://www.eclipse.org/forums/index.php?t=msg&th=162068&goto=512362&#msg_512362), 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:

@overrride
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?
Mark
Previous Topic:Set Figure ClientArea
Next Topic:Geometric Line Resize
Goto Forum:
  


Current Time: Tue Apr 16 10:14:21 GMT 2024

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

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

Back to the top