Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Resizing of nodes
Resizing of nodes [message #1062588] Sun, 09 June 2013 14:29 Go to next message
Phil H is currently offline Phil HFriend
Messages: 267
Registered: November 2012
Senior Member
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 08:26 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
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 13:03 Go to previous messageGo to next message
Phil H is currently offline Phil HFriend
Messages: 267
Registered: November 2012
Senior Member
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 15:05]

Report message to a moderator

Re: Resizing of nodes [message #1064413 is a reply to message #1062710] Wed, 19 June 2013 07:12 Go to previous messageGo to next message
Dan Tololoi is currently offline Dan TololoiFriend
Messages: 33
Registered: September 2012
Location: Iasi, Romania
Member

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 11:41 Go to previous messageGo to next message
Michael Golubev is currently offline Michael GolubevFriend
Messages: 383
Registered: July 2009
Senior Member
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 13:28 Go to previous messageGo to next message
Dan Tololoi is currently offline Dan TololoiFriend
Messages: 33
Registered: September 2012
Location: Iasi, Romania
Member

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 18:18 Go to previous message
Phil H is currently offline Phil HFriend
Messages: 267
Registered: November 2012
Senior Member
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 Apr 16 22:13:32 GMT 2024

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

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

Back to the top