Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » embedding GEF/draw2 viewer/figures in table/tree cell
embedding GEF/draw2 viewer/figures in table/tree cell [message #10396] Fri, 01 September 2006 14:03 Go to next message
Eclipse UserFriend
Originally posted by: alnospammajor.noboxspamspoon.com

forgive the newbie question.

i have a GEF/draw2d viewer/figure that i'd like to show in a tree-table
cell. my options are

a) use Tree/TreeViewer from SWT/JFace and write owner-draw code that
will paint the figure into the appropriate cell. since there is very
little support for this use-case currently, i'll essentially have to
write everything from scratch. i'd prefer not to do this.

b) use Nebula Grid? i'm completely new to nebula and not quite sure how
to do this, or if its even a use case for the grid. if it is not
currently a use-case, is this a direction that grid will be going in. if
so, will Grid and CTableTree features be merged at some point?

c) use Nebula CTableTree which appears to have this kind of application
as an explicit use-case. i'm assuming this will be the easiest to do. my
one reservation is that i'll eventually be needing more grid-like
functionality. so if Grid is intended to support this use-case in the
near future, i'd prefer to use it instead.

guidance would be appreciated.

regards,

al
Re: embedding GEF/draw2 viewer/figures in table/tree cell [message #10429 is a reply to message #10396] Fri, 01 September 2006 15:11 Go to previous messageGo to next message
Jeremy Dowdall is currently offline Jeremy DowdallFriend
Messages: 181
Registered: July 2009
Senior Member
Could you give a little more detail regarding how you would like to show
these figures? A (small) mock-up picture may be helpful even.
What is the "grid-like" functionality that is missing from the
CTableTree (people have different interpretations of this, so I want to
make sure I understand)

Al Major wrote:
> forgive the newbie question.
>
> i have a GEF/draw2d viewer/figure that i'd like to show in a tree-table
> cell. my options are
>
> a) use Tree/TreeViewer from SWT/JFace and write owner-draw code that
> will paint the figure into the appropriate cell. since there is very
> little support for this use-case currently, i'll essentially have to
> write everything from scratch. i'd prefer not to do this.
>
> b) use Nebula Grid? i'm completely new to nebula and not quite sure how
> to do this, or if its even a use case for the grid. if it is not
> currently a use-case, is this a direction that grid will be going in. if
> so, will Grid and CTableTree features be merged at some point?
>
> c) use Nebula CTableTree which appears to have this kind of application
> as an explicit use-case. i'm assuming this will be the easiest to do. my
> one reservation is that i'll eventually be needing more grid-like
> functionality. so if Grid is intended to support this use-case in the
> near future, i'd prefer to use it instead.
>
> guidance would be appreciated.
>
> regards,
>
> al
Re: embedding GEF/draw2 viewer/figures in table/tree cell [message #10494 is a reply to message #10429] Fri, 01 September 2006 15:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alnospammajor.noboxspamspoon.com

jeremy,

thanks for the quick response.

the grid-like functionality that i can currently foresee (but can do
without at the present moment) is one where i have several kinds of
rows, for example summary rows and detail rows. each kind of row would
have its own set of columns. this could be addressed by having grid
cells that span columns. however i would like the columns to have
different titles based on the type of row that is selected (not entirely
sure this is good UI design, but you get the intention). i'm not sure
that even Grid currently supports this (column name changes based on
row, or equivalent UI feedback mechanism).

and i'm very vague on what CTableTree supports so i don't know how to
give more specific feedback about missing functionality.

ideally i'd like to have viewer functionality on top of the widget
that's a natural extension of the JFace content provider / label
provider model-support-infrastructure.

in terms of what i want to draw in a table cell, it's the image
extracted from a GEF viewer. it can be provided as a GEF viewer, a
draw2d figure, or even as an image. alternatively if i have access to
the GC, i could draw into it.

and i don't want to entirely rule out SWT/JFace. if supporting SWT
owner-draw cells in trees gets addressed in the 3.3 timeframe, that's a
viable option. there's existing content and label providers for this
tree that currently supply text/icons. ideally, i'd just extend them to
draw into a supplied GC (or equivalent).

also, one feature that may be needed in the future (not sure at the
moment) is the ability to interact with the GEF viewer in the cell. this
would rule out certain designs (such as providing just the image to the
widget), and i'm not sure just having the GC at paint time would be
sufficient either. i'd need some way to listen to mouse events. the
JFace architecture currently doesn't seem suited to this kind of
situation, so it may force the adoption of either Grid or CTableTree as
the case may be.

to summarize
a) it would be nice to have a relatively smooth transition from the
current code based on JFace content and label providers.
b) in the future, it may be necessary to have row types with different
numbers/names of columns.
c) in the future, it may be necessary to interact with the GEF viewer in
the cell.

