Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Colors and Fonts for EditParts
Colors and Fonts for EditParts [message #227286] Thu, 23 April 2009 18:42 Go to next message
Eclipse UserFriend
Originally posted by: steve.hostettler.unige.ch

Hi,

I would like to enable editing of font and colors for a figure using the
menu (dropdown and menubar). It's works for some the EditParts that
extend ShapeNodeEditPart but not for those that extend
ConnectionNodeEditPart. I can't figure out where to set this property.

Can anyone tell me where to enable this?

Thank you in advance
Re: Colors and Fonts for EditParts [message #227360 is a reply to message #227286] Fri, 24 April 2009 12:52 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Steve,

Instead of setting some properties to an EditPart I suggest you modifying
corresponding notation model elements. You can call:

<StyleClass> style = View.getStyle(<StyleClass>.class);

and then use
FontStyle/LineStyle methods to mofigy font/color properties of the diagram
elements.

-----------------
Alex Shatalin
Re: Colors and Fonts for EditParts [message #227401 is a reply to message #227360] Fri, 24 April 2009 20:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: steve.hostettler.unige.ch

Thanks for your answer,


Not sure to understand. My problem is not to programatically change
those properties but to enable end-user manipulation of the connections
through the graphical user interface as done for the shapes.

The shape-based figures allow to change their line-color in the GUI
using the Diagram menu or the menu bar but not the connection-based figures.


Thanks again for helping me.
Steve

Alex Shatalin wrote:
> Hello Steve,
>
> Instead of setting some properties to an EditPart I suggest you
> modifying corresponding notation model elements. You can call:
>
> <StyleClass> style = View.getStyle(<StyleClass>.class);
>
> and then use
> FontStyle/LineStyle methods to mofigy font/color properties of the
> diagram elements.
>
> -----------------
> Alex Shatalin
>
>
Re: Colors and Fonts for EditParts [message #227520 is a reply to message #227401] Mon, 27 April 2009 11:28 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Steve,

I can see these menu items available if i select a connection. Steps to repeat:
- open ecore sample diagram
- create two classes and association link in between
- select this link
- see "Line color" drop-down available on diagram toolbar..

-----------------
Alex Shatalin
Previous Topic:NullPointerException when calling validation.
Next Topic:Re: setFont() not working in the createContents() method
Goto Forum:
  


Current Time: Fri Apr 26 21:10:30 GMT 2024

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

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

Back to the top