Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Swing components not editable
Swing components not editable [message #661652] Fri, 25 March 2011 17:40
Uhlersoth 872325412 is currently offline Uhlersoth 872325412Friend
Messages: 8
Registered: July 2009
Junior Member
I'm currently trying to figure out how to handle HTML in an Eclipse plugin (http:// www.eclipse.org/forums/index.php?t=msg&th=206632&sta rt=0&S=7ea6e307b48490c443b3c591928c21e8).

My second attempt is to embed a JEditorPane inside my Eclipse editor as follows:

	public HTMLEditor(Composite parent) {
		super(parent, SWT.EMBEDDED);
		html = new JEditorPane();
		html.setContentType("text/html");
		html.setEnabled(true);
		html.setEditable(true);
		

		frame = SWT_AWT.new_Frame(this);
		frame.add(new JScrollPane(html));
		frame.setEnabled(true);
	}


		compose = new HTMLEditor(getContainer());
		compose.setText("<html><body><h1>Title of the Page</h1>hello world</body></html>");
		int index = addPage(compose);


The panel appears just fine in my Eclipse editor. However, it's not editable. Any ideas why? The same code works fine in a plain old Java app.
Previous Topic:PDE
Next Topic:Creating the Dependent plugins
Goto Forum:
  


Current Time: Fri Dec 19 17:40:29 GMT 2014

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

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