thumbnail view not as Content outline view [message #224612] |
Tue, 17 October 2006 09:44  |
Eclipse User |
|
|
|
I am looking for a way to create a thumbnail view of my GEF editor but not
as a ContentOulineView. Because I have already an outline view composed
of a tree of my diagram elements. So, I would like to have a thumbnail
view in a separate view. It is possible ? I know how to create a view, but
I dont know how to connect my view to my editor ?
For creating the view I need the root edit part of my GEF editor, but how
to give this root edit part to my view ?
Code of my view:
public void createPartControl(Composite parent)
{
// create canvas and lws
overview = new Canvas(parent, SWT.NONE);
LightweightSystem lws = new LightweightSystem(overview);
// create thumbnail
thumbnail =
new ScrollableThumbnail((Viewport) rootEditPart.getFigure());
thumbnail.setBorder(new MarginBorder(3));
thumbnail.setSource(
rootEditPart.getLayer(LayerConstants.PRINTABLE_LAYERS));
lws.setContents(thumbnail);
}
Thanks !
Sabri.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05150 seconds