use of org.eclipse.draw2d.MidpointLocator in project yamcs-studio by yamcs.
the class ManhattanBendpointEditPolicy method createSelectionHandles.
@Override
protected List<?> createSelectionHandles() {
List<BendpointHandle> handles = new ArrayList<>();
final PointList points = getConnection().getPoints();
if (points.size() < 4)
return handles;
for (int i = 1; i < points.size() - 2; i++) {
handles.add(new BendpointMoveHandle(getConnectionEditPart(), i - 1, new MidpointLocator(getConnection(), i)) {
@Override
protected Color getBorderColor() {
return (isPrimary()) ? ColorConstants.darkGreen : ColorConstants.white;
}
@Override
protected Color getFillColor() {
return ColorConstants.yellow;
}
});
}
return handles;
}
Aggregations