Home > JavaFX, SWT > Java FX HTML Editor in Eclipse!

Java FX HTML Editor in Eclipse!

I did not care about JavaFX, Because It did not support OSX, and there was no legal OSGi bundle for it.

Now, JDK7 shipped with JavaFX, So there is no bundle problem anymore. JDK7 for OSX is also available now. And I heard that Oracle provides Embedding API for SWT.

So I’v tried to make a HTML Editor for Eclipse using JavaFX.

I could make a HTML WYSIWYG Edtior which supports HTML5/CSS3. Codes were unbelievably easy and short.

See in HD to improve readability.


Source codes(part):

<pre>public class HtmlEditor extends EditorPart {

	public void createPartControl(Composite parent) {
		canvas = new FXCanvas(parent, SWT.NONE);
		editor = new HTMLEditor();
		Scene scene = new Scene(editor);

		IDocument doc = documentProvider.getDocument(getEditorInput());

		editor.setOnKeyPressed(new EventHandler() {
			public void handle(KeyEvent event) {

I think we can use JavaFX Scene graph as a view of GEF too. It must be cool! It provides very high quality rendering results with performance. I will challenge this later.

Categories: JavaFX, SWT
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: