package org.openlca.app.editors.graphical.model;

import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.LineBorder;
import org.eclipse.draw2d.geometry.Insets;

public class RoundBorder extends LineBorder {

	public RoundBorder(int value) {
		super(value);
	}

	@Override
	public void paint(IFigure figure, Graphics graphics, Insets insets) {
		tempRect.setBounds(getPaintRectangle(figure, insets));
		if (getWidth() % 2 == 1) {
			tempRect.width--;
			tempRect.height--;
		}
		tempRect.shrink(getWidth() / 2, getWidth() / 2);
		graphics.setLineWidth(getWidth());
		graphics.setLineStyle(getStyle());
		if (getColor() != null)
			graphics.setForegroundColor(getColor());
		graphics.drawRoundRectangle(tempRect, 15, 15);
	}
}

@@ -194,16 +194,44 @@
 .Insets;
+%0Aimport org.eclipse.swt.SWT;
 %0A%0Apublic
@@ -406,16 +406,49 @@
 sets) %7B%0A
+%09%09graphics.setAntialias(SWT.ON);%0A
 %09%09tempRe

Set anti-aliasing ON for rounded corner boxes.