Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.Polyline.addPoint()


    polyline.setLineStyle(SWT.LINE_SOLID);
    polyline.setBackgroundColor(Display.getDefault().getSystemColor(SWT.COLOR_RED));
    for (final MapNodeRef ref : ((MapObjectNodes) getModel()).getObject().getNodes()) {
      final MapNode node = ref.getNode();
      final Point p = getCoordinateSystem().toPoint(node.getPosition());
      polyline.addPoint(p);
    }
    polyline.setPreferredSize(polyline.getBounds().width, polyline.getBounds().height);
    return polyline;
  }
View Full Code Here


    final Polyline polyline = (Polyline) getFigure();
    polyline.removeAllPoints();
    for (final MapNodeRef ref : ((MapObjectNodes) getModel()).getObject().getNodes()) {
      final MapNode node = ref.getNode();
      final Point p = getCoordinateSystem().toPoint(node.getPosition());
      polyline.addPoint(p);
    }
    polyline.setPreferredSize(polyline.getBounds().width, polyline.getBounds().height);
  }

  /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.