Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » [ANN] Render WYSIWYG documents with Draw2D
[ANN] Render WYSIWYG documents with Draw2D [message #45415] Mon, 25 November 2002 17:06 Go to next message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

Draw2D, which is the painting and layout portion of GEF, has added a new
package for rendering WYSIWYG documents. Currently, the support is for
paragraphs of text which can contain multiple nested styles, such as
different fonts and font sizes.


  • Attachment: textflow.gif
    (Size: 14.10KB, Downloaded 173 times)
Re: [ANN] Render WYSIWYG documents with Draw2D [message #45539 is a reply to message #45415] Mon, 25 November 2002 20:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sy_cheung2.yahoo.com

Thanks Randy.

Can you please tell me where I can find example of using this? Will that in
the Logic Editor Example?

Thank you.

"Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
news:artlbm$1e7$1@rogue.oti.com...
> Draw2D, which is the painting and layout portion of GEF, has added a new
> package for rendering WYSIWYG documents. Currently, the support is for
> paragraphs of text which can contain multiple nested styles, such as
> different fonts and font sizes.
>
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #45628 is a reply to message #45415] Mon, 25 November 2002 20:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

A set of example "snippets", including the one pictured here, can be
obtained by checking out the project:
-org.eclipse.draw2d.examples
From the CVS repository.

Use anonymous login, via "pserver", to the /home/tools CVS root.

"Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
news:artlbm$1e7$1@rogue.oti.com...
> Draw2D, which is the painting and layout portion of GEF, has added a new
> package for rendering WYSIWYG documents. Currently, the support is for
> paragraphs of text which can contain multiple nested styles, such as
> different fonts and font sizes.
>
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #45658 is a reply to message #45628] Mon, 25 November 2002 20:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

Until a new build is made, you will also need to checkout the draw2d project
from the CVS server too.

"Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
news:aru0bu$89c$1@rogue.oti.com...
> A set of example "snippets", including the one pictured here, can be
> obtained by checking out the project:
> -org.eclipse.draw2d.examples
> From the CVS repository.
>
> Use anonymous login, via "pserver", to the /home/tools CVS root.
>
> "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> news:artlbm$1e7$1@rogue.oti.com...
> > Draw2D, which is the painting and layout portion of GEF, has added a new
> > package for rendering WYSIWYG documents. Currently, the support is for
> > paragraphs of text which can contain multiple nested styles, such as
> > different fonts and font sizes.
> >
> >
> >
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #45688 is a reply to message #45658] Mon, 25 November 2002 20:48 Go to previous messageGo to next message
Alex Selkov is currently offline Alex SelkovFriend
Messages: 73
Registered: July 2009
Member
Hmm. draw2d in cvs contains an error:

Error The method getStringExtents(String, Font) is undefined for the type
FlowUtilities FlowUtilities.java
org.eclipse.draw2d/src/org/eclipse/draw2d/text line 75 in
FlowUtilities.setupFragment(TextFragmentBox, Font, String)

And I can't run anything from .examples due to unresolved compilation
problems.

"Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
news:aru0df$8aa$1@rogue.oti.com...
> Until a new build is made, you will also need to checkout the draw2d
project
> from the CVS server too.
Re: [ANN] Render WYSIWYG documents with Draw2D [message #45718 is a reply to message #45688] Mon, 25 November 2002 21:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

I think I released the fix as you types this message.

"Alex Selkov" <as@empproject.com> wrote in message
news:aru29n$974$1@rogue.oti.com...
> Hmm. draw2d in cvs contains an error:
>
> Error The method getStringExtents(String, Font) is undefined for the
type
> FlowUtilities FlowUtilities.java
> org.eclipse.draw2d/src/org/eclipse/draw2d/text line 75 in
> FlowUtilities.setupFragment(TextFragmentBox, Font, String)
>
> And I can't run anything from .examples due to unresolved compilation
> problems.
>
> "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> news:aru0df$8aa$1@rogue.oti.com...
> > Until a new build is made, you will also need to checkout the draw2d
> project
> > from the CVS server too.
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #45748 is a reply to message #45718] Mon, 25 November 2002 21:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sy_cheung2.yahoo.com

Thanks.

Can I replace the Label and its TextCellEditor in the Logic Editor Example
with the new WYSIWYG editor?
Are those related? Or they are totally different things.



"Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
news:aru3jd$a9n$1@rogue.oti.com...
> I think I released the fix as you types this message.
>
> "Alex Selkov" <as@empproject.com> wrote in message
> news:aru29n$974$1@rogue.oti.com...
> > Hmm. draw2d in cvs contains an error:
> >
> > Error The method getStringExtents(String, Font) is undefined for the
> type
> > FlowUtilities FlowUtilities.java
> > org.eclipse.draw2d/src/org/eclipse/draw2d/text line 75 in
> > FlowUtilities.setupFragment(TextFragmentBox, Font, String)
> >
> > And I can't run anything from .examples due to unresolved compilation
> > problems.
> >
> > "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> > news:aru0df$8aa$1@rogue.oti.com...
> > > Until a new build is made, you will also need to checkout the draw2d
> > project
> > > from the CVS server too.
> >
> >
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #45776 is a reply to message #45718] Mon, 25 November 2002 22:14 Go to previous messageGo to next message
Alex Selkov is currently offline Alex SelkovFriend
Messages: 73
Registered: July 2009
Member
Very impressive. Can I emulate subscripts/superscripts?

"Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
news:aru3jd$a9n$1@rogue.oti.com...
> I think I released the fix as you types this message.
>
> "Alex Selkov" <as@empproject.com> wrote in message
> news:aru29n$974$1@rogue.oti.com...
> > Hmm. draw2d in cvs contains an error:
> >
> > Error The method getStringExtents(String, Font) is undefined for the
> type
> > FlowUtilities FlowUtilities.java
> > org.eclipse.draw2d/src/org/eclipse/draw2d/text line 75 in
> > FlowUtilities.setupFragment(TextFragmentBox, Font, String)
> >
> > And I can't run anything from .examples due to unresolved compilation
> > problems.
> >
> > "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> > news:aru0df$8aa$1@rogue.oti.com...
> > > Until a new build is made, you will also need to checkout the draw2d
> > project
> > > from the CVS server too.
> >
> >
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #45805 is a reply to message #45776] Tue, 26 November 2002 01:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

Sure, this would probably be pretty easy. I would do it like this:

class SuperInlineFlow extends InlineFlow {
//this is mostly a convenience class which set's the layout manager to the
one below.
//Also, I would override getFont() here to return a Font that is some
percentage of the parent's Font.
//But then you get into this big resource management nightmare, that makes
me want
//to get rid of SWT Font refererence all together, and use our own FontStyle
object
}

class SuperInlineFlowLayout extends InlineFlowLayout {
//uses AdjustedLineBoxes instead of LineBox
}

class AdjustedLineBox extends LineBox {
void makeBaseline(int baseline){
//this method would have to adjust the baseline that it passes to its
child boxes.
}
}

"Alex Selkov" <as@empproject.com> wrote in message
news:aru7bh$cga$1@rogue.oti.com...
> Very impressive. Can I emulate subscripts/superscripts?
>
> "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> news:aru3jd$a9n$1@rogue.oti.com...
> > I think I released the fix as you types this message.
> >
> > "Alex Selkov" <as@empproject.com> wrote in message
> > news:aru29n$974$1@rogue.oti.com...
> > > Hmm. draw2d in cvs contains an error:
> > >
> > > Error The method getStringExtents(String, Font) is undefined for the
> > type
> > > FlowUtilities FlowUtilities.java
> > > org.eclipse.draw2d/src/org/eclipse/draw2d/text line 75 in
> > > FlowUtilities.setupFragment(TextFragmentBox, Font, String)
> > >
> > > And I can't run anything from .examples due to unresolved compilation
> > > problems.
> > >
> > > "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> > > news:aru0df$8aa$1@rogue.oti.com...
> > > > Until a new build is made, you will also need to checkout the draw2d
> > > project
> > > > from the CVS server too.
> > >
> > >
> >
> >
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #45861 is a reply to message #45415] Tue, 26 November 2002 15:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ed.burnette.no.spam.sas.com

What's the relationship between this new package and the StyledText widget?
Is this native or emulated on Windows? If emulated, is there a native rich
text widget anywhere that you know about? Thanks.

"Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
news:artlbm$1e7$1@rogue.oti.com...
> Draw2D, which is the painting and layout portion of GEF, has added a new
> package for rendering WYSIWYG documents. Currently, the support is for
> paragraphs of text which can contain multiple nested styles, such as
> different fonts and font sizes.
>
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #45893 is a reply to message #45861] Tue, 26 November 2002 15:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

"Ed Burnette" <ed.burnette@no.spam.sas.com> wrote in message
news:as050p$c2k$1@rogue.oti.com...
> What's the relationship between this new package and the StyledText
widget?

No relationship. StyledText widget is very limited in what "styles" you can
render. For example, you cannot change the font, or add borders around
regions of text, or render Tables. Of course, you can't do those yet with
draw2d, but someone *has* already done so in their extensions to these
classes, which were available internally at IBM.

> Is this native or emulated on Windows? If emulated, is there a native rich
> text widget anywhere that you know about? Thanks.

Source editing used to be using a RichText control. But, Windows RichText
was a piece of crap, so Eclipse includes a StyledText widget, which was
suitable for their needs. If you need RichText support, this is as close as
you will get. It would be great if you wanted to help out with these new
classes.

> "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> news:artlbm$1e7$1@rogue.oti.com...
> > Draw2D, which is the painting and layout portion of GEF, has added a new
> > package for rendering WYSIWYG documents. Currently, the support is for
> > paragraphs of text which can contain multiple nested styles, such as
> > different fonts and font sizes.
> >
> >
> >
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #45911 is a reply to message #45893] Tue, 26 November 2002 21:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ed.burnette.no.spam.sas.com

That sounds interesting; are the internal extensions going to be part of
this or will they remain internal? Sounds like you could almost make an HTML
viewer with that - is that the application it was designed for? Also I'm
curious as to the technical/architectural reasons why the package is part of
GEF/Draw2D and not SWT/JFace. Finally, I don't think you mentioned the name
of the new package itself (a Javadoc url would be appreciated too). Thanks.

"Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
news:as05lp$cir$1@rogue.oti.com...
> StyledText widget is very limited in what "styles" you can
> render. For example, you cannot change the font, or add borders around
> regions of text, or render Tables. Of course, you can't do those yet with
> draw2d, but someone *has* already done so in their extensions to these
> classes, which were available internally at IBM.
Re: [ANN] Render WYSIWYG documents with Draw2D [message #45941 is a reply to message #45911] Wed, 27 November 2002 03:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

"Ed Burnette" <ed.burnette@no.spam.sas.com> wrote in message
news:as0ola$okv$1@rogue.oti.com...
> That sounds interesting; are the internal extensions going to be part of
> this or will they remain internal? Sounds like you could almost make an
HTML
> viewer with that - is that the application it was designed for? Also I'm

Not viewer, editor. IBM's Page Designer is an HTML/JSP editor built on top
of GEF. But the released package is only concerned with viewing. Any
editing support would go into the GEF plugin perhaps.

> curious as to the technical/architectural reasons why the package is part
of
> GEF/Draw2D and not SWT/JFace. Finally, I don't think you mentioned the
name

SWT/JFace is part of the base Platform. The Platform's focus is source-code
Editors like the java editor. The Platform is mostly developed by OTI.
GEF/draw2d was developed at IBM initially for internal use with Eclipse.

Draw2d is used as a platform for rendering text because it allows you to
compose lightweight figures that layout in an efficient way and paint using
double-buffering. Several complex issues have already been implemented in
Figure (such as coordinate systems, hit-detection, various notifiers), and
it makes sense to take advantage of this.

> of the new package itself (a Javadoc url would be appreciated too).
Thanks.

The package is org.eclipse.draw2d.text. For JavaDoc, you must go to the GEF
build page, download and install the SDK onto Eclipse 2.X, and open the
integrated help system. Our generated JavaDoc is not released onto our
website (which is just a CVS folder) because it would consume a lot of
space, and the builds aren't setup for this.

> "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> news:as05lp$cir$1@rogue.oti.com...
> > StyledText widget is very limited in what "styles" you can
> > render. For example, you cannot change the font, or add borders around
> > regions of text, or render Tables. Of course, you can't do those yet
with
> > draw2d, but someone *has* already done so in their extensions to these
> > classes, which were available internally at IBM.
>
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #46294 is a reply to message #45415] Fri, 29 November 2002 22:40 Go to previous messageGo to next message
Dieter Moroff is currently offline Dieter MoroffFriend
Messages: 24
Registered: July 2009
Junior Member
I tried to use a FlowPage within a Panel instead of a FigureCanvas. As a
result I see only the first word of every TextFlow all other word
disapeared. I can't use FigureCanvas because I use it as a figure for an
EditPart and I can't see how to get the required Composite parameter.
Anybody have an idea how to solve the problem.

Thanks
Dieter
Re: [ANN] Render WYSIWYG documents with Draw2D [message #46324 is a reply to message #46294] Sat, 30 November 2002 14:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

You must constrain the width of the page. For now, this means that your
panel must be in a Layout that will pass the width as a hint.
Try ToolbarLayout in Vertical orientation.

"Dieter Moroff" <Dieter.Moroff@web.de> wrote in message
news:as8q9j$no1$1@rogue.oti.com...
> I tried to use a FlowPage within a Panel instead of a FigureCanvas. As a
> result I see only the first word of every TextFlow all other word
> disapeared. I can't use FigureCanvas because I use it as a figure for an
> EditPart and I can't see how to get the required Composite parameter.
> Anybody have an idea how to solve the problem.
>
> Thanks
> Dieter
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #46354 is a reply to message #46324] Sat, 30 November 2002 14:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

In other words, what you are seeing is a really wide page, where each
paragraph is a single line.

"Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
news:asajkf$9eo$1@rogue.oti.com...
> You must constrain the width of the page. For now, this means that your
> panel must be in a Layout that will pass the width as a hint.
> Try ToolbarLayout in Vertical orientation.
>
> "Dieter Moroff" <Dieter.Moroff@web.de> wrote in message
> news:as8q9j$no1$1@rogue.oti.com...
> > I tried to use a FlowPage within a Panel instead of a FigureCanvas. As a
> > result I see only the first word of every TextFlow all other word
> > disapeared. I can't use FigureCanvas because I use it as a figure for an
> > EditPart and I can't see how to get the required Composite parameter.
> > Anybody have an idea how to solve the problem.
> >
> > Thanks
> > Dieter
> >
> >
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #46380 is a reply to message #46354] Sun, 01 December 2002 18:34 Go to previous messageGo to next message
Dieter Moroff is currently offline Dieter MoroffFriend
Messages: 24
Registered: July 2009
Junior Member
Hi Randy,

thanks for your tip. I put a ToolbarLayout in the panel, which holds the
flowpage, now it's works perfectly. Maybe it's a good idea to put a
multiline label based on these classes in draw2d package.

Thanks
Dieter

"Randy Hudson" <hudsonr@us.eye-bee-em.com> schrieb im Newsbeitrag
news:asajlp$9fb$1@rogue.oti.com...
> In other words, what you are seeing is a really wide page, where each
> paragraph is a single line.
>
> "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> news:asajkf$9eo$1@rogue.oti.com...
> > You must constrain the width of the page. For now, this means that your
> > panel must be in a Layout that will pass the width as a hint.
> > Try ToolbarLayout in Vertical orientation.
> >
> > "Dieter Moroff" <Dieter.Moroff@web.de> wrote in message
> > news:as8q9j$no1$1@rogue.oti.com...
> > > I tried to use a FlowPage within a Panel instead of a FigureCanvas. As
a
> > > result I see only the first word of every TextFlow all other word
> > > disapeared. I can't use FigureCanvas because I use it as a figure for
an
> > > EditPart and I can't see how to get the required Composite parameter.
> > > Anybody have an idea how to solve the problem.
> > >
> > > Thanks
> > > Dieter
> > >
> > >
> >
> >
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #46757 is a reply to message #45941] Tue, 03 December 2002 14:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Bram.Stieperaere.REMOVEskynet.be

Randy,

This is great, I could really use a replacement of StyledText with
richer markup possibilities (doc or rtf style) .
IMHO, What is missing in the examples right now is edit capability .
Also, tables and indentation/interlinea support would be nice to have.

Bram

"Randy Hudson" <none@us.ibm.com> wrote in message
news:as1dhe$2bv$1@rogue.oti.com...
>
> "Ed Burnette" <ed.burnette@no.spam.sas.com> wrote in message
> news:as0ola$okv$1@rogue.oti.com...
> > That sounds interesting; are the internal extensions going to be part of
> > this or will they remain internal? Sounds like you could almost make an
> HTML
> > viewer with that - is that the application it was designed for? Also I'm
>
> Not viewer, editor. IBM's Page Designer is an HTML/JSP editor built on
top
> of GEF. But the released package is only concerned with viewing. Any
> editing support would go into the GEF plugin perhaps.
>
> > curious as to the technical/architectural reasons why the package is
part
> of
> > GEF/Draw2D and not SWT/JFace. Finally, I don't think you mentioned the
> name
>
> SWT/JFace is part of the base Platform. The Platform's focus is
source-code
> Editors like the java editor. The Platform is mostly developed by OTI.
> GEF/draw2d was developed at IBM initially for internal use with Eclipse.
>
> Draw2d is used as a platform for rendering text because it allows you to
> compose lightweight figures that layout in an efficient way and paint
using
> double-buffering. Several complex issues have already been implemented in
> Figure (such as coordinate systems, hit-detection, various notifiers), and
> it makes sense to take advantage of this.
>
> > of the new package itself (a Javadoc url would be appreciated too).
> Thanks.
>
> The package is org.eclipse.draw2d.text. For JavaDoc, you must go to the
GEF
> build page, download and install the SDK onto Eclipse 2.X, and open the
> integrated help system. Our generated JavaDoc is not released onto our
> website (which is just a CVS folder) because it would consume a lot of
> space, and the builds aren't setup for this.
>
> > "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> > news:as05lp$cir$1@rogue.oti.com...
> > > StyledText widget is very limited in what "styles" you can
> > > render. For example, you cannot change the font, or add borders
around
> > > regions of text, or render Tables. Of course, you can't do those yet
> with
> > > draw2d, but someone *has* already done so in their extensions to these
> > > classes, which were available internally at IBM.
> >
> >
> >
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #46778 is a reply to message #46757] Tue, 03 December 2002 15:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

"Bram Stieperaere" <Bram.Stieperaere@REMOVEskynet.be> wrote in message
news:asicl1$omd$1@rogue.oti.com...
> Randy,
>
> This is great, I could really use a replacement of StyledText with
> richer markup possibilities (doc or rtf style) .
> IMHO, What is missing in the examples right now is edit capability .

I think that stuff is missing in everybody's opinion :-). We have to start
somewhere. I can tell you how IBM implements page designer (since this is
public knowledge). There is a special SelectionTool that manages keyboard
entry and the Caret location. There is a Model that is a DOM. There are
EditParts which synchronize the DOM to the draw2d Figures. This is how GEF
works, and it is the logical extension of GEF into text documents.

Are you familiar with EditParts?

> Also, tables and indentation/interlinea support would be nice to have.
>
> Bram
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:as1dhe$2bv$1@rogue.oti.com...
> >
> > "Ed Burnette" <ed.burnette@no.spam.sas.com> wrote in message
> > news:as0ola$okv$1@rogue.oti.com...
> > > That sounds interesting; are the internal extensions going to be part
of
> > > this or will they remain internal? Sounds like you could almost make
an
> > HTML
> > > viewer with that - is that the application it was designed for? Also
I'm
> >
> > Not viewer, editor. IBM's Page Designer is an HTML/JSP editor built on
> top
> > of GEF. But the released package is only concerned with viewing. Any
> > editing support would go into the GEF plugin perhaps.
> >
> > > curious as to the technical/architectural reasons why the package is
> part
> > of
> > > GEF/Draw2D and not SWT/JFace. Finally, I don't think you mentioned the
> > name
> >
> > SWT/JFace is part of the base Platform. The Platform's focus is
> source-code
> > Editors like the java editor. The Platform is mostly developed by OTI.
> > GEF/draw2d was developed at IBM initially for internal use with Eclipse.
> >
> > Draw2d is used as a platform for rendering text because it allows you to
> > compose lightweight figures that layout in an efficient way and paint
> using
> > double-buffering. Several complex issues have already been implemented
in
> > Figure (such as coordinate systems, hit-detection, various notifiers),
and
> > it makes sense to take advantage of this.
> >
> > > of the new package itself (a Javadoc url would be appreciated too).
> > Thanks.
> >
> > The package is org.eclipse.draw2d.text. For JavaDoc, you must go to the
> GEF
> > build page, download and install the SDK onto Eclipse 2.X, and open the
> > integrated help system. Our generated JavaDoc is not released onto our
> > website (which is just a CVS folder) because it would consume a lot of
> > space, and the builds aren't setup for this.
> >
> > > "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> > > news:as05lp$cir$1@rogue.oti.com...
> > > > StyledText widget is very limited in what "styles" you can
> > > > render. For example, you cannot change the font, or add borders
> around
> > > > regions of text, or render Tables. Of course, you can't do those
yet
> > with
> > > > draw2d, but someone *has* already done so in their extensions to
these
> > > > classes, which were available internally at IBM.
> > >
> > >
> > >
> >
> >
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #46868 is a reply to message #46778] Tue, 03 December 2002 17:01 Go to previous messageGo to next message
Alex Selkov is currently offline Alex SelkovFriend
Messages: 73
Registered: July 2009
Member
We also think about tree control with rich text support (something like used
in MS OE). How do you think is it worth for community? Anyway we will need
something like this in our application.

One thing we are dreaming about is an ability to drag'n'drop from editor to
palette. I mean, if you define some complex object in editor space, select
needed things and then DND to palette to extend some reusable templates
category... Is it possible to implement?

Last but not least - antialiasing. Any rumors about this? I think that that
is the only thing that one need to produce first class applications using
GEF.


"Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
news:asii6n$soc$1@rogue.oti.com...
>
> "Bram Stieperaere" <Bram.Stieperaere@REMOVEskynet.be> wrote in message
> news:asicl1$omd$1@rogue.oti.com...
> > Randy,
> >
> > This is great, I could really use a replacement of StyledText with
> > richer markup possibilities (doc or rtf style) .
> > IMHO, What is missing in the examples right now is edit capability .
>
> I think that stuff is missing in everybody's opinion :-). We have to start
> somewhere. I can tell you how IBM implements page designer (since this is
> public knowledge). There is a special SelectionTool that manages keyboard
> entry and the Caret location. There is a Model that is a DOM. There are
> EditParts which synchronize the DOM to the draw2d Figures. This is how
GEF
> works, and it is the logical extension of GEF into text documents.
>
> Are you familiar with EditParts?
>
> > Also, tables and indentation/interlinea support would be nice to have.
> >
> > Bram
> >
> > "Randy Hudson" <none@us.ibm.com> wrote in message
> > news:as1dhe$2bv$1@rogue.oti.com...
> > >
> > > "Ed Burnette" <ed.burnette@no.spam.sas.com> wrote in message
> > > news:as0ola$okv$1@rogue.oti.com...
> > > > That sounds interesting; are the internal extensions going to be
part
> of
> > > > this or will they remain internal? Sounds like you could almost make
> an
> > > HTML
> > > > viewer with that - is that the application it was designed for? Also
> I'm
> > >
> > > Not viewer, editor. IBM's Page Designer is an HTML/JSP editor built
on
> > top
> > > of GEF. But the released package is only concerned with viewing. Any
> > > editing support would go into the GEF plugin perhaps.
> > >
> > > > curious as to the technical/architectural reasons why the package is
> > part
> > > of
> > > > GEF/Draw2D and not SWT/JFace. Finally, I don't think you mentioned
the
> > > name
> > >
> > > SWT/JFace is part of the base Platform. The Platform's focus is
> > source-code
> > > Editors like the java editor. The Platform is mostly developed by OTI.
> > > GEF/draw2d was developed at IBM initially for internal use with
Eclipse.
> > >
> > > Draw2d is used as a platform for rendering text because it allows you
to
> > > compose lightweight figures that layout in an efficient way and paint
> > using
> > > double-buffering. Several complex issues have already been implemented
> in
> > > Figure (such as coordinate systems, hit-detection, various notifiers),
> and
> > > it makes sense to take advantage of this.
> > >
> > > > of the new package itself (a Javadoc url would be appreciated too).
> > > Thanks.
> > >
> > > The package is org.eclipse.draw2d.text. For JavaDoc, you must go to
the
> > GEF
> > > build page, download and install the SDK onto Eclipse 2.X, and open
the
> > > integrated help system. Our generated JavaDoc is not released onto
our
> > > website (which is just a CVS folder) because it would consume a lot of
> > > space, and the builds aren't setup for this.
> > >
> > > > "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> > > > news:as05lp$cir$1@rogue.oti.com...
> > > > > StyledText widget is very limited in what "styles" you can
> > > > > render. For example, you cannot change the font, or add borders
> > around
> > > > > regions of text, or render Tables. Of course, you can't do those
> yet
> > > with
> > > > > draw2d, but someone *has* already done so in their extensions to
> these
> > > > > classes, which were available internally at IBM.
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #46897 is a reply to message #46868] Tue, 03 December 2002 18:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

"Alex Selkov" <as@empproject.com> wrote in message
news:asinra$15b$1@rogue.oti.com...
> We also think about tree control with rich text support (something like
used
> in MS OE). How do you think is it worth for community? Anyway we will need
> something like this in our application.

I didn't understand this. What do mean by tree control? Are you talking
about "owner draw"?

> One thing we are dreaming about is an ability to drag'n'drop from editor
to
> palette. I mean, if you define some complex object in editor space, select
> needed things and then DND to palette to extend some reusable templates
> category... Is it possible to implement?

There are some SWT peculiarities with native Drag. You can do this. See
TransferDragSourceListener, TransferDropTargetListener. But, once you
decide to drag a part using native Drag, you will be forced to use native
drag simply to move the part within the graphical viewer. This can be done
as well, but you will no longer be using Tools, just a DropTarget.

> Last but not least - antialiasing. Any rumors about this? I think that
that
> is the only thing that one need to produce first class applications using
> GEF.

Nothing from the SWT team. Please see my previous post requesting that
people CC themselves to the bugzilla to give it more "votes".

> "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> news:asii6n$soc$1@rogue.oti.com...
> >
> > "Bram Stieperaere" <Bram.Stieperaere@REMOVEskynet.be> wrote in message
> > news:asicl1$omd$1@rogue.oti.com...
> > > Randy,
> > >
> > > This is great, I could really use a replacement of StyledText with
> > > richer markup possibilities (doc or rtf style) .
> > > IMHO, What is missing in the examples right now is edit capability .
> >
> > I think that stuff is missing in everybody's opinion :-). We have to
start
> > somewhere. I can tell you how IBM implements page designer (since this
is
> > public knowledge). There is a special SelectionTool that manages
keyboard
> > entry and the Caret location. There is a Model that is a DOM. There are
> > EditParts which synchronize the DOM to the draw2d Figures. This is how
> GEF
> > works, and it is the logical extension of GEF into text documents.
> >
> > Are you familiar with EditParts?
> >
> > > Also, tables and indentation/interlinea support would be nice to have.
> > >
> > > Bram
> > >
> > > "Randy Hudson" <none@us.ibm.com> wrote in message
> > > news:as1dhe$2bv$1@rogue.oti.com...
> > > >
> > > > "Ed Burnette" <ed.burnette@no.spam.sas.com> wrote in message
> > > > news:as0ola$okv$1@rogue.oti.com...
> > > > > That sounds interesting; are the internal extensions going to be
> part
> > of
> > > > > this or will they remain internal? Sounds like you could almost
make
> > an
> > > > HTML
> > > > > viewer with that - is that the application it was designed for?
Also
> > I'm
> > > >
> > > > Not viewer, editor. IBM's Page Designer is an HTML/JSP editor built
> on
> > > top
> > > > of GEF. But the released package is only concerned with viewing.
Any
> > > > editing support would go into the GEF plugin perhaps.
> > > >
> > > > > curious as to the technical/architectural reasons why the package
is
> > > part
> > > > of
> > > > > GEF/Draw2D and not SWT/JFace. Finally, I don't think you mentioned
> the
> > > > name
> > > >
> > > > SWT/JFace is part of the base Platform. The Platform's focus is
> > > source-code
> > > > Editors like the java editor. The Platform is mostly developed by
OTI.
> > > > GEF/draw2d was developed at IBM initially for internal use with
> Eclipse.
> > > >
> > > > Draw2d is used as a platform for rendering text because it allows
you
> to
> > > > compose lightweight figures that layout in an efficient way and
paint
> > > using
> > > > double-buffering. Several complex issues have already been
implemented
> > in
> > > > Figure (such as coordinate systems, hit-detection, various
notifiers),
> > and
> > > > it makes sense to take advantage of this.
> > > >
> > > > > of the new package itself (a Javadoc url would be appreciated
too).
> > > > Thanks.
> > > >
> > > > The package is org.eclipse.draw2d.text. For JavaDoc, you must go to
> the
> > > GEF
> > > > build page, download and install the SDK onto Eclipse 2.X, and open
> the
> > > > integrated help system. Our generated JavaDoc is not released onto
> our
> > > > website (which is just a CVS folder) because it would consume a lot
of
> > > > space, and the builds aren't setup for this.
> > > >
> > > > > "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> > > > > news:as05lp$cir$1@rogue.oti.com...
> > > > > > StyledText widget is very limited in what "styles" you can
> > > > > > render. For example, you cannot change the font, or add borders
> > > around
> > > > > > regions of text, or render Tables. Of course, you can't do
those
> > yet
> > > > with
> > > > > > draw2d, but someone *has* already done so in their extensions to
> > these
> > > > > > classes, which were available internally at IBM.
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #157506 is a reply to message #45805] Wed, 10 November 2004 08:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mazloumi.uni-mannheim.de

Hi,

I took a look at the examples in draw2d and have some questions:

1. How do I switch to an editor mode?

2. I would like to add a toolbar for italic, bold, font size, font type.
What would you suggest as a starting point? Do I use the
WorkbenchAdvisor? Is there a support for selection Listeners?

3. Also what would you suggest for adding tables, lists and images?

4. What would be the appropriate way to access the model of that editor.
I would like to serialize the content to XML. Something like this for
instance:

<paragraph><bold>ILP</bold> - <italic>Integer Linear
Programming</italic>: When one or more variables in an LP problem must
assume an integer value we have an Integer Linear Programming (ILP)
problem.</paragraph>

5. Would it make sense to use EMF and model the different FlowFigures
and the genmodel generate the WYSIWYG editor?

Greetings,
Nima

Randy Hudson wrote:
> Sure, this would probably be pretty easy. I would do it like this:
>
> class SuperInlineFlow extends InlineFlow {
> //this is mostly a convenience class which set's the layout manager to the
> one below.
> //Also, I would override getFont() here to return a Font that is some
> percentage of the parent's Font.
> //But then you get into this big resource management nightmare, that makes
> me want
> //to get rid of SWT Font refererence all together, and use our own FontStyle
> object
> }
>
> class SuperInlineFlowLayout extends InlineFlowLayout {
> //uses AdjustedLineBoxes instead of LineBox
> }
>
> class AdjustedLineBox extends LineBox {
> void makeBaseline(int baseline){
> //this method would have to adjust the baseline that it passes to its
> child boxes.
> }
> }
>
> "Alex Selkov" <as@empproject.com> wrote in message
> news:aru7bh$cga$1@rogue.oti.com...
>
>>Very impressive. Can I emulate subscripts/superscripts?
>>
>>"Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
>>news:aru3jd$a9n$1@rogue.oti.com...
>>
>>>I think I released the fix as you types this message.
>>>
>>>"Alex Selkov" <as@empproject.com> wrote in message
>>>news:aru29n$974$1@rogue.oti.com...
>>>
>>>>Hmm. draw2d in cvs contains an error:
>>>>
>>>>Error The method getStringExtents(String, Font) is undefined for the
>>>
>>>type
>>>
>>>>FlowUtilities FlowUtilities.java
>>>>org.eclipse.draw2d/src/org/eclipse/draw2d/text line 75 in
>>>>FlowUtilities.setupFragment(TextFragmentBox, Font, String)
>>>>
>>>>And I can't run anything from .examples due to unresolved compilation
>>>>problems.
>>>>
>>>>"Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
>>>>news:aru0df$8aa$1@rogue.oti.com...
>>>>
>>>>>Until a new build is made, you will also need to checkout the draw2d
>>>>
>>>>project
>>>>
>>>>>from the CVS server too.
>>>>
>>>>
>>>
>>
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #157562 is a reply to message #45628] Wed, 10 November 2004 18:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mazloumi.uni-mannheim.de

Hi,

Is there a way to add a SelectionListener to a FlowFigure? I want to
allow the user to select text inside a flow figure and change it font
settings. Or maybe selection the whole figure and changing its paramters.

Greetings,
Nima

Randy Hudson wrote:
> A set of example "snippets", including the one pictured here, can be
> obtained by checking out the project:
> -org.eclipse.draw2d.examples
> From the CVS repository.
>
> Use anonymous login, via "pserver", to the /home/tools CVS root.
>
> "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> news:artlbm$1e7$1@rogue.oti.com...
>
>>Draw2D, which is the painting and layout portion of GEF, has added a new
>>package for rendering WYSIWYG documents. Currently, the support is for
>>paragraphs of text which can contain multiple nested styles, such as
>>different fonts and font sizes.
>>
>>
>>
>
>
>
Re: [ANN] Render WYSIWYG documents with Draw2D [message #158357 is a reply to message #157506] Wed, 17 November 2004 18:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Sorry for not seeing these posts earlier. I have bookmarked the thread so
it's at the top of my newsreader now.

I have Bold, I, Underline infrastructure in place, and will release it today
if possible.

> 1. How do I switch to an editor mode?
>
> 2. I would like to add a toolbar for italic, bold, font size, font type.
> What would you suggest as a starting point? Do I use the
> WorkbenchAdvisor? Is there a support for selection Listeners?

> 3. Also what would you suggest for adding tables, lists and images?
>
> 4. What would be the appropriate way to access the model of that editor.
> I would like to serialize the content to XML. Something like this for
> instance:
>
> <paragraph><bold>ILP</bold> - <italic>Integer Linear
> Programming</italic>: When one or more variables in an LP problem must
> assume an integer value we have an Integer Linear Programming (ILP)
> problem.</paragraph>
>
> 5. Would it make sense to use EMF and model the different FlowFigures
> and the genmodel generate the WYSIWYG editor?

The difficult task is DEFINITELY writing the commands that edit the
document. EMF could not come close to generating the correct commands. For
example, given:

<B>bold text</B>some more text.

This looks like:

+ Document
+ Container(Bold)
-TextRun(bold text)
- TextRun(some more text.)

If the user selects "some more text.", and invokes bold, the text must be
re-parented to the existing nearby TextRun which is already bold, giving
you:

<B>bold textsome more text.</B>
+ Document
+ Container(Bold)
-TextRun(bold textsome more text.)

And that's a simple scenario! Here's another:

<U><B>bold text</B></U>some more text.

In this case, the <U> and <B> would have to get flipped around to simplify
the document.
Re: [ANN] Render WYSIWYG documents with Draw2D [message #158364 is a reply to message #157562] Wed, 17 November 2004 18:32 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Selection lives in GEF, not draw2d. This function will be released today or
tomorrow. Please check out the example.text project.
"Nima Mazloumi" <mazloumi@uni-mannheim.de> wrote in message
news:cmtlch$eto$1@eclipse.org...
> Hi,
>
> Is there a way to add a SelectionListener to a FlowFigure? I want to
> allow the user to select text inside a flow figure and change it font
> settings. Or maybe selection the whole figure and changing its paramters.
>
> Greetings,
> Nima
>
> Randy Hudson wrote:
> > A set of example "snippets", including the one pictured here, can be
> > obtained by checking out the project:
> > -org.eclipse.draw2d.examples
> > From the CVS repository.
> >
> > Use anonymous login, via "pserver", to the /home/tools CVS root.
> >
> > "Randy Hudson" <hudsonr@us.eye-bee-em.com> wrote in message
> > news:artlbm$1e7$1@rogue.oti.com...
> >
> >>Draw2D, which is the painting and layout portion of GEF, has added a new
> >>package for rendering WYSIWYG documents. Currently, the support is for
> >>paragraphs of text which can contain multiple nested styles, such as
> >>different fonts and font sizes.
> >>
> >>
> >>
> >
> >
> >
Previous Topic:Connection keep showing in the top left
Next Topic:How can I restrict the automatic scrolling with given height and width?
Goto Forum:
  


Current Time: Sat Sep 21 17:58:37 GMT 2024

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

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

Back to the top