GEF 改变选中框的颜色
此方法的父类为moveHandle
public calss aaaMocveHandle extends basdsf
{
@Override
protected void initialize() {setOpaque(false);
setBorder(new LineBorder(1){
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.setForegroundColor(ColorConstants.blue);
//用椭圆形替代矩形
graphics.drawRectangle(tempRect);
}
});
setCursor(Cursors.SIZEALL);
}