Home » Eclipse Projects » GEF » MultiLineLabel parent Composite from Draw2D Panel?
|
Re: MultiLineLabel parent Composite from Draw2D Panel? [message #146745 is a reply to message #146682] |
Fri, 06 August 2004 15:42 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
MultiLineLabel is just a convenience class for creating a PageFlow and a
TextFlow figure. If you want to compose multiline text inside other
figures, just use the text figures directly.
"Jeff Lawson" <jeff@cogentlogic.com> wrote in message
news:ceumnh$m8p$1@eclipse.org...
> Hi
>
> I need to display, on a Draw2D canvas, several org.eclipse.draw2d.Panel
> objects each containing a variety of IFigure objects plus one or more
> org.eclipse.draw2d.widgets.MultiLineLabel objects. I shall be grateful if
> someone could tell me what I am supposed to use as parent
> org.eclipse.swt.widgets.Composite objects for each MultiLineLabel. Thanks.
>
>
> Jeff
>
>
>
|
|
|
Re: MultiLineLabel parent Composite from Draw2D Panel? [message #146757 is a reply to message #146745] |
Fri, 06 August 2004 16:52 |
Jeff Lawson Messages: 26 Registered: July 2009 |
Junior Member |
|
|
Hi Randy,
Thanks. I really want to use org.eclipse.ui.forms.widgets.* within Draw2D
Panels, I just thought that referencing MultiLineLabel was a more
legitimate way to get it!
I've tried using ImageFigures the way that VEP does but I have a lot of
nested panels and many controls and it runs far too slow and looks awful
when temporary dialogs pop-up to render the imagery (there's a maimum size
issue too, though I was thinking about double-buffering, etc. but this is
approach is just not practical for me).
I am experimenting with FigureCanvas, maybe using it directly to add
org.eclipse.ui.forms.widgets.* children or via an intermediary Composite
that uses a custom layout manager. Either way, I am happy that the 'flat'
bunch of org.eclipse.ui.forms.widgets.* in the presentation will just map
to my model hierarchy and I will be able to deal with repositioning,
resizing, etc., albeit with some coordinate transformation.
I'll let you know how I get on but if you know of any show-stopper reasons
why this approach absolutely won't work or if you have any other
suggestions I'd be grateful to know.
Warmest regards,
Jeff
Randy Hudson wrote:
> MultiLineLabel is just a convenience class for creating a PageFlow and a
> TextFlow figure. If you want to compose multiline text inside other
> figures, just use the text figures directly.
> "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> news:ceumnh$m8p$1@eclipse.org...
> > Hi
> >
> > I need to display, on a Draw2D canvas, several org.eclipse.draw2d.Panel
> > objects each containing a variety of IFigure objects plus one or more
> > org.eclipse.draw2d.widgets.MultiLineLabel objects. I shall be grateful if
> > someone could tell me what I am supposed to use as parent
> > org.eclipse.swt.widgets.Composite objects for each MultiLineLabel. Thanks.
> >
> >
> > Jeff
> >
> >
> >
|
|
|
Re: MultiLineLabel parent Composite from Draw2D Panel? [message #146774 is a reply to message #146757] |
Fri, 06 August 2004 17:44 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
So, you want to mix the flat look&feel native controls inside a
graphicalviewer? So you want some native controls. What else do you want
that's making you use GEF? i.e. dragging around the controls. What are you
building?
"Jeff Lawson" <jeff@cogentlogic.com> wrote in message
news:cf0cvi$9tb$1@eclipse.org...
> Hi Randy,
>
> Thanks. I really want to use org.eclipse.ui.forms.widgets.* within Draw2D
> Panels, I just thought that referencing MultiLineLabel was a more
> legitimate way to get it!
>
> I've tried using ImageFigures the way that VEP does but I have a lot of
> nested panels and many controls and it runs far too slow and looks awful
> when temporary dialogs pop-up to render the imagery (there's a maimum size
> issue too, though I was thinking about double-buffering, etc. but this is
> approach is just not practical for me).
>
> I am experimenting with FigureCanvas, maybe using it directly to add
> org.eclipse.ui.forms.widgets.* children or via an intermediary Composite
> that uses a custom layout manager. Either way, I am happy that the 'flat'
> bunch of org.eclipse.ui.forms.widgets.* in the presentation will just map
> to my model hierarchy and I will be able to deal with repositioning,
> resizing, etc., albeit with some coordinate transformation.
>
> I'll let you know how I get on but if you know of any show-stopper reasons
> why this approach absolutely won't work or if you have any other
> suggestions I'd be grateful to know.
>
>
> Warmest regards,
>
> Jeff
>
>
>
> Randy Hudson wrote:
>
> > MultiLineLabel is just a convenience class for creating a PageFlow and a
> > TextFlow figure. If you want to compose multiline text inside other
> > figures, just use the text figures directly.
>
> > "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> > news:ceumnh$m8p$1@eclipse.org...
> > > Hi
> > >
> > > I need to display, on a Draw2D canvas, several
org.eclipse.draw2d.Panel
> > > objects each containing a variety of IFigure objects plus one or more
> > > org.eclipse.draw2d.widgets.MultiLineLabel objects. I shall be grateful
if
> > > someone could tell me what I am supposed to use as parent
> > > org.eclipse.swt.widgets.Composite objects for each MultiLineLabel.
Thanks.
> > >
> > >
> > > Jeff
> > >
> > >
> > >
>
>
|
|
|
Re: MultiLineLabel parent Composite from Draw2D Panel? [message #146777 is a reply to message #146774] |
Fri, 06 August 2004 17:56 |
Jeff Lawson Messages: 26 Registered: July 2009 |
Junior Member |
|
|
I'm developing a Forms-building application. There are very many complex
forms that I need to support and many more yet to be specified in a
re-usable system that needs to adapt to future requirements without more
ad hoc programming. Hence, the forms-builder tool.
I had originally anticipated writing the tool from scratch as a plug-in
until I saw GEF as a framework that integrates with Eclipse and provides
idioms that save me much work, such as the palette, properties, etc. I had
thought (briefly) of providing light-weight, IFigure-based
org.eclipse.ui.forms.widgets.* emulator classes but dismissed this as (i)
too much work and (ii) more work in the future if
org.eclipse.ui.forms.widgets.* is expanded.
Randy Hudson wrote:
> So, you want to mix the flat look&feel native controls inside a
> graphicalviewer? So you want some native controls. What else do you want
> that's making you use GEF? i.e. dragging around the controls. What are you
> building?
> "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> news:cf0cvi$9tb$1@eclipse.org...
> > Hi Randy,
> >
> > Thanks. I really want to use org.eclipse.ui.forms.widgets.* within Draw2D
> > Panels, I just thought that referencing MultiLineLabel was a more
> > legitimate way to get it!
> >
> > I've tried using ImageFigures the way that VEP does but I have a lot of
> > nested panels and many controls and it runs far too slow and looks awful
> > when temporary dialogs pop-up to render the imagery (there's a maimum size
> > issue too, though I was thinking about double-buffering, etc. but this is
> > approach is just not practical for me).
> >
> > I am experimenting with FigureCanvas, maybe using it directly to add
> > org.eclipse.ui.forms.widgets.* children or via an intermediary Composite
> > that uses a custom layout manager. Either way, I am happy that the 'flat'
> > bunch of org.eclipse.ui.forms.widgets.* in the presentation will just map
> > to my model hierarchy and I will be able to deal with repositioning,
> > resizing, etc., albeit with some coordinate transformation.
> >
> > I'll let you know how I get on but if you know of any show-stopper reasons
> > why this approach absolutely won't work or if you have any other
> > suggestions I'd be grateful to know.
> >
> >
> > Warmest regards,
> >
> > Jeff
> >
> >
> >
> > Randy Hudson wrote:
> >
> > > MultiLineLabel is just a convenience class for creating a PageFlow and a
> > > TextFlow figure. If you want to compose multiline text inside other
> > > figures, just use the text figures directly.
> >
> > > "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> > > news:ceumnh$m8p$1@eclipse.org...
> > > > Hi
> > > >
> > > > I need to display, on a Draw2D canvas, several
> org.eclipse.draw2d.Panel
> > > > objects each containing a variety of IFigure objects plus one or more
> > > > org.eclipse.draw2d.widgets.MultiLineLabel objects. I shall be grateful
> if
> > > > someone could tell me what I am supposed to use as parent
> > > > org.eclipse.swt.widgets.Composite objects for each MultiLineLabel.
> Thanks.
> > > >
> > > >
> > > > Jeff
> > > >
> > > >
> > > >
> >
> >
|
|
|
Re: MultiLineLabel parent Composite from Draw2D Panel? [message #146790 is a reply to message #146777] |
Fri, 06 August 2004 19:48 |
Jeff Lawson Messages: 26 Registered: July 2009 |
Junior Member |
|
|
Okay, org.eclipse.swt.widgets.Composite objects render perfectly fine on a
FigureCanvas but they occlude the repositon/resize handles. Rather than
spending ages trying to figure out how to reorder these layers, can you
please make a suggestion as this might be done?
Jeff Lawson wrote:
> I'm developing a Forms-building application. There are very many complex
> forms that I need to support and many more yet to be specified in a
> re-usable system that needs to adapt to future requirements without more
> ad hoc programming. Hence, the forms-builder tool.
> I had originally anticipated writing the tool from scratch as a plug-in
> until I saw GEF as a framework that integrates with Eclipse and provides
> idioms that save me much work, such as the palette, properties, etc. I had
> thought (briefly) of providing light-weight, IFigure-based
> org.eclipse.ui.forms.widgets.* emulator classes but dismissed this as (i)
> too much work and (ii) more work in the future if
> org.eclipse.ui.forms.widgets.* is expanded.
> Randy Hudson wrote:
> > So, you want to mix the flat look&feel native controls inside a
> > graphicalviewer? So you want some native controls. What else do you want
> > that's making you use GEF? i.e. dragging around the controls. What are
you
> > building?
> > "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> > news:cf0cvi$9tb$1@eclipse.org...
> > > Hi Randy,
> > >
> > > Thanks. I really want to use org.eclipse.ui.forms.widgets.* within Draw2D
> > > Panels, I just thought that referencing MultiLineLabel was a more
> > > legitimate way to get it!
> > >
> > > I've tried using ImageFigures the way that VEP does but I have a lot of
> > > nested panels and many controls and it runs far too slow and looks awful
> > > when temporary dialogs pop-up to render the imagery (there's a maimum
size
> > > issue too, though I was thinking about double-buffering, etc. but this is
> > > approach is just not practical for me).
> > >
> > > I am experimenting with FigureCanvas, maybe using it directly to add
> > > org.eclipse.ui.forms.widgets.* children or via an intermediary Composite
> > > that uses a custom layout manager. Either way, I am happy that the 'flat'
> > > bunch of org.eclipse.ui.forms.widgets.* in the presentation will just map
> > > to my model hierarchy and I will be able to deal with repositioning,
> > > resizing, etc., albeit with some coordinate transformation.
> > >
> > > I'll let you know how I get on but if you know of any show-stopper
reasons
> > > why this approach absolutely won't work or if you have any other
> > > suggestions I'd be grateful to know.
> > >
> > >
> > > Warmest regards,
> > >
> > > Jeff
> > >
> > >
> > >
> > > Randy Hudson wrote:
> > >
> > > > MultiLineLabel is just a convenience class for creating a PageFlow and
a
> > > > TextFlow figure. If you want to compose multiline text inside other
> > > > figures, just use the text figures directly.
> > >
> > > > "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> > > > news:ceumnh$m8p$1@eclipse.org...
> > > > > Hi
> > > > >
> > > > > I need to display, on a Draw2D canvas, several
> > org.eclipse.draw2d.Panel
> > > > > objects each containing a variety of IFigure objects plus one or more
> > > > > org.eclipse.draw2d.widgets.MultiLineLabel objects. I shall be
grateful
> > if
> > > > > someone could tell me what I am supposed to use as parent
> > > > > org.eclipse.swt.widgets.Composite objects for each MultiLineLabel.
> > Thanks.
> > > > >
> > > > >
> > > > > Jeff
> > > > >
> > > > >
> > > > >
> > >
> > >
|
|
|
Re: MultiLineLabel parent Composite from Draw2D Panel? [message #146814 is a reply to message #146790] |
Sun, 08 August 2004 20:29 |
Jeff Lawson Messages: 26 Registered: July 2009 |
Junior Member |
|
|
So, SWT needs double-buffering (with ability to copy to Draw2D's buffer)
for this to work. Until then (if ever), emulation is necessary. Ah, well,
ever onwards!
Jeff
Jeff Lawson wrote:
> Okay, org.eclipse.swt.widgets.Composite objects render perfectly fine on a
> FigureCanvas but they occlude the repositon/resize handles. Rather than
> spending ages trying to figure out how to reorder these layers, can you
> please make a suggestion as this might be done?
> Jeff Lawson wrote:
> > I'm developing a Forms-building application. There are very many complex
> > forms that I need to support and many more yet to be specified in a
> > re-usable system that needs to adapt to future requirements without more
> > ad hoc programming. Hence, the forms-builder tool.
> > I had originally anticipated writing the tool from scratch as a plug-in
> > until I saw GEF as a framework that integrates with Eclipse and provides
> > idioms that save me much work, such as the palette, properties, etc. I had
> > thought (briefly) of providing light-weight, IFigure-based
> > org.eclipse.ui.forms.widgets.* emulator classes but dismissed this as (i)
> > too much work and (ii) more work in the future if
> > org.eclipse.ui.forms.widgets.* is expanded.
> > Randy Hudson wrote:
> > > So, you want to mix the flat look&feel native controls inside a
> > > graphicalviewer? So you want some native controls. What else do you
want
> > > that's making you use GEF? i.e. dragging around the controls. What are
> you
> > > building?
> > > "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> > > news:cf0cvi$9tb$1@eclipse.org...
> > > > Hi Randy,
> > > >
> > > > Thanks. I really want to use org.eclipse.ui.forms.widgets.* within
Draw2D
> > > > Panels, I just thought that referencing MultiLineLabel was a more
> > > > legitimate way to get it!
> > > >
> > > > I've tried using ImageFigures the way that VEP does but I have a lot of
> > > > nested panels and many controls and it runs far too slow and looks
awful
> > > > when temporary dialogs pop-up to render the imagery (there's a maimum
> size
> > > > issue too, though I was thinking about double-buffering, etc. but this
is
> > > > approach is just not practical for me).
> > > >
> > > > I am experimenting with FigureCanvas, maybe using it directly to add
> > > > org.eclipse.ui.forms.widgets.* children or via an intermediary
Composite
> > > > that uses a custom layout manager. Either way, I am happy that the
'flat'
> > > > bunch of org.eclipse.ui.forms.widgets.* in the presentation will just
map
> > > > to my model hierarchy and I will be able to deal with repositioning,
> > > > resizing, etc., albeit with some coordinate transformation.
> > > >
> > > > I'll let you know how I get on but if you know of any show-stopper
> reasons
> > > > why this approach absolutely won't work or if you have any other
> > > > suggestions I'd be grateful to know.
> > > >
> > > >
> > > > Warmest regards,
> > > >
> > > > Jeff
> > > >
> > > >
> > > >
> > > > Randy Hudson wrote:
> > > >
> > > > > MultiLineLabel is just a convenience class for creating a PageFlow
and
> a
> > > > > TextFlow figure. If you want to compose multiline text inside other
> > > > > figures, just use the text figures directly.
> > > >
> > > > > "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> > > > > news:ceumnh$m8p$1@eclipse.org...
> > > > > > Hi
> > > > > >
> > > > > > I need to display, on a Draw2D canvas, several
> > > org.eclipse.draw2d.Panel
> > > > > > objects each containing a variety of IFigure objects plus one or
more
> > > > > > org.eclipse.draw2d.widgets.MultiLineLabel objects. I shall be
> grateful
> > > if
> > > > > > someone could tell me what I am supposed to use as parent
> > > > > > org.eclipse.swt.widgets.Composite objects for each MultiLineLabel.
> > > Thanks.
> > > > > >
> > > > > >
> > > > > > Jeff
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
|
|
|
Re: MultiLineLabel parent Composite from Draw2D Panel? [message #146888 is a reply to message #146790] |
Mon, 09 August 2004 15:03 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
You can place the handles further away from the composite, but that's about
it. If you need to nest things inside of each other, the handles cannot be
shown because they are lightweight and covered up by the outer composite.
You could create heavyweight handle :-(.
The VE project uses pictures of the real widgets withing GEF figures. That
way handles, dragging, etc. work, and you just update the pictures once the
changes are made.
"Jeff Lawson" <jeff@cogentlogic.com> wrote in message
news:cf0n9f$ojn$1@eclipse.org...
>
> Okay, org.eclipse.swt.widgets.Composite objects render perfectly fine on a
> FigureCanvas but they occlude the repositon/resize handles. Rather than
> spending ages trying to figure out how to reorder these layers, can you
> please make a suggestion as this might be done?
>
>
>
> Jeff Lawson wrote:
>
> > I'm developing a Forms-building application. There are very many complex
> > forms that I need to support and many more yet to be specified in a
> > re-usable system that needs to adapt to future requirements without more
> > ad hoc programming. Hence, the forms-builder tool.
>
> > I had originally anticipated writing the tool from scratch as a plug-in
> > until I saw GEF as a framework that integrates with Eclipse and provides
> > idioms that save me much work, such as the palette, properties, etc. I
had
> > thought (briefly) of providing light-weight, IFigure-based
> > org.eclipse.ui.forms.widgets.* emulator classes but dismissed this as
(i)
> > too much work and (ii) more work in the future if
> > org.eclipse.ui.forms.widgets.* is expanded.
>
>
>
> > Randy Hudson wrote:
>
> > > So, you want to mix the flat look&feel native controls inside a
> > > graphicalviewer? So you want some native controls. What else do you
want
> > > that's making you use GEF? i.e. dragging around the controls. What
are
> you
> > > building?
>
> > > "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> > > news:cf0cvi$9tb$1@eclipse.org...
> > > > Hi Randy,
> > > >
> > > > Thanks. I really want to use org.eclipse.ui.forms.widgets.* within
Draw2D
> > > > Panels, I just thought that referencing MultiLineLabel was a more
> > > > legitimate way to get it!
> > > >
> > > > I've tried using ImageFigures the way that VEP does but I have a lot
of
> > > > nested panels and many controls and it runs far too slow and looks
awful
> > > > when temporary dialogs pop-up to render the imagery (there's a
maimum
> size
> > > > issue too, though I was thinking about double-buffering, etc. but
this is
> > > > approach is just not practical for me).
> > > >
> > > > I am experimenting with FigureCanvas, maybe using it directly to add
> > > > org.eclipse.ui.forms.widgets.* children or via an intermediary
Composite
> > > > that uses a custom layout manager. Either way, I am happy that the
'flat'
> > > > bunch of org.eclipse.ui.forms.widgets.* in the presentation will
just map
> > > > to my model hierarchy and I will be able to deal with repositioning,
> > > > resizing, etc., albeit with some coordinate transformation.
> > > >
> > > > I'll let you know how I get on but if you know of any show-stopper
> reasons
> > > > why this approach absolutely won't work or if you have any other
> > > > suggestions I'd be grateful to know.
> > > >
> > > >
> > > > Warmest regards,
> > > >
> > > > Jeff
> > > >
> > > >
> > > >
> > > > Randy Hudson wrote:
> > > >
> > > > > MultiLineLabel is just a convenience class for creating a PageFlow
and
> a
> > > > > TextFlow figure. If you want to compose multiline text inside
other
> > > > > figures, just use the text figures directly.
> > > >
> > > > > "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> > > > > news:ceumnh$m8p$1@eclipse.org...
> > > > > > Hi
> > > > > >
> > > > > > I need to display, on a Draw2D canvas, several
> > > org.eclipse.draw2d.Panel
> > > > > > objects each containing a variety of IFigure objects plus one or
more
> > > > > > org.eclipse.draw2d.widgets.MultiLineLabel objects. I shall be
> grateful
> > > if
> > > > > > someone could tell me what I am supposed to use as parent
> > > > > > org.eclipse.swt.widgets.Composite objects for each
MultiLineLabel.
> > > Thanks.
> > > > > >
> > > > > >
> > > > > > Jeff
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
>
>
|
|
|
Re: MultiLineLabel parent Composite from Draw2D Panel? [message #146961 is a reply to message #146888] |
Mon, 09 August 2004 18:17 |
Jeff Lawson Messages: 26 Registered: July 2009 |
Junior Member |
|
|
Hi Randy, thanks for your response.
I found that the VE image-capture approach was easy to implement but,
because my forms require a lot of nesting, it was far too slow.
Furthermore, my outer panels, etc. are often larger that the display so
the clipped parts appear white (not drawn).
I cannot place handles further away than the composite because they would
still lie above other, containing composites (they would be confusing if
they were not occluded!).
Heavyweight handles...that's a good idea but the awkward part is in
handling the mouse events: composites swallow them up so the GEF/Draw2D
code won't work (unless they can somehow be re-routed). I find I spend far
too much time messing around with this sort of issue. Still, I didn't
think of heavyweight handles; I'm going to check this out!
Jeff
Randy Hudson wrote:
> You can place the handles further away from the composite, but that's about
> it. If you need to nest things inside of each other, the handles cannot be
> shown because they are lightweight and covered up by the outer composite.
> You could create heavyweight handle :-(.
> The VE project uses pictures of the real widgets withing GEF figures. That
> way handles, dragging, etc. work, and you just update the pictures once the
> changes are made.
> "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> news:cf0n9f$ojn$1@eclipse.org...
> >
> > Okay, org.eclipse.swt.widgets.Composite objects render perfectly fine on a
> > FigureCanvas but they occlude the repositon/resize handles. Rather than
> > spending ages trying to figure out how to reorder these layers, can you
> > please make a suggestion as this might be done?
> >
> >
> >
> > Jeff Lawson wrote:
> >
> > > I'm developing a Forms-building application. There are very many complex
> > > forms that I need to support and many more yet to be specified in a
> > > re-usable system that needs to adapt to future requirements without more
> > > ad hoc programming. Hence, the forms-builder tool.
> >
> > > I had originally anticipated writing the tool from scratch as a plug-in
> > > until I saw GEF as a framework that integrates with Eclipse and provides
> > > idioms that save me much work, such as the palette, properties, etc. I
> had
> > > thought (briefly) of providing light-weight, IFigure-based
> > > org.eclipse.ui.forms.widgets.* emulator classes but dismissed this as
> (i)
> > > too much work and (ii) more work in the future if
> > > org.eclipse.ui.forms.widgets.* is expanded.
> >
> >
> >
> > > Randy Hudson wrote:
> >
> > > > So, you want to mix the flat look&feel native controls inside a
> > > > graphicalviewer? So you want some native controls. What else do you
> want
> > > > that's making you use GEF? i.e. dragging around the controls. What
> are
> > you
> > > > building?
> >
> > > > "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> > > > news:cf0cvi$9tb$1@eclipse.org...
> > > > > Hi Randy,
> > > > >
> > > > > Thanks. I really want to use org.eclipse.ui.forms.widgets.* within
> Draw2D
> > > > > Panels, I just thought that referencing MultiLineLabel was a more
> > > > > legitimate way to get it!
> > > > >
> > > > > I've tried using ImageFigures the way that VEP does but I have a lot
> of
> > > > > nested panels and many controls and it runs far too slow and looks
> awful
> > > > > when temporary dialogs pop-up to render the imagery (there's a
> maimum
> > size
> > > > > issue too, though I was thinking about double-buffering, etc. but
> this is
> > > > > approach is just not practical for me).
> > > > >
> > > > > I am experimenting with FigureCanvas, maybe using it directly to add
> > > > > org.eclipse.ui.forms.widgets.* children or via an intermediary
> Composite
> > > > > that uses a custom layout manager. Either way, I am happy that the
> 'flat'
> > > > > bunch of org.eclipse.ui.forms.widgets.* in the presentation will
> just map
> > > > > to my model hierarchy and I will be able to deal with repositioning,
> > > > > resizing, etc., albeit with some coordinate transformation.
> > > > >
> > > > > I'll let you know how I get on but if you know of any show-stopper
> > reasons
> > > > > why this approach absolutely won't work or if you have any other
> > > > > suggestions I'd be grateful to know.
> > > > >
> > > > >
> > > > > Warmest regards,
> > > > >
> > > > > Jeff
> > > > >
> > > > >
> > > > >
> > > > > Randy Hudson wrote:
> > > > >
> > > > > > MultiLineLabel is just a convenience class for creating a PageFlow
> and
> > a
> > > > > > TextFlow figure. If you want to compose multiline text inside
> other
> > > > > > figures, just use the text figures directly.
> > > > >
> > > > > > "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> > > > > > news:ceumnh$m8p$1@eclipse.org...
> > > > > > > Hi
> > > > > > >
> > > > > > > I need to display, on a Draw2D canvas, several
> > > > org.eclipse.draw2d.Panel
> > > > > > > objects each containing a variety of IFigure objects plus one or
> more
> > > > > > > org.eclipse.draw2d.widgets.MultiLineLabel objects. I shall be
> > grateful
> > > > if
> > > > > > > someone could tell me what I am supposed to use as parent
> > > > > > > org.eclipse.swt.widgets.Composite objects for each
> MultiLineLabel.
> > > > Thanks.
> > > > > > >
> > > > > > >
> > > > > > > Jeff
> > > > > > >
> > > > > > >
> > > > > > >
> > > > >
> > > > >
> >
> >
|
|
|
Re: MultiLineLabel parent Composite from Draw2D Panel? [message #146977 is a reply to message #146961] |
Mon, 09 August 2004 19:00 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
"Jeff Lawson" <jeff@cogentlogic.com> wrote in message
news:cf8f4m$3b1$1@eclipse.org...
> Hi Randy, thanks for your response.
>
> I found that the VE image-capture approach was easy to implement but,
> because my forms require a lot of nesting, it was far too slow.
For nesting, there is no reason to capture the nested controls. Just
capture the outer-most one, and everything else is a "glass pane" figure
which is just showing the parent's capture.
> Furthermore, my outer panels, etc. are often larger that the display so
> the clipped parts appear white (not drawn).
Yuck. I'm not sure what to do about that, other than move things around and
take multiple pictures :-(. But, if the panels are larger than the display,
then you probably only need to show a portion to the user which fits on the
display.
> I cannot place handles further away than the composite because they would
> still lie above other, containing composites (they would be confusing if
> they were not occluded!).
> Heavyweight handles...that's a good idea but the awkward part is in
> handling the mouse events: composites swallow them up so the GEF/Draw2D
> code won't work (unless they can somehow be re-routed). I find I spend far
> too much time messing around with this sort of issue. Still, I didn't
> think of heavyweight handles; I'm going to check this out!
If you disable the native junk, you can still have figures/GEF which receive
the mouse events. So assuming you have figure's which are proxies to the
native forms stuff, you could have handles which are proxies to small
heavyweight controls. Proxy in this case is just synching up the placement
of the controls to match the figures. It's a real mess.
>
>
> Jeff
>
>
>
> Randy Hudson wrote:
>
> > You can place the handles further away from the composite, but that's
about
> > it. If you need to nest things inside of each other, the handles cannot
be
> > shown because they are lightweight and covered up by the outer
composite.
> > You could create heavyweight handle :-(.
>
> > The VE project uses pictures of the real widgets withing GEF figures.
That
> > way handles, dragging, etc. work, and you just update the pictures once
the
> > changes are made.
>
> > "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> > news:cf0n9f$ojn$1@eclipse.org...
> > >
> > > Okay, org.eclipse.swt.widgets.Composite objects render perfectly fine
on a
> > > FigureCanvas but they occlude the repositon/resize handles. Rather
than
> > > spending ages trying to figure out how to reorder these layers, can
you
> > > please make a suggestion as this might be done?
> > >
> > >
> > >
> > > Jeff Lawson wrote:
> > >
> > > > I'm developing a Forms-building application. There are very many
complex
> > > > forms that I need to support and many more yet to be specified in a
> > > > re-usable system that needs to adapt to future requirements without
more
> > > > ad hoc programming. Hence, the forms-builder tool.
> > >
> > > > I had originally anticipated writing the tool from scratch as a
plug-in
> > > > until I saw GEF as a framework that integrates with Eclipse and
provides
> > > > idioms that save me much work, such as the palette, properties, etc.
I
> > had
> > > > thought (briefly) of providing light-weight, IFigure-based
> > > > org.eclipse.ui.forms.widgets.* emulator classes but dismissed this
as
> > (i)
> > > > too much work and (ii) more work in the future if
> > > > org.eclipse.ui.forms.widgets.* is expanded.
> > >
> > >
> > >
> > > > Randy Hudson wrote:
> > >
> > > > > So, you want to mix the flat look&feel native controls inside a
> > > > > graphicalviewer? So you want some native controls. What else do
you
> > want
> > > > > that's making you use GEF? i.e. dragging around the controls.
What
> > are
> > > you
> > > > > building?
> > >
> > > > > "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> > > > > news:cf0cvi$9tb$1@eclipse.org...
> > > > > > Hi Randy,
> > > > > >
> > > > > > Thanks. I really want to use org.eclipse.ui.forms.widgets.*
within
> > Draw2D
> > > > > > Panels, I just thought that referencing MultiLineLabel was a
more
> > > > > > legitimate way to get it!
> > > > > >
> > > > > > I've tried using ImageFigures the way that VEP does but I have a
lot
> > of
> > > > > > nested panels and many controls and it runs far too slow and
looks
> > awful
> > > > > > when temporary dialogs pop-up to render the imagery (there's a
> > maimum
> > > size
> > > > > > issue too, though I was thinking about double-buffering, etc.
but
> > this is
> > > > > > approach is just not practical for me).
> > > > > >
> > > > > > I am experimenting with FigureCanvas, maybe using it directly to
add
> > > > > > org.eclipse.ui.forms.widgets.* children or via an intermediary
> > Composite
> > > > > > that uses a custom layout manager. Either way, I am happy that
the
> > 'flat'
> > > > > > bunch of org.eclipse.ui.forms.widgets.* in the presentation will
> > just map
> > > > > > to my model hierarchy and I will be able to deal with
repositioning,
> > > > > > resizing, etc., albeit with some coordinate transformation.
> > > > > >
> > > > > > I'll let you know how I get on but if you know of any
show-stopper
> > > reasons
> > > > > > why this approach absolutely won't work or if you have any other
> > > > > > suggestions I'd be grateful to know.
> > > > > >
> > > > > >
> > > > > > Warmest regards,
> > > > > >
> > > > > > Jeff
> > > > > >
> > > > > >
> > > > > >
> > > > > > Randy Hudson wrote:
> > > > > >
> > > > > > > MultiLineLabel is just a convenience class for creating a
PageFlow
> > and
> > > a
> > > > > > > TextFlow figure. If you want to compose multiline text inside
> > other
> > > > > > > figures, just use the text figures directly.
> > > > > >
> > > > > > > "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> > > > > > > news:ceumnh$m8p$1@eclipse.org...
> > > > > > > > Hi
> > > > > > > >
> > > > > > > > I need to display, on a Draw2D canvas, several
> > > > > org.eclipse.draw2d.Panel
> > > > > > > > objects each containing a variety of IFigure objects plus
one or
> > more
> > > > > > > > org.eclipse.draw2d.widgets.MultiLineLabel objects. I shall
be
> > > grateful
> > > > > if
> > > > > > > > someone could tell me what I am supposed to use as parent
> > > > > > > > org.eclipse.swt.widgets.Composite objects for each
> > MultiLineLabel.
> > > > > Thanks.
> > > > > > > >
> > > > > > > >
> > > > > > > > Jeff
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > > >
> > >
> > >
>
>
|
|
|
Re: MultiLineLabel parent Composite from Draw2D Panel? [message #148285 is a reply to message #146977] |
Fri, 20 August 2004 19:46 |
Jeff Lawson Messages: 26 Registered: July 2009 |
Junior Member |
|
|
Phew! That was a sod!
I now have SWT controls fully functioning within GEF.
I have a fully editable tree of SWT controls that sit on top an
identically positioned and sized tree of Draw2D panels.
To integrate with GEF, I needed to re-route SWT mouse events through to
the Draw2D panels. This required access to the LightweightSystem's
EventDispatcher, (in)accessible through the protected
getEventDispatcher(). So I extended LightweightSystem but then I needed to
install my LightweightSystem so I extended ScrollingGraphicalViewer to
override its createLightweightSystem().
All this was pretty straightforward (mouse coordinates need transforming,
of course).
One nasty problem required realizing that mouseEnter/mouseExit events
clear the drag tracker thereby thwarting mouse capture during a
resize/reposition operation.
I also had to mess around with resize imagery, e.g. overriding MoveHandle
so that it doesn't get drawn and moving the Draw2D handles so that they
partially lie under my SWT handles (that are internal to the bounds of SWT
controls).
The most difficult part was synchronizing the SWT locations to the Draw2D
locations and the model: different object-relative coordinates within a
scrolling view.
I'm left thinking that there are far too many protected methods and final
classes in the Eclipse APIs. Nonetheless, as I have always found in the
past, brute-force determination will eventually lead to working code. As
Ive mentioned this before: the Eclipse plug-in development documentation
is an order of magnitude too thin. Non-trivial plug-in development would
be impossible without the source code. Unfortunately, the good OOD
abstractions obfuscate too much!
Thanks to all Eclipse developers for continuing to work on such a powerful
system.
Jeff
Randy Hudson wrote:
> "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> news:cf8f4m$3b1$1@eclipse.org...
> > Hi Randy, thanks for your response.
> >
> > I found that the VE image-capture approach was easy to implement but,
> > because my forms require a lot of nesting, it was far too slow.
> For nesting, there is no reason to capture the nested controls. Just
> capture the outer-most one, and everything else is a "glass pane" figure
> which is just showing the parent's capture.
> > Furthermore, my outer panels, etc. are often larger that the display so
> > the clipped parts appear white (not drawn).
> Yuck. I'm not sure what to do about that, other than move things around and
> take multiple pictures :-(. But, if the panels are larger than the display,
> then you probably only need to show a portion to the user which fits on the
> display.
> > I cannot place handles further away than the composite because they would
> > still lie above other, containing composites (they would be confusing if
> > they were not occluded!).
> > Heavyweight handles...that's a good idea but the awkward part is in
> > handling the mouse events: composites swallow them up so the GEF/Draw2D
> > code won't work (unless they can somehow be re-routed). I find I spend far
> > too much time messing around with this sort of issue. Still, I didn't
> > think of heavyweight handles; I'm going to check this out!
> If you disable the native junk, you can still have figures/GEF which receive
> the mouse events. So assuming you have figure's which are proxies to the
> native forms stuff, you could have handles which are proxies to small
> heavyweight controls. Proxy in this case is just synching up the placement
> of the controls to match the figures. It's a real mess.
> >
> >
> > Jeff
> >
> >
> >
> > Randy Hudson wrote:
> >
> > > You can place the handles further away from the composite, but that's
> about
> > > it. If you need to nest things inside of each other, the handles cannot
> be
> > > shown because they are lightweight and covered up by the outer
> composite.
> > > You could create heavyweight handle :-(.
> >
> > > The VE project uses pictures of the real widgets withing GEF figures.
> That
> > > way handles, dragging, etc. work, and you just update the pictures once
> the
> > > changes are made.
> >
> > > "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> > > news:cf0n9f$ojn$1@eclipse.org...
> > > >
> > > > Okay, org.eclipse.swt.widgets.Composite objects render perfectly fine
> on a
> > > > FigureCanvas but they occlude the repositon/resize handles. Rather
> than
> > > > spending ages trying to figure out how to reorder these layers, can
> you
> > > > please make a suggestion as this might be done?
> > > >
> > > >
> > > >
> > > > Jeff Lawson wrote:
> > > >
> > > > > I'm developing a Forms-building application. There are very many
> complex
> > > > > forms that I need to support and many more yet to be specified in a
> > > > > re-usable system that needs to adapt to future requirements without
> more
> > > > > ad hoc programming. Hence, the forms-builder tool.
> > > >
> > > > > I had originally anticipated writing the tool from scratch as a
> plug-in
> > > > > until I saw GEF as a framework that integrates with Eclipse and
> provides
> > > > > idioms that save me much work, such as the palette, properties, etc.
> I
> > > had
> > > > > thought (briefly) of providing light-weight, IFigure-based
> > > > > org.eclipse.ui.forms.widgets.* emulator classes but dismissed this
> as
> > > (i)
> > > > > too much work and (ii) more work in the future if
> > > > > org.eclipse.ui.forms.widgets.* is expanded.
> > > >
> > > >
> > > >
> > > > > Randy Hudson wrote:
> > > >
> > > > > > So, you want to mix the flat look&feel native controls inside a
> > > > > > graphicalviewer? So you want some native controls. What else do
> you
> > > want
> > > > > > that's making you use GEF? i.e. dragging around the controls.
> What
> > > are
> > > > you
> > > > > > building?
> > > >
> > > > > > "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> > > > > > news:cf0cvi$9tb$1@eclipse.org...
> > > > > > > Hi Randy,
> > > > > > >
> > > > > > > Thanks. I really want to use org.eclipse.ui.forms.widgets.*
> within
> > > Draw2D
> > > > > > > Panels, I just thought that referencing MultiLineLabel was a
> more
> > > > > > > legitimate way to get it!
> > > > > > >
> > > > > > > I've tried using ImageFigures the way that VEP does but I have a
> lot
> > > of
> > > > > > > nested panels and many controls and it runs far too slow and
> looks
> > > awful
> > > > > > > when temporary dialogs pop-up to render the imagery (there's a
> > > maimum
> > > > size
> > > > > > > issue too, though I was thinking about double-buffering, etc.
> but
> > > this is
> > > > > > > approach is just not practical for me).
> > > > > > >
> > > > > > > I am experimenting with FigureCanvas, maybe using it directly to
> add
> > > > > > > org.eclipse.ui.forms.widgets.* children or via an intermediary
> > > Composite
> > > > > > > that uses a custom layout manager. Either way, I am happy that
> the
> > > 'flat'
> > > > > > > bunch of org.eclipse.ui.forms.widgets.* in the presentation will
> > > just map
> > > > > > > to my model hierarchy and I will be able to deal with
> repositioning,
> > > > > > > resizing, etc., albeit with some coordinate transformation.
> > > > > > >
> > > > > > > I'll let you know how I get on but if you know of any
> show-stopper
> > > > reasons
> > > > > > > why this approach absolutely won't work or if you have any other
> > > > > > > suggestions I'd be grateful to know.
> > > > > > >
> > > > > > >
> > > > > > > Warmest regards,
> > > > > > >
> > > > > > > Jeff
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Randy Hudson wrote:
> > > > > > >
> > > > > > > > MultiLineLabel is just a convenience class for creating a
> PageFlow
> > > and
> > > > a
> > > > > > > > TextFlow figure. If you want to compose multiline text inside
> > > other
> > > > > > > > figures, just use the text figures directly.
> > > > > > >
> > > > > > > > "Jeff Lawson" <jeff@cogentlogic.com> wrote in message
> > > > > > > > news:ceumnh$m8p$1@eclipse.org...
> > > > > > > > > Hi
> > > > > > > > >
> > > > > > > > > I need to display, on a Draw2D canvas, several
> > > > > > org.eclipse.draw2d.Panel
> > > > > > > > > objects each containing a variety of IFigure objects plus
> one or
> > > more
> > > > > > > > > org.eclipse.draw2d.widgets.MultiLineLabel objects. I shall
> be
> > > > grateful
> > > > > > if
> > > > > > > > > someone could tell me what I am supposed to use as parent
> > > > > > > > > org.eclipse.swt.widgets.Composite objects for each
> > > MultiLineLabel.
> > > > > > Thanks.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Jeff
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > > >
> > > >
> > > >
> >
> >
|
|
|
Goto Forum:
Current Time: Wed Jan 22 12:33:56 GMT 2025
Powered by FUDForum. Page generated in 0.05213 seconds
|