regards,

al


Jeremy Dowdall wrote:
> Could you give a little more detail regarding how you would like to show
> these figures? A (small) mock-up picture may be helpful even.
> What is the "grid-like" functionality that is missing from the
> CTableTree (people have different interpretations of this, so I want to
> make sure I understand)
>
> Al Major wrote:
>> forgive the newbie question.
>>
>> i have a GEF/draw2d viewer/figure that i'd like to show in a tree-table
>> cell. my options are
>>
>> a) use Tree/TreeViewer from SWT/JFace and write owner-draw code that
>> will paint the figure into the appropriate cell. since there is very
>> little support for this use-case currently, i'll essentially have to
>> write everything from scratch. i'd prefer not to do this.
>>
>> b) use Nebula Grid? i'm completely new to nebula and not quite sure how
>> to do this, or if its even a use case for the grid. if it is not
>> currently a use-case, is this a direction that grid will be going in. if
>> so, will Grid and CTableTree features be merged at some point?
>>
>> c) use Nebula CTableTree which appears to have this kind of application
>> as an explicit use-case. i'm assuming this will be the easiest to do. my
>> one reservation is that i'll eventually be needing more grid-like
>> functionality. so if Grid is intended to support this use-case in the
>> near future, i'd prefer to use it instead.
>>
>> guidance would be appreciated.
>>
>> regards,
>>
>> al
Re: embedding GEF/draw2 viewer/figures in table/tree cell [message #10527 is a reply to message #10494] Fri, 01 September 2006 16:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alnospammajor.noboxspamspoon.com

one other feature that might be needed in the future for a related
use-case (in a different eclipse view) is to have a table structure that
allows for changing the height of rows. going by the screenshots,
CTableTree already appears to allow this. the Grid documentation
mentions a getItemHeight, but i'm not sure how (or even if) this can be
set. and i don't believe SWT/JFace Tree/Table allows this at all.

regards,

al
Re: embedding GEF/draw2 viewer/figures in table/tree cell [message #10558 is a reply to message #10494] Fri, 01 September 2006 16:32 Go to previous messageGo to next message
Chris Gross is currently offline Chris GrossFriend
Messages: 253
Registered: July 2009
Senior Member
> to summarize
> a) it would be nice to have a relatively smooth transition from the
> current code based on JFace content and label providers.
> b) in the future, it may be necessary to have row types with different
> numbers/names of columns.
> c) in the future, it may be necessary to interact with the GEF viewer in
> the cell.


Re b.) Grid supports row headers where you could put different labels
for different rows. Not sure if that is what you're looking for. I've
seen tables that allow you to repeat column headers in hierarchical
groupings but i think that looks lousy IMO. I might suggest a different
UI design if thats what you're trying to achieve.

Re c.) CTableTree may support this better, but Grid cells can respond to
mouse events. Currently this is limited to left button down and hover
events. This is used when tree toggles or checkboxes are shown within
cells. I'm not familiar enough with GEF to know how easy/hard it would
be to replicate the interaction necessary with these events.

Grid does not currently allow for differing heights between rows. It is
a feature that I've thought about and will probably make it in
eventually, but probably not soon.

