protected IFigure createDummy() { Layer layer = getTargetViewer().getLayer(GEF.LAYER_PRESENTATION); if (layer != null) { SizeableImageFigure dummy = new SizeableImageFigure(((IMarkerPart) getSource()).getImage()); dummy.setStretched(true); dummy.setConstrained(true); dummy.setBounds(getSource().getFigure().getBounds()); layer.add(dummy); return dummy; } return null; }
/* * (non-Javadoc) * * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure() */ @Override protected IFigure createFigure() { Layer itemLayer = new MapLayer(); itemLayer.setLayoutManager(new XYLayout()); return itemLayer; }
private void addBranchView() { Layer layer = viewer.getLayer(GEF.LAYER_PRESENTATION); if (layer != null) { layer.add(branch.getFigure()); } }