Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » gef and html
gef and html [message #244833] Fri, 08 August 2008 16:25 Go to next message
Eclipse UserFriend
Originally posted by: michael.jurke.justinmind.com

Hello All,

is there any possibility to represent HTML in some GEF Figure or much
better to use integrate some Browser features and representation to GEF?

I thought about using org.eclipse.swt.browser.Browser, but as I read it
is not possible/easy to use SWT Widgets in GEF (the only solution I have
heard about is to use screenshots).
Does anyone know a way to use the eclipse Browser class?

An alternative to get formatable text boxes would be to implement a
WYSIWIG text editor from the example my own
(org.eclipse.gef.examples.text - is this project really totally
abondoned?) my own. And afterwards integrate JavaScript and Flash which
are requirements, too. What is apart from possible, isn't it?

Thanks for your help.
MJ
Re: gef and html [message #244839 is a reply to message #244833] Mon, 11 August 2008 11:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

do you want to use the browser in the edit part? edit part only takes figure as there view, you will have to change a lot in the gef library to do that..,
Re: gef and html [message #244855 is a reply to message #244839] Mon, 11 August 2008 13:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michael.jurke.justinmind.com

sharad wrote:
> do you want to use the browser in the edit part? edit part only takes figure as there view, you will have to change a lot in the gef library to do that..,

Yes, to be able to use the browser would be perfect :(. It treats about
a framework to simulate applications. So at long sight it is to simulate
not only html view, but flash, JavaScript and whatever a browser offers,
too.

May you say something about if it would be possible to change gef's
library to be able to use the browser (and others widgets)? And where
could one start? Or is it simply apart from everything.
At first view it seems the correct way for me respectively all the
required functionalities and it might be finally less work, specially
for maintainance but also because we don't have other ideas how to
simulate flash i.e.

One the other hand a lot of things already work with some overlaying
event tricks. We only can do it like this because of "figures as there
view" but sometimes it's just too ugly.

Thanks a lot for your reply!
Greetings
MJ
Re: gef and html [message #244888 is a reply to message #244855] Tue, 12 August 2008 09:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

i think you can still try with GEF.. i am not so well aware of the browser library, did you tried to attach it over the figure? or put some common layer over the figure and then put the browser?...
Re: gef and html, swt widgets, figures [message #244897 is a reply to message #244888] Tue, 12 August 2008 15:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michael.jurke.justinmind.com

sharad wrote:
> i think you can still try with GEF.. i am not so well aware of the browser library, did you tried to attach it over the figure? or put some common layer over the figure and then put the browser?...

Thanks a lot for your reply.

Well, do you have any ideas how to attach an swt widget (i.e. the
browser) over a draw2d figure?
What do you mean with putting a common layer over the figure, are there
layers that would permit adding/overlaying swt widgets?

In this newsgroup I found some question from december ("SWT Widget
inside Figure") where there is shared a possibility by changing few
framework classes and it might work a bit (with the mentioned problems :( ).

Any suggestions? Greetings,
MJ
Re: gef and html, swt widgets, figures [message #244912 is a reply to message #244897] Wed, 13 August 2008 08:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

the browser is of wideget - scrollable - composite hierarchy, and the figure is of IFigure - Figure.

it will be really difficult at present to integrate the browser on the figure, but still not possible...

if you will start doing this from scratch then you will have to do lot of work, but on the other hand you can alter the GEF and draw2d source code and build an extra feature of adding widgets also...

you can start it from the AbstractGraphicalEditPart which is been used by the RootEditPart and all the other edit parts.
create a method createWidget or something, like createFigure method..
like the primary layer, connection layer etc..(ScalableRootEditPart) create a composite layer and add it to the shell of the editor, like what we do for dialogs. give your own style to that shell so that it will look like an edit part (confine this shell to be inside the editor area).

now figures are fetched from getFigure-AbstractGraphicalEditPart which is been called from addChildVisual-AbstractGraphicalEditPart.
change the implementation in these and so in the interface also and may be you will be up with a widget edit part...

i have just gave a large idea to show you the possibility, but if you will try you can surely do this..,
Re: gef and html, swt widgets, figures [message #244940 is a reply to message #244912] Thu, 14 August 2008 14:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michael.jurke.justinmind.com

sharad wrote:
> the browser is of wideget - scrollable - composite hierarchy, and the figure is of IFigure - Figure.
>
> it will be really difficult at present to integrate the browser on the figure, but still not possible...
>
> if you will start doing this from scratch then you will have to do lot of work, but on the other hand you can alter the GEF and draw2d source code and build an extra feature of adding widgets also...
>
> you can start it from the AbstractGraphicalEditPart which is been used by the RootEditPart and all the other edit parts.
> create a method createWidget or something, like createFigure method..
> like the primary layer, connection layer etc..(ScalableRootEditPart) create a composite layer and add it to the shell of the editor, like what we do for dialogs. give your own style to that shell so that it will
look like an edit part (confine this shell to be inside the editor area).
>
> now figures are fetched from getFigure-AbstractGraphicalEditPart which is been called from addChildVisual-AbstractGraphicalEditPart.
> change the implementation in these and so in the interface also and may be you will be up with a widget edit part...
>
> i have just gave a large idea to show you the possibility, but if you will try you can surely do this..,

Yesterday I just used the FigureCanvas of the GraphicalViewer as parent
of the widgets and the widgets as a member of my Figure. You can add
them like this. But zoom does not work (to solve with separated
zoom-events) and there are some event issues.
Your approach would make a difference?

I'm sorry, but I still don't get how to get a composite or common
Layer. How can you get a Layer that is a Figure to be a composite
between SWT and draw2d ... what is the main problem.
What are your refering to with "like we do for dialogs", don't they have
the application's (or GraphicalViewer's) shell as parent? It would be
nice to be able to overlay the widget with some Figure, solve some problems.

Thanks a lot for sharing your idea! We'll keep on testing.
MJ
Re: gef and html, swt widgets, figures [message #245024 is a reply to message #244940] Wed, 20 August 2008 06:41 Go to previous message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

my main theme was,

in gef all the figures are added to the primary layer which is also a figure type.
now the browser is of composite type...
so you can create one more layer of composite like the primary layer and call it composite layer. this layer will be used to add widgets.

if you will start this way later you can add other functionalities also..,
Previous Topic:same filename for model and diagram
Next Topic:Problems with Labels (DirectEditRequest)
Goto Forum:
  


Current Time: Thu Apr 18 06:30:30 GMT 2024

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

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

Back to the top