Home » Eclipse Projects » GEF » Draw Table in the editor
Draw Table in the editor [message #107836] |
Wed, 03 December 2003 08:22 |
Shady Said Messages: 29 Registered: July 2009 |
Junior Member |
|
|
Hello all,
I want to have a table in the gef editor (as an editpart), what is the best
way to do that , taking in account that i want to have a header for the
table , be able to resize the cells , add border to the table,....
what figures can I use , what can be the edit parts to make(cell , row ,..
or what)
Thanks
|
|
|
Re: Draw Table in the editor [message #107850 is a reply to message #107836] |
Wed, 03 December 2003 10:06 |
Eclipse User |
|
|
|
Originally posted by: nospam.gmx.net
Hello Shady,
I managed to create a table similar to the one you described.
The components I used are the following: (I suggest, that you implement in
this order)
- the table editpart
- for each cell an own editpart
- for the tablefigure an own layoutmanager, which layouts your cells
(the most complicated part if you use colspan and rowspan)
- for the table-editpart an editpolicy, which creates the handles to
resize the cells (besides the handles to resize the table itself)
- handles consist of the handle-"figure", a locator, which tells the
handle the location where to rest and a resize tracker,
which handles drag and drop (resizing) and gives feedback to the
layoutmanager
- ( for the last two steps,have a look at the ResizableEditpolicy and copy
and adapt to your needs)
enjoy!
Regards, Ingo
"Shady Said" <sh_said@yahoo.com> wrote in message
news:bqk6bk$aeg$1@eclipse.org...
> Hello all,
> I want to have a table in the gef editor (as an editpart), what is the
best
> way to do that , taking in account that i want to have a header for the
> table , be able to resize the cells , add border to the table,....
> what figures can I use , what can be the edit parts to make(cell , row ,..
> or what)
> Thanks
>
>
>
|
|
|
Re: Draw Table in the editor [message #107862 is a reply to message #107850] |
Wed, 03 December 2003 12:43 |
Shady Said Messages: 29 Registered: July 2009 |
Junior Member |
|
|
What about the columns and rows ? did you need to make a column or row edit
part to hold the cells. The columns and rows may be useful to have separate
edit parts in order to handle things like header of the table and so.
<nospam@gmx.net> wrote in message news:bqkce2$i6l$1@eclipse.org...
> Hello Shady,
>
> I managed to create a table similar to the one you described.
> The components I used are the following: (I suggest, that you implement in
> this order)
>
> - the table editpart
> - for each cell an own editpart
> - for the tablefigure an own layoutmanager, which layouts your cells
> (the most complicated part if you use colspan and rowspan)
> - for the table-editpart an editpolicy, which creates the handles to
> resize the cells (besides the handles to resize the table itself)
> - handles consist of the handle-"figure", a locator, which tells the
> handle the location where to rest and a resize tracker,
> which handles drag and drop (resizing) and gives feedback to the
> layoutmanager
> - ( for the last two steps,have a look at the ResizableEditpolicy and
copy
> and adapt to your needs)
>
> enjoy!
>
> Regards, Ingo
>
>
>
> "Shady Said" <sh_said@yahoo.com> wrote in message
> news:bqk6bk$aeg$1@eclipse.org...
> > Hello all,
> > I want to have a table in the gef editor (as an editpart), what is the
> best
> > way to do that , taking in account that i want to have a header for the
> > table , be able to resize the cells , add border to the table,....
> > what figures can I use , what can be the edit parts to make(cell , row
,..
> > or what)
> > Thanks
> >
> >
> >
>
>
|
|
|
Re: Draw Table in the editor [message #107875 is a reply to message #107862] |
Wed, 03 December 2003 13:57 |
Eclipse User |
|
|
|
Originally posted by: nospam.gmx.net
Hello Shady,
of course you can place the cells in seperate row or column editparts,
but the disadvantage is that these editparts have to know attributes (size
etc)
of the other editparts. Keep in mind, that a resizing of one cell affects
cells,
which are adjacent to this cell, which would be placed in a different
edipart.
My approach is that you control the layout , which means placement and size
of the cells,
in a central instance or algorithm, the table-layoutmanager. I store width
and height of the
columns and rows in arrays, whose values are applied to the cells by the
layout-algorithm.
Ingo
"Shady Said" <sh_said@yahoo.com> wrote in message
news:bqklma$tcc$1@eclipse.org...
>
> What about the columns and rows ? did you need to make a column or row
edit
> part to hold the cells. The columns and rows may be useful to have
separate
> edit parts in order to handle things like header of the table and so.
>
>
> <nospam@gmx.net> wrote in message news:bqkce2$i6l$1@eclipse.org...
> > Hello Shady,
> >
> > I managed to create a table similar to the one you described.
> > The components I used are the following: (I suggest, that you implement
in
> > this order)
> >
> > - the table editpart
> > - for each cell an own editpart
> > - for the tablefigure an own layoutmanager, which layouts your cells
> > (the most complicated part if you use colspan and rowspan)
> > - for the table-editpart an editpolicy, which creates the handles to
> > resize the cells (besides the handles to resize the table itself)
> > - handles consist of the handle-"figure", a locator, which tells the
> > handle the location where to rest and a resize tracker,
> > which handles drag and drop (resizing) and gives feedback to the
> > layoutmanager
> > - ( for the last two steps,have a look at the ResizableEditpolicy and
> copy
> > and adapt to your needs)
> >
> > enjoy!
> >
> > Regards, Ingo
> >
> >
> >
> > "Shady Said" <sh_said@yahoo.com> wrote in message
> > news:bqk6bk$aeg$1@eclipse.org...
> > > Hello all,
> > > I want to have a table in the gef editor (as an editpart), what is the
> > best
> > > way to do that , taking in account that i want to have a header for
the
> > > table , be able to resize the cells , add border to the table,....
> > > what figures can I use , what can be the edit parts to make(cell , row
> ,..
> > > or what)
> > > Thanks
> > >
> > >
> > >
> >
> >
>
>
>
|
|
|
Re: Draw Table in the editor [message #107891 is a reply to message #107862] |
Wed, 03 December 2003 14:04 |
Eclipse User |
|
|
|
Originally posted by: nospam.gmx.net
Ahem,
since many people are implementing a table layout,
what about a generic default table implementation (with resizability) as
part of GEF?
Or is this the job of the draw2D guys?
regards, Ingo
"Shady Said" <sh_said@yahoo.com> wrote in message
news:bqklma$tcc$1@eclipse.org...
>
> What about the columns and rows ? did you need to make a column or row
edit
> part to hold the cells. The columns and rows may be useful to have
separate
> edit parts in order to handle things like header of the table and so.
>
>
> <nospam@gmx.net> wrote in message news:bqkce2$i6l$1@eclipse.org...
> > Hello Shady,
> >
> > I managed to create a table similar to the one you described.
> > The components I used are the following: (I suggest, that you implement
in
> > this order)
> >
> > - the table editpart
> > - for each cell an own editpart
> > - for the tablefigure an own layoutmanager, which layouts your cells
> > (the most complicated part if you use colspan and rowspan)
> > - for the table-editpart an editpolicy, which creates the handles to
> > resize the cells (besides the handles to resize the table itself)
> > - handles consist of the handle-"figure", a locator, which tells the
> > handle the location where to rest and a resize tracker,
> > which handles drag and drop (resizing) and gives feedback to the
> > layoutmanager
> > - ( for the last two steps,have a look at the ResizableEditpolicy and
> copy
> > and adapt to your needs)
> >
> > enjoy!
> >
> > Regards, Ingo
> >
> >
> >
> > "Shady Said" <sh_said@yahoo.com> wrote in message
> > news:bqk6bk$aeg$1@eclipse.org...
> > > Hello all,
> > > I want to have a table in the gef editor (as an editpart), what is the
> > best
> > > way to do that , taking in account that i want to have a header for
the
> > > table , be able to resize the cells , add border to the table,....
> > > what figures can I use , what can be the edit parts to make(cell , row
> ,..
> > > or what)
> > > Thanks
> > >
> > >
> > >
> >
> >
>
>
>
|
|
|
Goto Forum:
Current Time: Sat Dec 21 17:20:42 GMT 2024
Powered by FUDForum. Page generated in 0.04611 seconds
|