Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » ToolbarLayout Problem
ToolbarLayout Problem [message #181207] Fri, 13 May 2005 04:00 Go to next message
Hao Zhang is currently offline Hao ZhangFriend
Messages: 161
Registered: July 2009
Senior Member
Hi all,
I am developing a table-like application, there are 3 types of figures:
Table, Column, and Cell. Table and Column are using ToolbarLayout as
layout manager, the Table figure is in fact the diagram, I can dynamically
add some cells into the column. Now I have some problem about the Column
figure's size.

I want Column figure's height to be the sum of its children(Cells).
Currently, I give every cell figure a minimumSize and a preferredSize,
they are same value, and I refresh column's preferredSize to (100,-1),
which works quite well, because I think the minimum size of cells prevent
column to be too small. But when the columns get higher, the editor does
not show a vertical scroll bar, unless I set column's preferredSize to
some taller value.

I failed to trace how they work, because so many calls occured, and
sometimes they call each other, I am totally confused.

I don't understand the relationship between preferredSize and minimumSize
well, seems like the sizes are cached? When should I call
setPreferredSize() or setMinimumSize() to change child/container's size,
and when should I override them in my figure, and when should I implement
a custom layout?

And, What are the complete factors determing any figure's final bound?
Such as its layout's getPreferredSize(), getMinimumSize(), and what else?

Sincerely
Hao
Re: ToolbarLayout Problem [message #181281 is a reply to message #181207] Fri, 13 May 2005 14:46 Go to previous message
Hao Zhang is currently offline Hao ZhangFriend
Messages: 161
Registered: July 2009
Senior Member
This screenshot may help to describe my problem.
I expect a vertical scrollbar on the right side of editor.

"Hao Zhang" <bjzhanghao@21cn.com> ????
news:4fc21beb07a5b9f0bcd57791c20147a9$1@www.eclipse.org...
> Hi all,
> I am developing a table-like application, there are 3 types of figures:
> Table, Column, and Cell. Table and Column are using ToolbarLayout as
> layout manager, the Table figure is in fact the diagram, I can dynamically
> add some cells into the column. Now I have some problem about the Column
> figure's size.
>
> I want Column figure's height to be the sum of its children(Cells).
> Currently, I give every cell figure a minimumSize and a preferredSize,
> they are same value, and I refresh column's preferredSize to (100,-1),
> which works quite well, because I think the minimum size of cells prevent
> column to be too small. But when the columns get higher, the editor does
> not show a vertical scroll bar, unless I set column's preferredSize to
> some taller value.
>
> I failed to trace how they work, because so many calls occured, and
> sometimes they call each other, I am totally confused.
>
> I don't understand the relationship between preferredSize and minimumSize
> well, seems like the sizes are cached? When should I call
> setPreferredSize() or setMinimumSize() to change child/container's size,
> and when should I override them in my figure, and when should I implement
> a custom layout?
>
> And, What are the complete factors determing any figure's final bound?
> Such as its layout's getPreferredSize(), getMinimumSize(), and what else?
>
> Sincerely
> Hao
>


  • Attachment: snap.gif
    (Size: 9.25KB, Downloaded 34 times)
Previous Topic:Where to download GEF 2.0.1?
Next Topic:GridLayout for GEF editor?
Goto Forum:
  


Current Time: Mon Nov 24 15:14:41 GMT 2014

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

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