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 |
Eclipse User |
|
|
|
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 #10494 is a reply to message #10429] |
Fri, 01 September 2006 15:51 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 #10591 is a reply to message #10558] |
Fri, 01 September 2006 20:36 |
Eclipse User |
|
|
|
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 #564664 is a reply to message #10429] |
Fri, 01 September 2006 15:51 |
Al Major 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
|
|
| | | |
Goto Forum:
Current Time: Mon Dec 30 17:48:47 GMT 2024
Powered by FUDForum. Page generated in 0.04248 seconds
|