Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Examples
Examples [message #2045] Wed, 17 May 2006 15:32 Go to next message
Andrew Elegante is currently offline Andrew EleganteFriend
Messages: 9
Registered: July 2009
Junior Member
Hi,

I can see from the home page that you have some example code for how to
use this widget. I have been unsuccessful in trying to find it however
and was wondering if you could point me in the right direction.

Drew
Re: Examples [message #2060 is a reply to message #2045] Wed, 17 May 2006 18:39 Go to previous messageGo to next message
Michael Strothjohann is currently offline Michael StrothjohannFriend
Messages: 52
Registered: July 2009
Member
"Grid"-widget-Example: http://www.eclipse.org/nebula

related source is found in cvs

(host: dev.eclipse.org, repository path: /cvsroot/technology, user:
anonymous, con type: pserver)

head: org.eclipse.swt.nebula

michael


"Andrew Elegante" <aelegante@qcomm.com> schrieb im Newsbeitrag
news:3b944325a6fa4b2f0fbbfdf5c8a7f862$1@www.eclipse.org...
> Hi,
>
> I can see from the home page that you have some example code for how to
> use this widget. I have been unsuccessful in trying to find it however
> and was wondering if you could point me in the right direction.
>
> Drew
>
Re: Examples [message #2113 is a reply to message #2045] Thu, 18 May 2006 15:13 Go to previous messageGo to next message
Chris Gross is currently offline Chris GrossFriend
Messages: 471
Registered: July 2009
Senior Member
Hi Drew,

I hope to have an example plugin soon.

Regards,
-Chris

Andrew Elegante wrote:
> Hi,
>
> I can see from the home page that you have some example code for how to
> use this widget. I have been unsuccessful in trying to find it however
> and was wondering if you could point me in the right direction.
>
> Drew
>
Re: Examples [message #3418 is a reply to message #2060] Thu, 25 May 2006 18:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mail.mherbst.de

Hi,

> related source is found in cvs
>
> (host: dev.eclipse.org, repository path: /cvsroot/technology, user:
> anonymous, con type: pserver)
>
> head: org.eclipse.swt.nebula
>

I found the source of the grid in the repository, but no sample code.
Did I overlook something?

Martin
Re: Examples [message #3519 is a reply to message #2113] Tue, 30 May 2006 20:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: downlodr417.msn.com

Hi there,

From what I've seen of the Grid so far and what I've been able to
deduce from the source code, this has the makings of a great Table
extension (of which I am in some need :-P). I can't wait to see some
samples. Just out of curiosity, was the screenshot on the Grid homepage
actually done using the widget itself, and if so, is that code available
anywhere? Thanks so much!

- Daniel
Re: Examples [message #3552 is a reply to message #3519] Wed, 31 May 2006 13:41 Go to previous messageGo to next message
Chris Gross is currently offline Chris GrossFriend
Messages: 253
Registered: July 2009
Senior Member
Yes that picture is definitely the Grid. I don't have that code handy.
Its not very exciting code anyway. Generally Grid is designed to
match the SWT Table's API. The are differences but rather few. For
example, the Grid can function without any selection highlighting and
therefore you *must* pass either SWT.SINGLE or SWT.MULTI or no selection
highlighting will occur. The normal Table defaults to SWT.SINGLE.

Some of the other features visible in that screenshot that might not
exist in Table:

Column Groups:
Create a GridColumnGroup and create columns as children of it. If you
want the group to be collapsible, use the SWT.TOGGLE style in the
constructor of GridColumnGroup and set the detail/summary properties on
the individual columns.

Checkboxes in multiple cols:
Grid doesn't utilize the SWT.CHECK style in the main constructor, but
rather in individual column constructors, allowing checkbox per col.

Column spanning:
GridItem.setColumnSpan()

Hierarchical:
Creating items as children of other items as you would with a Tree. Set
one column as the 'tree' column (i.e. shows the toggle) by calling
GridColumn.setTree(true).


There will be examples and snippets (and better javadoc) as the project
progresses.

-Chris



Daniel wrote:
> Hi there,
>
> From what I've seen of the Grid so far and what I've been able to
> deduce from the source code, this has the makings of a great Table
> extension (of which I am in some need :-P). I can't wait to see some
> samples. Just out of curiosity, was the screenshot on the Grid homepage
> actually done using the widget itself, and if so, is that code available
> anywhere? Thanks so much!
>
> - Daniel
>
Re: Examples [message #3646 is a reply to message #3552] Wed, 31 May 2006 20:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: steve_northover.ca.ibm.com

Hi Chris,

Some thoughts ...

"Chris Gross" <chris.gross@us.ibm.com> wrote in message
news:e5k6ec$f07$1@utils.eclipse.org...
> Yes that picture is definitely the Grid. I don't have that code handy.
> Its not very exciting code anyway. Generally Grid is designed to
> match the SWT Table's API. The are differences but rather few. For
> example, the Grid can function without any selection highlighting and
> therefore you *must* pass either SWT.SINGLE or SWT.MULTI or no selection
> highlighting will occur. The normal Table defaults to SWT.SINGLE.
>

I know this is a better API but given that the native table has shipped and
doesn't
work this way means that this sort of difference will be an unexpected
annoyance.
A better solution might be to add an API to get rid of the selection. The
API
could offer to set the selection mode dynamically or it could just be
something
like "setSelectionEnabled()" or something like that.

> Some of the other features visible in that screenshot that might not
> exist in Table:
>
> Column Groups:
> Create a GridColumnGroup and create columns as children of it. If you
> want the group to be collapsible, use the SWT.TOGGLE style in the
> constructor of GridColumnGroup and set the detail/summary properties on
> the individual columns.
>
> Checkboxes in multiple cols:
> Grid doesn't utilize the SWT.CHECK style in the main constructor, but
> rather in individual column constructors, allowing checkbox per col.
>

You might consider supporting the SWT.CHECK in the main constructor
too, to be compatible. NOTE: If this turns out to be a lot of pain for
some
reason, then don't consider it.

> Column spanning:
> GridItem.setColumnSpan()
>
> Hierarchical:
> Creating items as children of other items as you would with a Tree. Set
> one column as the 'tree' column (i.e. shows the toggle) by calling
> GridColumn.setTree(true).
>
>
> There will be examples and snippets (and better javadoc) as the project
> progresses.
>
> -Chris
>
>
>
> Daniel wrote:
> > Hi there,
> >
> > From what I've seen of the Grid so far and what I've been able to
> > deduce from the source code, this has the makings of a great Table
> > extension (of which I am in some need :-P). I can't wait to see some
> > samples. Just out of curiosity, was the screenshot on the Grid homepage
> > actually done using the widget itself, and if so, is that code available
> > anywhere? Thanks so much!
> >
> > - Daniel
> >
Re: Examples [message #3679 is a reply to message #3646] Thu, 01 June 2006 13:40 Go to previous messageGo to next message
Chris Gross is currently offline Chris GrossFriend
Messages: 253
Registered: July 2009
Senior Member
Those changes definitely sound reasonable. I'll add them to the next
update.

-Chris

Steve Northover wrote:
> Hi Chris,
>
> Some thoughts ...
>
> "Chris Gross" <chris.gross@us.ibm.com> wrote in message
> news:e5k6ec$f07$1@utils.eclipse.org...
>> Yes that picture is definitely the Grid. I don't have that code handy.
>> Its not very exciting code anyway. Generally Grid is designed to
>> match the SWT Table's API. The are differences but rather few. For
>> example, the Grid can function without any selection highlighting and
>> therefore you *must* pass either SWT.SINGLE or SWT.MULTI or no selection
>> highlighting will occur. The normal Table defaults to SWT.SINGLE.
>>
>
> I know this is a better API but given that the native table has shipped and
> doesn't
> work this way means that this sort of difference will be an unexpected
> annoyance.
> A better solution might be to add an API to get rid of the selection. The
> API
> could offer to set the selection mode dynamically or it could just be
> something
> like "setSelectionEnabled()" or something like that.
>
>> Some of the other features visible in that screenshot that might not
>> exist in Table:
>>
>> Column Groups:
>> Create a GridColumnGroup and create columns as children of it. If you
>> want the group to be collapsible, use the SWT.TOGGLE style in the
>> constructor of GridColumnGroup and set the detail/summary properties on
>> the individual columns.
>>
>> Checkboxes in multiple cols:
>> Grid doesn't utilize the SWT.CHECK style in the main constructor, but
>> rather in individual column constructors, allowing checkbox per col.
>>
>
> You might consider supporting the SWT.CHECK in the main constructor
> too, to be compatible. NOTE: If this turns out to be a lot of pain for
> some
> reason, then don't consider it.
>
>> Column spanning:
>> GridItem.setColumnSpan()
>>
>> Hierarchical:
>> Creating items as children of other items as you would with a Tree. Set
>> one column as the 'tree' column (i.e. shows the toggle) by calling
>> GridColumn.setTree(true).
>>
>>
>> There will be examples and snippets (and better javadoc) as the project
>> progresses.
>>
>> -Chris
>>
>>
>>
>> Daniel wrote:
>>> Hi there,
>>>
>>> From what I've seen of the Grid so far and what I've been able to
>>> deduce from the source code, this has the makings of a great Table
>>> extension (of which I am in some need :-P). I can't wait to see some
>>> samples. Just out of curiosity, was the screenshot on the Grid homepage
>>> actually done using the widget itself, and if so, is that code available
>>> anywhere? Thanks so much!
>>>
>>> - Daniel
>>>
>
>
Re: Examples [message #3711 is a reply to message #3679] Fri, 02 June 2006 15:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: steve_northover.ca.ibm.com

My rule of thumb is that style bits and API that are the same as a similar
control should work the same, even if the new usage is "better" (like your
changes are). Being able to substitute one widget for another or have a new
widget work the same way as one you already understand is valuable. Of
course, common sense overrides everything. For example, if it requires a
ton of code to be compatible or the implementation becomes a nightmare then
the rule goes out the window.

"Chris Gross" <chris.gross@us.ibm.com> wrote in message
news:e5mqo3$jj4$1@utils.eclipse.org...
> Those changes definitely sound reasonable. I'll add them to the next
> update.
>
> -Chris
>
> Steve Northover wrote:
> > Hi Chris,
> >
> > Some thoughts ...
> >
> > "Chris Gross" <chris.gross@us.ibm.com> wrote in message
> > news:e5k6ec$f07$1@utils.eclipse.org...
> >> Yes that picture is definitely the Grid. I don't have that code handy.
> >> Its not very exciting code anyway. Generally Grid is designed to
> >> match the SWT Table's API. The are differences but rather few. For
> >> example, the Grid can function without any selection highlighting and
> >> therefore you *must* pass either SWT.SINGLE or SWT.MULTI or no
selection
> >> highlighting will occur. The normal Table defaults to SWT.SINGLE.
> >>
> >
> > I know this is a better API but given that the native table has shipped
and
> > doesn't
> > work this way means that this sort of difference will be an unexpected
> > annoyance.
> > A better solution might be to add an API to get rid of the selection.
The
> > API
> > could offer to set the selection mode dynamically or it could just be
> > something
> > like "setSelectionEnabled()" or something like that.
> >
> >> Some of the other features visible in that screenshot that might not
> >> exist in Table:
> >>
> >> Column Groups:
> >> Create a GridColumnGroup and create columns as children of it. If you
> >> want the group to be collapsible, use the SWT.TOGGLE style in the
> >> constructor of GridColumnGroup and set the detail/summary properties on
> >> the individual columns.
> >>
> >> Checkboxes in multiple cols:
> >> Grid doesn't utilize the SWT.CHECK style in the main constructor, but
> >> rather in individual column constructors, allowing checkbox per col.
> >>
> >
> > You might consider supporting the SWT.CHECK in the main constructor
> > too, to be compatible. NOTE: If this turns out to be a lot of pain for
> > some
> > reason, then don't consider it.
> >
> >> Column spanning:
> >> GridItem.setColumnSpan()
> >>
> >> Hierarchical:
> >> Creating items as children of other items as you would with a Tree.
Set
> >> one column as the 'tree' column (i.e. shows the toggle) by calling
> >> GridColumn.setTree(true).
> >>
> >>
> >> There will be examples and snippets (and better javadoc) as the project
> >> progresses.
> >>
> >> -Chris
> >>
> >>
> >>
> >> Daniel wrote:
> >>> Hi there,
> >>>
> >>> From what I've seen of the Grid so far and what I've been able to
> >>> deduce from the source code, this has the makings of a great Table
> >>> extension (of which I am in some need :-P). I can't wait to see some
> >>> samples. Just out of curiosity, was the screenshot on the Grid
homepage
> >>> actually done using the widget itself, and if so, is that code
available
> >>> anywhere? Thanks so much!
> >>>
> >>> - Daniel
> >>>
> >
> >
Re: Examples [message #4032 is a reply to message #3711] Fri, 02 June 2006 19:26 Go to previous message
Chris Gross is currently offline Chris GrossFriend
Messages: 253
Registered: July 2009
Senior Member
Sounds good. Consistency is very valuable and in Nebula we aren't
trying to necessarily invent new paradigms.

-Chris

Steve Northover wrote:
> My rule of thumb is that style bits and API that are the same as a similar
> control should work the same, even if the new usage is "better" (like your
> changes are). Being able to substitute one widget for another or have a new
> widget work the same way as one you already understand is valuable. Of
> course, common sense overrides everything. For example, if it requires a
> ton of code to be compatible or the implementation becomes a nightmare then
> the rule goes out the window.
>
> "Chris Gross" <chris.gross@us.ibm.com> wrote in message
> news:e5mqo3$jj4$1@utils.eclipse.org...
>> Those changes definitely sound reasonable. I'll add them to the next
>> update.
>>
>> -Chris
>>
>> Steve Northover wrote:
>>> Hi Chris,
>>>
>>> Some thoughts ...
>>>
>>> "Chris Gross" <chris.gross@us.ibm.com> wrote in message
>>> news:e5k6ec$f07$1@utils.eclipse.org...
>>>> Yes that picture is definitely the Grid. I don't have that code handy.
>>>> Its not very exciting code anyway. Generally Grid is designed to
>>>> match the SWT Table's API. The are differences but rather few. For
>>>> example, the Grid can function without any selection highlighting and
>>>> therefore you *must* pass either SWT.SINGLE or SWT.MULTI or no
> selection
>>>> highlighting will occur. The normal Table defaults to SWT.SINGLE.
>>>>
>>> I know this is a better API but given that the native table has shipped
> and
>>> doesn't
>>> work this way means that this sort of difference will be an unexpected
>>> annoyance.
>>> A better solution might be to add an API to get rid of the selection.
> The
>>> API
>>> could offer to set the selection mode dynamically or it could just be
>>> something
>>> like "setSelectionEnabled()" or something like that.
>>>
>>>> Some of the other features visible in that screenshot that might not
>>>> exist in Table:
>>>>
>>>> Column Groups:
>>>> Create a GridColumnGroup and create columns as children of it. If you
>>>> want the group to be collapsible, use the SWT.TOGGLE style in the
>>>> constructor of GridColumnGroup and set the detail/summary properties on
>>>> the individual columns.
>>>>
>>>> Checkboxes in multiple cols:
>>>> Grid doesn't utilize the SWT.CHECK style in the main constructor, but
>>>> rather in individual column constructors, allowing checkbox per col.
>>>>
>>> You might consider supporting the SWT.CHECK in the main constructor
>>> too, to be compatible. NOTE: If this turns out to be a lot of pain for
>>> some
>>> reason, then don't consider it.
>>>
>>>> Column spanning:
>>>> GridItem.setColumnSpan()
>>>>
>>>> Hierarchical:
>>>> Creating items as children of other items as you would with a Tree.
> Set
>>>> one column as the 'tree' column (i.e. shows the toggle) by calling
>>>> GridColumn.setTree(true).
>>>>
>>>>
>>>> There will be examples and snippets (and better javadoc) as the project
>>>> progresses.
>>>>
>>>> -Chris
>>>>
>>>>
>>>>
>>>> Daniel wrote:
>>>>> Hi there,
>>>>>
>>>>> From what I've seen of the Grid so far and what I've been able to
>>>>> deduce from the source code, this has the makings of a great Table
>>>>> extension (of which I am in some need :-P). I can't wait to see some
>>>>> samples. Just out of curiosity, was the screenshot on the Grid
> homepage
>>>>> actually done using the widget itself, and if so, is that code
> available
>>>>> anywhere? Thanks so much!
>>>>>
>>>>> - Daniel
>>>>>
>>>
>
>
Re: Examples [message #561435 is a reply to message #2045] Wed, 17 May 2006 18:39 Go to previous message
Michael Strothjohann is currently offline Michael StrothjohannFriend
Messages: 52
Registered: July 2009
Member
"Grid"-widget-Example: http://www.eclipse.org/nebula

related source is found in cvs

(host: dev.eclipse.org, repository path: /cvsroot/technology, user:
anonymous, con type: pserver)

head: org.eclipse.swt.nebula

michael


"Andrew Elegante" <aelegante@qcomm.com> schrieb im Newsbeitrag
news:3b944325a6fa4b2f0fbbfdf5c8a7f862$1@www.eclipse.org...
> Hi,
>
> I can see from the home page that you have some example code for how to
> use this widget. I have been unsuccessful in trying to find it however
> and was wondering if you could point me in the right direction.
>
> Drew
>
Re: Examples [message #561518 is a reply to message #2045] Thu, 18 May 2006 15:13 Go to previous message
Chris Gross is currently offline Chris GrossFriend
Messages: 471
Registered: July 2009
Senior Member
Hi Drew,

I hope to have an example plugin soon.

Regards,
-Chris

Andrew Elegante wrote:
> Hi,
>
> I can see from the home page that you have some example code for how to
> use this widget. I have been unsuccessful in trying to find it however
> and was wondering if you could point me in the right direction.
>
> Drew
>
Re: Examples [message #561757 is a reply to message #2060] Thu, 25 May 2006 18:46 Go to previous message
Eclipse UserFriend
Originally posted by: mail.mherbst.de

Hi,

> related source is found in cvs
>
> (host: dev.eclipse.org, repository path: /cvsroot/technology, user:
> anonymous, con type: pserver)
>
> head: org.eclipse.swt.nebula
>

I found the source of the grid in the repository, but no sample code.
Did I overlook something?

Martin
Re: Examples [message #561814 is a reply to message #2113] Tue, 30 May 2006 20:14 Go to previous message
Daniel is currently offline DanielFriend
Messages: 34
Registered: July 2009
Member
Hi there,

From what I've seen of the Grid so far and what I've been able to
deduce from the source code, this has the makings of a great Table
extension (of which I am in some need :-P). I can't wait to see some
samples. Just out of curiosity, was the screenshot on the Grid homepage
actually done using the widget itself, and if so, is that code available
anywhere? Thanks so much!

- Daniel
Re: Examples [message #561835 is a reply to message #3519] Wed, 31 May 2006 13:41 Go to previous message
Chris Gross is currently offline Chris GrossFriend
Messages: 471
Registered: July 2009
Senior Member
Yes that picture is definitely the Grid. I don't have that code handy.
Its not very exciting code anyway. Generally Grid is designed to
match the SWT Table's API. The are differences but rather few. For
example, the Grid can function without any selection highlighting and
therefore you *must* pass either SWT.SINGLE or SWT.MULTI or no selection
highlighting will occur. The normal Table defaults to SWT.SINGLE.

Some of the other features visible in that screenshot that might not
exist in Table:

Column Groups:
Create a GridColumnGroup and create columns as children of it. If you
want the group to be collapsible, use the SWT.TOGGLE style in the
constructor of GridColumnGroup and set the detail/summary properties on
the individual columns.

Checkboxes in multiple cols:
Grid doesn't utilize the SWT.CHECK style in the main constructor, but
rather in individual column constructors, allowing checkbox per col.

Column spanning:
GridItem.setColumnSpan()

Hierarchical:
Creating items as children of other items as you would with a Tree. Set
one column as the 'tree' column (i.e. shows the toggle) by calling
GridColumn.setTree(true).


There will be examples and snippets (and better javadoc) as the project
progresses.

-Chris



Daniel wrote:
> Hi there,
>
> From what I've seen of the Grid so far and what I've been able to
> deduce from the source code, this has the makings of a great Table
> extension (of which I am in some need :-P). I can't wait to see some
> samples. Just out of curiosity, was the screenshot on the Grid homepage
> actually done using the widget itself, and if so, is that code available
> anywhere? Thanks so much!
>
> - Daniel
>
Re: Examples [message #561904 is a reply to message #3552] Wed, 31 May 2006 20:17 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Hi Chris,

Some thoughts ...

"Chris Gross" <chris.gross@us.ibm.com> wrote in message
news:e5k6ec$f07$1@utils.eclipse.org...
> Yes that picture is definitely the Grid. I don't have that code handy.
> Its not very exciting code anyway. Generally Grid is designed to
> match the SWT Table's API. The are differences but rather few. For
> example, the Grid can function without any selection highlighting and
> therefore you *must* pass either SWT.SINGLE or SWT.MULTI or no selection
> highlighting will occur. The normal Table defaults to SWT.SINGLE.
>

I know this is a better API but given that the native table has shipped and
doesn't
work this way means that this sort of difference will be an unexpected
annoyance.
A better solution might be to add an API to get rid of the selection. The
API
could offer to set the selection mode dynamically or it could just be
something
like "setSelectionEnabled()" or something like that.

> Some of the other features visible in that screenshot that might not
> exist in Table:
>
> Column Groups:
> Create a GridColumnGroup and create columns as children of it. If you
> want the group to be collapsible, use the SWT.TOGGLE style in the
> constructor of GridColumnGroup and set the detail/summary properties on
> the individual columns.
>
> Checkboxes in multiple cols:
> Grid doesn't utilize the SWT.CHECK style in the main constructor, but
> rather in individual column constructors, allowing checkbox per col.
>

You might consider supporting the SWT.CHECK in the main constructor
too, to be compatible. NOTE: If this turns out to be a lot of pain for
some
reason, then don't consider it.

> Column spanning:
> GridItem.setColumnSpan()
>
> Hierarchical:
> Creating items as children of other items as you would with a Tree. Set
> one column as the 'tree' column (i.e. shows the toggle) by calling
> GridColumn.setTree(true).
>
>
> There will be examples and snippets (and better javadoc) as the project
> progresses.
>
> -Chris
>
>
>
> Daniel wrote:
> > Hi there,
> >
> > From what I've seen of the Grid so far and what I've been able to
> > deduce from the source code, this has the makings of a great Table
> > extension (of which I am in some need :-P). I can't wait to see some
> > samples. Just out of curiosity, was the screenshot on the Grid homepage
> > actually done using the widget itself, and if so, is that code available
> > anywhere? Thanks so much!
> >
> > - Daniel
> >
Re: Examples [message #561926 is a reply to message #3646] Thu, 01 June 2006 13:40 Go to previous message
Chris Gross is currently offline Chris GrossFriend
Messages: 471
Registered: July 2009
Senior Member
Those changes definitely sound reasonable. I'll add them to the next
update.

-Chris

Steve Northover wrote:
> Hi Chris,
>
> Some thoughts ...
>
> "Chris Gross" <chris.gross@us.ibm.com> wrote in message
> news:e5k6ec$f07$1@utils.eclipse.org...
>> Yes that picture is definitely the Grid. I don't have that code handy.
>> Its not very exciting code anyway. Generally Grid is designed to
>> match the SWT Table's API. The are differences but rather few. For
>> example, the Grid can function without any selection highlighting and
>> therefore you *must* pass either SWT.SINGLE or SWT.MULTI or no selection
>> highlighting will occur. The normal Table defaults to SWT.SINGLE.
>>
>
> I know this is a better API but given that the native table has shipped and
> doesn't
> work this way means that this sort of difference will be an unexpected
> annoyance.
> A better solution might be to add an API to get rid of the selection. The
> API
> could offer to set the selection mode dynamically or it could just be
> something
> like "setSelectionEnabled()" or something like that.
>
>> Some of the other features visible in that screenshot that might not
>> exist in Table:
>>
>> Column Groups:
>> Create a GridColumnGroup and create columns as children of it. If you
>> want the group to be collapsible, use the SWT.TOGGLE style in the
>> constructor of GridColumnGroup and set the detail/summary properties on
>> the individual columns.
>>
>> Checkboxes in multiple cols:
>> Grid doesn't utilize the SWT.CHECK style in the main constructor, but
>> rather in individual column constructors, allowing checkbox per col.
>>
>
> You might consider supporting the SWT.CHECK in the main constructor
> too, to be compatible. NOTE: If this turns out to be a lot of pain for
> some
> reason, then don't consider it.
>
>> Column spanning:
>> GridItem.setColumnSpan()
>>
>> Hierarchical:
>> Creating items as children of other items as you would with a Tree. Set
>> one column as the 'tree' column (i.e. shows the toggle) by calling
>> GridColumn.setTree(true).
>>
>>
>> There will be examples and snippets (and better javadoc) as the project
>> progresses.
>>
>> -Chris
>>
>>
>>
>> Daniel wrote:
>>> Hi there,
>>>
>>> From what I've seen of the Grid so far and what I've been able to
>>> deduce from the source code, this has the makings of a great Table
>>> extension (of which I am in some need :-P). I can't wait to see some
>>> samples. Just out of curiosity, was the screenshot on the Grid homepage
>>> actually done using the widget itself, and if so, is that code available
>>> anywhere? Thanks so much!
>>>
>>> - Daniel
>>>
>
>
Re: Examples [message #561949 is a reply to message #3679] Fri, 02 June 2006 15:19 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
My rule of thumb is that style bits and API that are the same as a similar
control should work the same, even if the new usage is "better" (like your
changes are). Being able to substitute one widget for another or have a new
widget work the same way as one you already understand is valuable. Of
course, common sense overrides everything. For example, if it requires a
ton of code to be compatible or the implementation becomes a nightmare then
the rule goes out the window.

"Chris Gross" <chris.gross@us.ibm.com> wrote in message
news:e5mqo3$jj4$1@utils.eclipse.org...
> Those changes definitely sound reasonable. I'll add them to the next
> update.
>
> -Chris
>
> Steve Northover wrote:
> > Hi Chris,
> >
> > Some thoughts ...
> >
> > "Chris Gross" <chris.gross@us.ibm.com> wrote in message
> > news:e5k6ec$f07$1@utils.eclipse.org...
> >> Yes that picture is definitely the Grid. I don't have that code handy.
> >> Its not very exciting code anyway. Generally Grid is designed to
> >> match the SWT Table's API. The are differences but rather few. For
> >> example, the Grid can function without any selection highlighting and
> >> therefore you *must* pass either SWT.SINGLE or SWT.MULTI or no
selection
> >> highlighting will occur. The normal Table defaults to SWT.SINGLE.
> >>
> >
> > I know this is a better API but given that the native table has shipped
and
> > doesn't
> > work this way means that this sort of difference will be an unexpected
> > annoyance.
> > A better solution might be to add an API to get rid of the selection.
The
> > API
> > could offer to set the selection mode dynamically or it could just be
> > something
> > like "setSelectionEnabled()" or something like that.
> >
> >> Some of the other features visible in that screenshot that might not
> >> exist in Table:
> >>
> >> Column Groups:
> >> Create a GridColumnGroup and create columns as children of it. If you
> >> want the group to be collapsible, use the SWT.TOGGLE style in the
> >> constructor of GridColumnGroup and set the detail/summary properties on
> >> the individual columns.
> >>
> >> Checkboxes in multiple cols:
> >> Grid doesn't utilize the SWT.CHECK style in the main constructor, but
> >> rather in individual column constructors, allowing checkbox per col.
> >>
> >
> > You might consider supporting the SWT.CHECK in the main constructor
> > too, to be compatible. NOTE: If this turns out to be a lot of pain for
> > some
> > reason, then don't consider it.
> >
> >> Column spanning:
> >> GridItem.setColumnSpan()
> >>
> >> Hierarchical:
> >> Creating items as children of other items as you would with a Tree.
Set
> >> one column as the 'tree' column (i.e. shows the toggle) by calling
> >> GridColumn.setTree(true).
> >>
> >>
> >> There will be examples and snippets (and better javadoc) as the project
> >> progresses.
> >>
> >> -Chris
> >>
> >>
> >>
> >> Daniel wrote:
> >>> Hi there,
> >>>
> >>> From what I've seen of the Grid so far and what I've been able to
> >>> deduce from the source code, this has the makings of a great Table
> >>> extension (of which I am in some need :-P). I can't wait to see some
> >>> samples. Just out of curiosity, was the screenshot on the Grid
homepage
> >>> actually done using the widget itself, and if so, is that code
available
> >>> anywhere? Thanks so much!
> >>>
> >>> - Daniel
> >>>
> >
> >
Re: Examples [message #561971 is a reply to message #3711] Fri, 02 June 2006 19:26 Go to previous message
Chris Gross is currently offline Chris GrossFriend
Messages: 471
Registered: July 2009
Senior Member
Sounds good. Consistency is very valuable and in Nebula we aren't
trying to necessarily invent new paradigms.

-Chris

Steve Northover wrote:
> My rule of thumb is that style bits and API that are the same as a similar
> control should work the same, even if the new usage is "better" (like your
> changes are). Being able to substitute one widget for another or have a new
> widget work the same way as one you already understand is valuable. Of
> course, common sense overrides everything. For example, if it requires a
> ton of code to be compatible or the implementation becomes a nightmare then
> the rule goes out the window.
>
> "Chris Gross" <chris.gross@us.ibm.com> wrote in message
> news:e5mqo3$jj4$1@utils.eclipse.org...
>> Those changes definitely sound reasonable. I'll add them to the next
>> update.
>>
>> -Chris
>>
>> Steve Northover wrote:
>>> Hi Chris,
>>>
>>> Some thoughts ...
>>>
>>> "Chris Gross" <chris.gross@us.ibm.com> wrote in message
>>> news:e5k6ec$f07$1@utils.eclipse.org...
>>>> Yes that picture is definitely the Grid. I don't have that code handy.
>>>> Its not very exciting code anyway. Generally Grid is designed to
>>>> match the SWT Table's API. The are differences but rather few. For
>>>> example, the Grid can function without any selection highlighting and
>>>> therefore you *must* pass either SWT.SINGLE or SWT.MULTI or no
> selection
>>>> highlighting will occur. The normal Table defaults to SWT.SINGLE.
>>>>
>>> I know this is a better API but given that the native table has shipped
> and
>>> doesn't
>>> work this way means that this sort of difference will be an unexpected
>>> annoyance.
>>> A better solution might be to add an API to get rid of the selection.
> The
>>> API
>>> could offer to set the selection mode dynamically or it could just be
>>> something
>>> like "setSelectionEnabled()" or something like that.
>>>
>>>> Some of the other features visible in that screenshot that might not
>>>> exist in Table:
>>>>
>>>> Column Groups:
>>>> Create a GridColumnGroup and create columns as children of it. If you
>>>> want the group to be collapsible, use the SWT.TOGGLE style in the
>>>> constructor of GridColumnGroup and set the detail/summary properties on
>>>> the individual columns.
>>>>
>>>> Checkboxes in multiple cols:
>>>> Grid doesn't utilize the SWT.CHECK style in the main constructor, but
>>>> rather in individual column constructors, allowing checkbox per col.
>>>>
>>> You might consider supporting the SWT.CHECK in the main constructor
>>> too, to be compatible. NOTE: If this turns out to be a lot of pain for
>>> some
>>> reason, then don't consider it.
>>>
>>>> Column spanning:
>>>> GridItem.setColumnSpan()
>>>>
>>>> Hierarchical:
>>>> Creating items as children of other items as you would with a Tree.
> Set
>>>> one column as the 'tree' column (i.e. shows the toggle) by calling
>>>> GridColumn.setTree(true).
>>>>
>>>>
>>>> There will be examples and snippets (and better javadoc) as the project
>>>> progresses.
>>>>
>>>> -Chris
>>>>
>>>>
>>>>
>>>> Daniel wrote:
>>>>> Hi there,
>>>>>
>>>>> From what I've seen of the Grid so far and what I've been able to
>>>>> deduce from the source code, this has the makings of a great Table
>>>>> extension (of which I am in some need :-P). I can't wait to see some
>>>>> samples. Just out of curiosity, was the screenshot on the Grid
> homepage
>>>>> actually done using the widget itself, and if so, is that code
> available
>>>>> anywhere? Thanks so much!
>>>>>
>>>>> - Daniel
>>>>>
>>>
>
>
Previous Topic:Presentation?
Next Topic:Can't wait!!!!!!
Goto Forum:
  


Current Time: Fri Apr 19 15:26:50 GMT 2024

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

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

Back to the top