示例#1
0
 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;
 }
示例#2
0
 /*
  * (non-Javadoc)
  *
  * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
  */
 @Override
 protected IFigure createFigure() {
   Layer itemLayer = new MapLayer();
   itemLayer.setLayoutManager(new XYLayout());
   return itemLayer;
 }
示例#3
0
 private void addBranchView() {
   Layer layer = viewer.getLayer(GEF.LAYER_PRESENTATION);
   if (layer != null) {
     layer.add(branch.getFigure());
   }
 }