Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » how to show a svg file in the editor
how to show a svg file in the editor [message #175322] Tue, 04 March 2008 02:50 Go to next message
Eclipse UserFriend
Originally posted by: yuanqiulu.163.com

I'm learning some gmf examples from the eclipse CVS.
But I don't know how to show a customed svg picture in the editor.
I've tried the following codes, but it seems there is something wrong.
I could show the svg, but the svg cannot move and modify and the editor is
cannot be edited anymore.
Have any others met the same problem before?

> protected IFigure createNodeShape() {
> return primaryShape = new ScalableImageFigure(getRenderedImage(), true,
> true, true);
> }

> protected RenderedImage getRenderedImage() {
> URL url = null;
> url = FileLocator.find(OrgmlOrganisationDiagramEditorPlugin
> .getInstance().getBundle(), new Path("icons/nodes/group.png"), null);
> return RenderedImageFactory.getInstance(url);
> }

> protected RenderedImage getRenderedImage() {
> URL url = null;
> url = FileLocator.find(OrgmlOrganisationDiagramEditorPlugin
> .getInstance().getBundle(), new Path("icons/nodes/group.png"), null);
> return RenderedImageFactory.getInstance(url);
> }
Re: how to show a svg file in the editor [message #175339 is a reply to message #175322] Tue, 04 March 2008 03:02 Go to previous message
Eclipse UserFriend
Originally posted by: yuanqiulu.163.com

And the svg showed in the editor is on the left top of the editor.
Previous Topic:2.1 M5 not opening new editor on double click of node, 2.0.2 does
Next Topic:how to create programmatically a note attachment
Goto Forum:
  


Current Time: Tue Apr 23 14:25:17 GMT 2024

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

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

Back to the top