-Chris
Re: embedding GEF/draw2 viewer/figures in table/tree cell [message #10591 is a reply to message #10558] Fri, 01 September 2006 20:36 Go to previous message
Eclipse UserFriend
Originally posted by: alnospammajor.noboxspamspoon.com

i downloaded the sources from CVS and also found the discussion on
nebula-dev. on a quick first look, it appears that CTableTree (with its
support for JFace style viewers as well as the SWT-Composite-in-a-cell
option) will provide the fastest path to getting something working.

so, unless the JFace support for owner-draw cells is out fairly soon,
i'll probably give CTableTree a shot.

regards,

al
Re: embedding GEF/draw2 viewer/figures in table/tree cell [message #564625 is a reply to message #10396] Fri, 01 September 2006 15:11 Go to previous message
Jeremy Dowdall is currently offline Jeremy DowdallFriend
Messages: 181
Registered: July 2009
Senior Member
Could you give a little more detail regarding how you would like to show
these figures? A (small) mock-up picture may be helpful even.
What is the "grid-like" functionality that is missing from the
CTableTree (people have different interpretations of this, so I want to
make sure I understand)

Al Major wrote:
> forgive the newbie question.
>
> i have a GEF/draw2d viewer/figure that i'd like to show in a tree-table
> cell. my options are
>
> a) use Tree/TreeViewer from SWT/JFace and write owner-draw code that
> will paint the figure into the appropriate cell. since there is very
> little support for this use-case currently, i'll essentially have to
> write everything from scratch. i'd prefer not to do this.
>
> b) use Nebula Grid? i'm completely new to nebula and not quite sure how
> to do this, or if its even a use case for the grid. if it is not
> currently a use-case, is this a direction that grid will be going in. if
> so, will Grid and CTableTree features be merged at some point?
>
> c) use Nebula CTableTree which appears to have this kind of application
> as an explicit use-case. i'm assuming this will be the easiest to do. my
> one reservation is that i'll eventually be needing more grid-like
> functionality. so if Grid is intended to support this use-case in the
> near future, i'd prefer to use it instead.
>
> guidance would be appreciated.
>
> regards,
>
> al
Re: embedding GEF/draw2 viewer/figures in table/tree cell [message #564664 is a reply to message #10429] Fri, 01 September 2006 15:51 Go to previous message
Al Major is currently offline Al MajorFriend
Messages: 72
Registered: July 2009
Member
jeremy,

thanks for the quick response.

the grid-like functionality that i can currently foresee (but can do
without at the present moment) is one where i have several kinds of
rows, for example summary rows and detail rows. each kind of row would
have its own set of columns. this could be addressed by having grid
cells that span columns. however i would like the columns to have
different titles based on the type of row that is selected (not entirely
sure this is good UI design, but you get the intention). i'm not sure
that even Grid currently supports this (column name changes based on
row, or equivalent UI feedback mechanism).

and i'm very vague on what CTableTree supports so i don't know how to
give more specific feedback about missing functionality.

ideally i'd like to have viewer functionality on top of the widget
that's a natural extension of the JFace content provider / label
provider model-support-infrastructure.

in terms of what i want to draw in a table cell, it's the image
extracted from a GEF viewer. it can be provided as a GEF viewer, a
draw2d figure, or even as an image. alternatively if i have access to
the GC, i could draw into it.

and i don't want to entirely rule out SWT/JFace. if supporting SWT
owner-draw cells in trees gets addressed in the 3.3 timeframe, that's a
viable option. there's existing content and label providers for this
tree that currently supply text/icons. ideally, i'd just extend them to
draw into a supplied GC (or equivalent).

also, one feature that may be needed in the future (not sure at the
moment) is the ability to interact with the GEF viewer in the cell. this
would rule out certain designs (such as providing just the image to the
widget), and i'm not sure just having the GC at paint time would be
sufficient either. i'd need some way to listen to mouse events. the
JFace architecture currently doesn't seem suited to this kind of
situation, so it may force the adoption of either Grid or CTableTree as
the case may be.

to summarize
a) it would be nice to have a relatively smooth transition from the
current code based on JFace content and label providers.
b) in the future, it may be necessary to have row types with different
numbers/names of columns.
c) in the future, it may be necessary to interact with the GEF viewer in
the cell.

