Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Add SWT Controls?
Add SWT Controls? [message #137186] Tue, 08 June 2004 20:57 Go to next message
Eclipse UserFriend
Originally posted by: jai.kejriwal.air2web.com

I am trying to create a WYSIWYG HTML editor. For text boxes, I thought it
would
be best to use the swt text widget that could be dragged and dropped.
However,
the text widget needs to have a Composite that it can be added on to. Does
this
mean that I will have to create my own visual representation of a text
widget by
extending the Figure class?

Also, if you all have any experience/ideas of how I should proceed with
creating a WYSIWYG
HTML editor, I welcome your input. Particularly, what layout should I use
for the base page,
and how should I handle code generation. I am a newbie so the help means a
lot.

Thanks,

Jai.

PS: so far, I have finally understood how the various components of GEF work
together and
been able to create a visual editor that allows the user to create labels,
put them on the editor
and edit the contents (string) of the label
Re: Add SWT Controls? [message #137209 is a reply to message #137186] Tue, 08 June 2004 22:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rlemaigr.ulb.ac.be

On Tue, 8 Jun 2004 16:57:45 -0400, Jai Kejriwal <jai.kejriwal@air2web.co=
m> =

wrote:

> I am trying to create a WYSIWYG HTML editor. For text boxes, I thought=
it
> would
> be best to use the swt text widget that could be dragged and dropped.
> However,
> the text widget needs to have a Composite that it can be added on to. =
=

> Does
> this
> mean that I will have to create my own visual representation of a text=

> widget by
> extending the Figure class?

There is a text package in draw2d, I have never used it but maybe you wi=
ll =

find your happiness there ?
Re: Add SWT Controls? [message #137231 is a reply to message #137186] Tue, 08 June 2004 23:02 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
"Jai Kejriwal" <jai.kejriwal@air2web.com> wrote in message
news:ca58p0$baj$1@eclipse.org...
> I am trying to create a WYSIWYG HTML editor. For text boxes, I thought it
> would
> be best to use the swt text widget that could be dragged and dropped.
> However,
> the text widget needs to have a Composite that it can be added on to. Does
> this
> mean that I will have to create my own visual representation of a text
> widget by
> extending the Figure class?

The draw2d.text package has a few things to help you out.

>
> Also, if you all have any experience/ideas of how I should proceed with
> creating a WYSIWYG
> HTML editor, I welcome your input. Particularly, what layout should I use
> for the base page,
> and how should I handle code generation. I am a newbie so the help means a
> lot.

WSAD has an HTML editor based on GEF. I believe there was a discussion
about that on this newsgroup before. Search for it.

>
> Thanks,
>
> Jai.
>
> PS: so far, I have finally understood how the various components of GEF
work
> together and
> been able to create a visual editor that allows the user to create labels,
> put them on the editor
> and edit the contents (string) of the label
>
>
>
Re: Add SWT Controls? [message #137508 is a reply to message #137186] Thu, 10 June 2004 12:10 Go to previous message
Eclipse UserFriend
Originally posted by: aullah.thinkanalytics.com

Jai Kejriwal wrote:
> I am trying to create a WYSIWYG HTML editor. For text boxes, I thought it
> would
> be best to use the swt text widget that could be dragged and dropped.
> However,
> the text widget needs to have a Composite that it can be added on to. Does
> this
> mean that I will have to create my own visual representation of a text
> widget by
> extending the Figure class?

> Also, if you all have any experience/ideas of how I should proceed with
> creating a WYSIWYG
> HTML editor, I welcome your input. Particularly, what layout should I use
> for the base page,
> and how should I handle code generation. I am a newbie so the help means a
> lot.

I'd create my own Draw2D figure to render text boxes and other html
elements. SWT widgets can't (as far as I know) be embedded in the GEF
GrapicalViewer's main (SWT) control. You're building blocks are Draw2D
figures. A nice emulated lightweight solution (c.f swing).

The other great advantage, is that a figure based TextField gives you the
the ability to style the appearance of the textbox, ie border, colour, etc.
You could create a base figure styling interface.
The TextField or TextBox, could be based on a draw2d.text FlowFigure.

You're also going to need to have some form of FlowLayout for the page,
to emulate how elements flow on a HTML page in a browser.

I guess the Logic Diagram labels are a good place to start looking.
Previous Topic:rapid interaction
Next Topic:How to determine coordinates of the popup menu action.
Goto Forum:
  


Current Time: Wed Sep 25 16:39:46 GMT 2024

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

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

Back to the top