Java 类org.eclipse.draw2d.AbstractBorder 实例源码

项目:snaker-designer    文件:FieldBorder.java   
public void paint(IFigure figure, Graphics graphics, Insets insets) {
    Rectangle bounds = figure.getBounds();
    Rectangle r = new Rectangle(bounds.x, bounds.y, this.grabBarWidth,
            bounds.height);
    AbstractBorder.tempRect.setBounds(r);
    graphics.setBackgroundColor(ColorUtils.Blue);

    graphics.setForegroundColor(ColorUtils.xorGate);
    graphics.fillRectangle(AbstractBorder.tempRect);
    figure.setOpaque(false);

    int i = AbstractBorder.tempRect.bottom()
            - AbstractBorder.tempRect.height / 2;
    graphics.drawText(getText(), AbstractBorder.tempRect.x
            + this.BLANK_SPACES, i - this.WORD_HEIGHT);
    super.paint(figure, graphics, insets);
}