Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » tree layout
tree layout [message #454172] Mon, 18 April 2005 19:11 Go to next message
Christian Sell is currently offline Christian SellFriend
Messages: 77
Registered: July 2009
Member
Hello,

after migrating to Eclipse 3.1M6, I switched my app from
TableTree(Viewer) to Tree(Viewer) because the forme has become
deprecated. However, I am now looking for a layout to attach to the Tree
in the same way that a TableLayout is attached to a Table. In
particular, I am looking for ways to specify the relative weight of the
columns, and the automatic resizing that is performed by TableLayout.

Can anybody help?

thanks,
christian
Re: tree layout [message #454175 is a reply to message #454172] Mon, 18 April 2005 19:44 Go to previous messageGo to next message
Christian Sell is currently offline Christian SellFriend
Messages: 77
Registered: July 2009
Member
I just copied TableLayout into a TreeLayout class and changed the
(Table) casts to (Tree) casts. All was well afterwards. I assume there
will be some change before 3.1 GA that makes the same class usable in
both cases?!

chris

Christian Sell wrote:
> Hello,
>
> after migrating to Eclipse 3.1M6, I switched my app from
> TableTree(Viewer) to Tree(Viewer) because the forme has become
> deprecated. However, I am now looking for a layout to attach to the Tree
> in the same way that a TableLayout is attached to a Table. In
> particular, I am looking for ways to specify the relative weight of the
> columns, and the automatic resizing that is performed by TableLayout.
>
> Can anybody help?
>
> thanks,
> christian
Re: tree layout [message #454231 is a reply to message #454175] Tue, 19 April 2005 14:10 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
I don't think so since api is frozen for 3.1. This was logged recently, see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=91662 .

Grant

"Christian Sell" <christian.sell@netcologne.de> wrote in message
news:d4135f$hcr$1@news.eclipse.org...
> I just copied TableLayout into a TreeLayout class and changed the
> (Table) casts to (Tree) casts. All was well afterwards. I assume there
> will be some change before 3.1 GA that makes the same class usable in
> both cases?!
>
> chris
>
> Christian Sell wrote:
> > Hello,
> >
> > after migrating to Eclipse 3.1M6, I switched my app from
> > TableTree(Viewer) to Tree(Viewer) because the forme has become
> > deprecated. However, I am now looking for a layout to attach to the Tree
> > in the same way that a TableLayout is attached to a Table. In
> > particular, I am looking for ways to specify the relative weight of the
> > columns, and the automatic resizing that is performed by TableLayout.
> >
> > Can anybody help?
> >
> > thanks,
> > christian
Re: tree layout [message #454293 is a reply to message #454231] Tue, 19 April 2005 18:50 Go to previous messageGo to next message
Christian Sell is currently offline Christian SellFriend
Messages: 77
Registered: July 2009
Member
hmm, I dont think I understand the conclusion. Right now, Tree is not
able to fully replace TableTree, as there are no similar layout
facilites (in fact, there seem to be none). So, in order to avoid API
change, the only way would be to remove the deprecation IMO..

chris

Grant Gayed wrote:
> I don't think so since api is frozen for 3.1. This was logged recently, see
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=91662 .
>
> Grant
>
> "Christian Sell" <christian.sell@netcologne.de> wrote in message
> news:d4135f$hcr$1@news.eclipse.org...
>
>>I just copied TableLayout into a TreeLayout class and changed the
>>(Table) casts to (Tree) casts. All was well afterwards. I assume there
>>will be some change before 3.1 GA that makes the same class usable in
>>both cases?!
>>
>>chris
>>
>>Christian Sell wrote:
>>
>>>Hello,
>>>
>>>after migrating to Eclipse 3.1M6, I switched my app from
>>>TableTree(Viewer) to Tree(Viewer) because the forme has become
>>>deprecated. However, I am now looking for a layout to attach to the Tree
>>>in the same way that a TableLayout is attached to a Table. In
>>>particular, I am looking for ways to specify the relative weight of the
>>>columns, and the automatic resizing that is performed by TableLayout.
>>>
>>>Can anybody help?
>>>
>>>thanks,
>>>christian
>
>
>
Re: tree layout [message #454689 is a reply to message #454293] Wed, 27 April 2005 14:02 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
TableLayout is not really a satisfactory answer for Table or Tree. The idea
of TableLayout is probably going to be rethought post 3.1 and therefore it
does not make too much sense for a copy of TableLayout to be created for
Tree. The work being done in TableLayout can quite simply be done with a
resize listener. For example, the PropertySheet view does the following:

tree.addControlListener(new ControlAdapter() {
public void controlResized(ControlEvent e) {
Rectangle area = tree.getClientArea();
TreeColumn[] columns = tree.getColumns();
if (area.width > 0 && columns[0].getWidth() == 0) {
columns[0].setWidth(area.width * 40 / 100);
columns[1].setWidth(area.width - columns[0].getWidth() - 4);
tree.removeControlListener(this);
}
}
});

"Christian Sell" <christian.sell@netcologne.de> wrote in message
news:d43kd3$tb7$1@news.eclipse.org...
> hmm, I dont think I understand the conclusion. Right now, Tree is not able
> to fully replace TableTree, as there are no similar layout facilites (in
> fact, there seem to be none). So, in order to avoid API change, the only
> way would be to remove the deprecation IMO..
>
> chris
>
> Grant Gayed wrote:
>> I don't think so since api is frozen for 3.1. This was logged recently,
>> see
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=91662 .
>>
>> Grant
>>
>> "Christian Sell" <christian.sell@netcologne.de> wrote in message
>> news:d4135f$hcr$1@news.eclipse.org...
>>
>>>I just copied TableLayout into a TreeLayout class and changed the
>>>(Table) casts to (Tree) casts. All was well afterwards. I assume there
>>>will be some change before 3.1 GA that makes the same class usable in
>>>both cases?!
>>>
>>>chris
>>>
>>>Christian Sell wrote:
>>>
>>>>Hello,
>>>>
>>>>after migrating to Eclipse 3.1M6, I switched my app from
>>>>TableTree(Viewer) to Tree(Viewer) because the forme has become
>>>>deprecated. However, I am now looking for a layout to attach to the Tree
>>>>in the same way that a TableLayout is attached to a Table. In
>>>>particular, I am looking for ways to specify the relative weight of the
>>>>columns, and the automatic resizing that is performed by TableLayout.
>>>>
>>>>Can anybody help?
>>>>
>>>>thanks,
>>>>christian
>>
>>
Previous Topic:TreeColumn.setMoveable() ?
Next Topic:Unable to set background color of an SWT Button
Goto Forum:
  


Current Time: Sat Mar 06 03:06:02 GMT 2021

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

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

Back to the top