regards,

al


Jeremy Dowdall wrote:
> Could you give a little more detail regarding how you would like to show
> these figures? A (small) mock-up picture may be helpful even.
> What is the "grid-like" functionality that is missing from the
> CTableTree (people have different interpretations of this, so I want to
> make sure I understand)
>
> Al Major wrote:
>> forgive the newbie question.
>>
>> i have a GEF/draw2d viewer/figure that i'd like to show in a tree-table
>> cell. my options are
>>
>> a) use Tree/TreeViewer from SWT/JFace and write owner-draw code that
>> will paint the figure into the appropriate cell. since there is very
>> little support for this use-case currently, i'll essentially have to
>> write everything from scratch. i'd prefer not to do this.
>>
>> b) use Nebula Grid? i'm completely new to nebula and not quite sure how
>> to do this, or if its even a use case for the grid. if it is not
>> currently a use-case, is this a direction that grid will be going in. if
>> so, will Grid and CTableTree features be merged at some point?
>>
>> c) use Nebula CTableTree which appears to have this kind of application
>> as an explicit use-case. i'm assuming this will be the easiest to do. my
>> one reservation is that i'll eventually be needing more grid-like
>> functionality. so if Grid is intended to support this use-case in the
>> near future, i'd prefer to use it instead.
>>
>> guidance would be appreciated.
>>
>> regards,
>>
>> al
Re: embedding GEF/draw2 viewer/figures in table/tree cell [message #564689 is a reply to message #10494] Fri, 01 September 2006 16:15 Go to previous message
Al Major is currently offline Al MajorFriend
Messages: 72
Registered: July 2009
Member
one other feature that might be needed in the future for a related
use-case (in a different eclipse view) is to have a table structure that
allows for changing the height of rows. going by the screenshots,
CTableTree already appears to allow this. the Grid documentation
mentions a getItemHeight, but i'm not sure how (or even if) this can be
set. and i don't believe SWT/JFace Tree/Table allows this at all.

regards,

al
Re: embedding GEF/draw2 viewer/figures in table/tree cell [message #564709 is a reply to message #10494] Fri, 01 September 2006 16:32 Go to previous message
Chris Gross is currently offline Chris GrossFriend
Messages: 471
Registered: July 2009
Senior Member
> to summarize
> a) it would be nice to have a relatively smooth transition from the
> current code based on JFace content and label providers.
> b) in the future, it may be necessary to have row types with different
> numbers/names of columns.
> c) in the future, it may be necessary to interact with the GEF viewer in
> the cell.


Re b.) Grid supports row headers where you could put different labels
for different rows. Not sure if that is what you're looking for. I've
seen tables that allow you to repeat column headers in hierarchical
groupings but i think that looks lousy IMO. I might suggest a different
UI design if thats what you're trying to achieve.

Re c.) CTableTree may support this better, but Grid cells can respond to
mouse events. Currently this is limited to left button down and hover
events. This is used when tree toggles or checkboxes are shown within
cells. I'm not familiar enough with GEF to know how easy/hard it would
be to replicate the interaction necessary with these events.

Grid does not currently allow for differing heights between rows. It is
a feature that I've thought about and will probably make it in
eventually, but probably not soon.

-Chris
Re: embedding GEF/draw2 viewer/figures in table/tree cell [message #564731 is a reply to message #10558] Fri, 01 September 2006 20:36 Go to previous message
Al Major is currently offline Al MajorFriend
Messages: 72
Registered: July 2009
Member
i downloaded the sources from CVS and also found the discussion on
nebula-dev. on a quick first look, it appears that CTableTree (with its
support for JFace style viewers as well as the SWT-Composite-in-a-cell
option) will provide the fastest path to getting something working.

so, unless the JFace support for owner-draw cells is out fairly soon,
i'll probably give CTableTree a shot.

regards,

al
Previous Topic:[PATCH] DateTimeCellEditor
Next Topic:toggle not appearing in tree column in CTableTree
Goto Forum:
  


Current Time: Fri Mar 29 06:44:31 GMT 2024

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

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

Back to the top