It can be embedded in Java using OOoBean . The source code works under Swing, but you can make it work under SWT as well, using AWT / SWT Bridge ( sample code ).
The project is open source ( LGPL ). The code is OS-specific, but versions are available for all major OSs (Windows, Linux, MacOS and Solaris are supported on the project site, but you can also download the source code and compile it for others).
Since the base product is a full-featured office application, it offers all the features you might need (fantastic styles, online spell-checking in different languages, embedding images, text flow around images, you name it).
The disadvantage is that you must have OpenOffice installed; In fact, the editor is not part of Java, but it is a remote process that simply appears in your Java application window. This means that the startup time is quite noticeable and the performance can be sluggish. Also processing is sometimes "odd". Some configuration is required to get rid of extra borders and unwanted pagination.
Because of this, the editor is not really expandable with Java. You will have to either write code in C ++, or using your own built-in OOo language. What you can do is that you can register listeners in a document, and you have full access to the basic model of the document. This way you can catch on to important parts and change behavior, but this is often the same as doing keyhole operations.
My conclusion: if OO has the necessary functions, this may be the easiest way to get what you need. If you need a lot of customization, you will fight the upward battle against the default frames.
Aaron Digulla May 12 '09 at 2:41 p.m. 2009-05-12 14:41
source share