Home » Eclipse Projects » GEF » ToolbarLayout Problem
ToolbarLayout Problem [message #181207] |
Fri, 13 May 2005 04:00 |
Hao Zhang 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 |
Hao Zhang 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 86 times)
|
|
|
Goto Forum:
Current Time: Tue Sep 24 04:03:52 GMT 2024
Powered by FUDForum. Page generated in 0.08588 seconds
|