Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » layout and borders not persisting
layout and borders not persisting [message #164241] Tue, 04 December 2007 16:27 Go to next message
paolo russian is currently offline paolo russianFriend
Messages: 81
Registered: July 2009
Member
I implemented some methods to retrieve if an user change my custom
property "bordersize" and/or another set named "padding left" (right..
top..etc)
to place the label of a node where the user want and to show the right
size of the border as chosen.
So to update the border I create a "new marginborder" and display, to
update the padding I create a "new flowlayout"
The problem is that whenever I change one of these two, the other get
reset.
Perhaps this is due to the "new" thing, that destroys the old layout
manger..
but I really can't get my hands on the actual layout.
I can only get the "layoutmanager", but not its layout.
And this way may be wrong too...
What can be the source of my trouble? I must not loose nor the margin nor
the padding, once set!

Thanks

Paolo Russian
Re: layout and borders not persisting [message #164253 is a reply to message #164241] Tue, 04 December 2007 16:48 Go to previous messageGo to next message
paolo russian is currently offline paolo russianFriend
Messages: 81
Registered: July 2009
Member
I realized one more thing.

the method I use to show the wanted border and color is something similar
to:

figure.setBorder(new LineBorder(customcolor,customsize));

and the method (below, in the same class) to show the custom padding is:

[..]
retrieve the "insets" stuff blah blah..
[..]
figure.setBorder(new
MarginBorder(PaddingTop,PaddingLeft,PaddingBottom,PaddingRig ht));


I think that since the're called <together>, in line the most of the
times, it's obvious that one exclude the other.

Now the question is: how to merge these two guys here?
Re: layout and borders not persisting [message #164354 is a reply to message #164253] Wed, 05 December 2007 13:09 Go to previous message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

@see org.eclipse.draw2d.CompoundBorder

Paolo Russian wrote:
> I realized one more thing.
>
> the method I use to show the wanted border and color is something
> similar to:
>
> figure.setBorder(new LineBorder(customcolor,customsize));
>
> and the method (below, in the same class) to show the custom padding is:
>
> [..]
> retrieve the "insets" stuff blah blah..
> [..]
> figure.setBorder(new
> MarginBorder(PaddingTop,PaddingLeft,PaddingBottom,PaddingRig ht));
>
>
> I think that since the're called <together>, in line the most of the
> times, it's obvious that one exclude the other.
>
> Now the question is: how to merge these two guys here?
>
Previous Topic:Model element present in a view
Next Topic:exception in graphics.rotate
Goto Forum:
  


Current Time: Fri Apr 26 07:59:24 GMT 2024

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

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

Back to the top