Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Resizing of nodes
Resizing of nodes [message #1062588] Sun, 09 June 2013 10:29 Go to next message
Eclipse UserFriend
Hi,

I added preferredSize attributes to my nodes which works fine so far. The problem then is when a label is growing larger than the preferredSize.dx attribute of the containing node, this node isn't resizing anymore:

index.php/fa/15204/0/

Is there a way to enable the resizing feature of nodes with preferredsize attribute?
Re: Resizing of nodes [message #1062636 is a reply to message #1062588] Mon, 10 June 2013 04:26 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

did you try out to use minimum size instead of preferred size?

Ralph
Re: Resizing of nodes [message #1062710 is a reply to message #1062636] Mon, 10 June 2013 09:03 Go to previous messageGo to next message
Eclipse UserFriend
The problem is when I use something else then preferredSize, the vertical margin is too high (red marker):

index.php/fa/15218/0/

Another problem then is when I define a MaximumSize for a node, it doens't seems to work:

index.php/fa/15219/0/

[Updated on: Mon, 10 June 2013 11:05] by Moderator

Re: Resizing of nodes [message #1064413 is a reply to message #1062710] Wed, 19 June 2013 03:12 Go to previous messageGo to next message
Eclipse UserFriend
Hi Phil,
The label there is places in a Rounded Rectangle(as seen from the picture). Is this right? I faced also this problem and the solution was to use a Custom Figure for this label with the following Qualified Class Name : org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel and as a child I added a Custom Attribute : name - textWrap ; value - true.
This should work in a Rounded Rectangle.
You can use also Insets ( Left 5 , Right 5 ) to let some space until the rectangle line
Re: Resizing of nodes [message #1065348 is a reply to message #1064413] Tue, 25 June 2013 07:41 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

Just would like to add, that since GMF 3.0, you don't need to use custom figure to allow configuration of non-modeled properties via custom attributes -- all figures now support adding CustomAttributes with the same attribute configuration generated for all cases.

So the standard (non-custom) Label with CustomAttribute {name: textWrap, value: true } should work as well.

Regards,
Michael
Re: Resizing of nodes [message #1065373 is a reply to message #1065348] Tue, 25 June 2013 09:28 Go to previous messageGo to next message
Eclipse UserFriend
Hi Michael,

You are right, I tried this also and CustomAttribute for Label is working.
Re: Resizing of nodes [message #1065623 is a reply to message #1065373] Wed, 26 June 2013 14:18 Go to previous message
Eclipse UserFriend
Thx for your suggestions. The CustomAttributes hasn't worked for me, because of my preferredSize attribute..
But removing the preferedSize attribute and changing the method createNodePlate() in the corresponding EditPart has done the trick for.
Previous Topic:One editor for multiple ecore models
Next Topic:Gradient feature of Node
Goto Forum:
  


Current Time: Tue Jul 08 01:29:03 EDT 2025

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

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

Back to the top