use of org.eclipse.draw2d.parts.ScrollableThumbnail in project cubrid-manager by CUBRID.
the class ERDThumbnailViewPart method drawThumbnail.
/**
* Draw the thumbnail
*
* @param rootEditPart
*/
private void drawThumbnail(ScalableFreeformRootEditPart rootEditPart) {
canvas = new Canvas(container, SWT.None);
canvas.setLayout(new FillLayout());
canvas.setBackground(ResourceManager.getColor(SWT.COLOR_WHITE));
liSystem = new LightweightSystem(canvas);
thumbnail = new ScrollableThumbnail((Viewport) rootEditPart.getFigure());
thumbnail.setViewport((Viewport) rootEditPart.getFigure());
thumbnail.setSource(rootEditPart.getLayer(LayerConstants.SCALABLE_LAYERS));
liSystem.setContents(thumbnail);
container.layout();
}
use of org.eclipse.draw2d.parts.ScrollableThumbnail in project dbeaver by dbeaver.
the class ERDOutlinePage method createControl.
/* (non-Javadoc)
* @see org.eclipse.ui.part.IPage#createControl(org.eclipse.swt.widgets.Composite)
*/
@Override
public void createControl(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);
}
use of org.eclipse.draw2d.parts.ScrollableThumbnail in project jbosstools-hibernate by jbosstools.
the class DiagramContentOutlinePage method initializeOverview.
/**
*/
protected void initializeOverview() {
LightweightSystem lws = new LightweightSystem(overview);
RootEditPart rep = getGraphicalViewer().getRootEditPart();
if (rep instanceof ScalableFreeformRootEditPart) {
ScalableFreeformRootEditPart root = (ScalableFreeformRootEditPart) rep;
if (this.thumbnail != null) {
this.thumbnail.deactivate();
}
thumbnail = new ScrollableThumbnail((Viewport) root.getFigure());
thumbnail.setBorder(new MarginBorder(3));
thumbnail.setSource(root.getLayer(LayerConstants.PRINTABLE_LAYERS));
lws.setContents(thumbnail);
}
}
Aggregations