Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » figure's border color in GMF 2.2
figure's border color in GMF 2.2 [message #215746] Sat, 17 January 2009 15:39 Go to next message
Seweryn Niemiec is currently offline Seweryn NiemiecFriend
Messages: 80
Registered: July 2009
Member
Hi,

It looks like GMF 2.2 has a new philosophy for foreground color
handling. I used to leave color selection for users and provide defaults
via customized view factory. Something like this:

@Override
protected void initializeFromPreferences(View view) {
super.initializeFromPreferences(view);
LineStyle linestl = (LineStyle)view.getStyle(
NotationPackage.Literals.LINE_STYLE);
linestl.setLineColor(
FigureUtilities.RGBToInteger(color).intValue());
}

But now it doesn't work. What I mean by "doesn't work":
- I can't change FG color from Properties/Appearance (no effect)
- code in initializeFromPreferences changes only color
of the line between node's label and compartment (not
node's border)
- mindmap (CVS HEAD) example suffers from the same problem.
link to screenshot:
http://img99.imageshack.us/img99/8443/screenshotresource45de fum2.png

Is this a GMF bug or I have missed something?

--
Greetings,
Seweryn
Re: figure's border color in GMF 2.2 [message #217042 is a reply to message #215746] Mon, 02 February 2009 09:57 Go to previous messageGo to next message
Seweryn Niemiec is currently offline Seweryn NiemiecFriend
Messages: 80
Registered: July 2009
Member
Any idea?

Does anyone create editor based on GMF 2.2? Do you have any problems
with figures' colors?

Seweryn Niemiec wrote:
> Hi,
>
> It looks like GMF 2.2 has a new philosophy for foreground color
> handling. I used to leave color selection for users and provide defaults
> via customized view factory. Something like this:
>
> @Override
> protected void initializeFromPreferences(View view) {
> super.initializeFromPreferences(view);
> LineStyle linestl = (LineStyle)view.getStyle(
> NotationPackage.Literals.LINE_STYLE);
> linestl.setLineColor(
> FigureUtilities.RGBToInteger(color).intValue());
> }
>
> But now it doesn't work. What I mean by "doesn't work":
> - I can't change FG color from Properties/Appearance (no effect)
> - code in initializeFromPreferences changes only color
> of the line between node's label and compartment (not
> node's border)
> - mindmap (CVS HEAD) example suffers from the same problem.
> link to screenshot:
> http://img99.imageshack.us/img99/8443/screenshotresource45de fum2.png
>
> Is this a GMF bug or I have missed something?

--
Greetings,
Seweryn
Re: figure's border color in GMF 2.2 [message #659070 is a reply to message #215746] Thu, 10 March 2011 21:21 Go to previous messageGo to next message
Thomas Buchmann is currently offline Thomas BuchmannFriend
Messages: 53
Registered: November 2010
Member
I have exactly the same problem. I'm also searching for a solution for it.
Re: figure's border color in GMF 2.2 [message #659162 is a reply to message #659070] Fri, 11 March 2011 10:30 Go to previous message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 263
Registered: March 2010
Senior Member
HI,

I got the same problem and i solve it by commenting the refreshFontColor() in the XXXvalueEditpart.refreshVisuals() method correspnding to teh edit part you want to change its foreground.

Quote:

protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
refreshFont();
//refreshFontColor();
refreshUnderline();
refreshStrikeThrough();
}



Previous Topic:Custom Editpart events: Resize of Parent vs. Movement of child
Next Topic:Change title position in the Palette
Goto Forum:
  


Current Time: Thu Dec 18 12:31:17 GMT 2014

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

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