Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Table.getColumns(), what order is returned
Table.getColumns(), what order is returned [message #465879] Wed, 21 December 2005 14:48 Go to next message
Chris Audley is currently offline Chris AudleyFriend
Messages: 41
Registered: July 2009
Member
The javadoc for Table.getColumns() doesn't say whether the returned
array is in display order, creation order or some other order. Does
anyone know off-hand?
Re: Table.getColumns(), what order is returned [message #465902 is a reply to message #465879] Wed, 21 December 2005 15:10 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Table.getColumns() returns columns in index order. This is not neccessarily
the left to right visual order. For left to right visual order use
Table.getColumnOrder(). Index order is not quite the same as creation order
because you can create columns with an index value and insert columns in the
index order.


"Chris Audley" <chris.audley@beaconcs.com> wrote in message
news:dobq07$gtd$1@utils.eclipse.org...
> The javadoc for Table.getColumns() doesn't say whether the returned array
> is in display order, creation order or some other order. Does anyone know
> off-hand?
Re: Table.getColumns(), what order is returned [message #465903 is a reply to message #465902] Wed, 21 December 2005 15:50 Go to previous messageGo to next message
Chris Audley is currently offline Chris AudleyFriend
Messages: 41
Registered: July 2009
Member
That complicates things even further. The javadoc for getColumnOrder()
indicates that it maps display order to creation order. If that is
correct, but getColumns returns index order, then you have an array of
columns in index order with no means to map them to display order.

I'll assume that the javadoc for getColumnOrder() is incorrect and it
maps display order to index order.

Thanks
Chris

Veronika Irvine wrote:
> Table.getColumns() returns columns in index order. This is not neccessarily
> the left to right visual order. For left to right visual order use
> Table.getColumnOrder(). Index order is not quite the same as creation order
> because you can create columns with an index value and insert columns in the
> index order.
>
>
> "Chris Audley" <chris.audley@beaconcs.com> wrote in message
> news:dobq07$gtd$1@utils.eclipse.org...
>
>>The javadoc for Table.getColumns() doesn't say whether the returned array
>>is in display order, creation order or some other order. Does anyone know
>>off-hand?
>
>
>
Re: Table.getColumns(), what order is returned [message #465907 is a reply to message #465903] Wed, 21 December 2005 18:12 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Table.getColumnOrder() returns an array of int. The int values are the
indices of the columns and the array is in the visible display order.

"Chris Audley" <chris.audley@beaconcs.com> wrote in message
news:dobtks$m02$1@utils.eclipse.org...
> That complicates things even further. The javadoc for getColumnOrder()
> indicates that it maps display order to creation order. If that is
> correct, but getColumns returns index order, then you have an array of
> columns in index order with no means to map them to display order.
>
> I'll assume that the javadoc for getColumnOrder() is incorrect and it maps
> display order to index order.
>
> Thanks
> Chris
>
> Veronika Irvine wrote:
>> Table.getColumns() returns columns in index order. This is not
>> neccessarily the left to right visual order. For left to right visual
>> order use Table.getColumnOrder(). Index order is not quite the same as
>> creation order because you can create columns with an index value and
>> insert columns in the index order.
>>
>>
>> "Chris Audley" <chris.audley@beaconcs.com> wrote in message
>> news:dobq07$gtd$1@utils.eclipse.org...
>>
>>>The javadoc for Table.getColumns() doesn't say whether the returned array
>>>is in display order, creation order or some other order. Does anyone
>>>know off-hand?
>>
>>
Previous Topic:Problem to give back focus to the main shell
Next Topic:SWT Fonts
Goto Forum:
  


Current Time: Fri Dec 27 03:50:14 GMT 2024

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

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

Back to the top