Search in sources :

Example 1 with RoundBracketsBorder

use of org.whole.lang.ui.figures.RoundBracketsBorder in project whole by wholeplatform.

the class CartesianProductPart method createFigure.

protected IFigure createFigure() {
    IFigure figure = new StringSeparatedCompositeColumnFigure("\u00d7", 10);
    figure.setBorder(new RoundBracketsBorder());
    return figure;
}
Also used : StringSeparatedCompositeColumnFigure(org.whole.lang.ui.figures.StringSeparatedCompositeColumnFigure) RoundBracketsBorder(org.whole.lang.ui.figures.RoundBracketsBorder) IFigure(org.eclipse.draw2d.IFigure)

Example 2 with RoundBracketsBorder

use of org.whole.lang.ui.figures.RoundBracketsBorder in project whole by wholeplatform.

the class AndPart method createFigure.

protected IFigure createFigure() {
    border = new RoundBracketsBorder() {

        @Override
        protected void setBracketsStyle(Graphics g) {
            g.setForegroundColor(FigureConstants.contentLighterColor);
        }
    };
    return new CompositeFigure(true) {

        protected void paintFigure(Graphics g) {
            super.paintFigure(g);
            g.setForegroundColor(FigureConstants.contentLighterColor);
            g.setLineStyle(SWT.LINE_CUSTOM);
            g.setLineDash(new int[] { 1, 3 });
            drawFixedSizeColumnSeparators(g);
            g.setLineStyle(SWT.LINE_SOLID);
            g.setLineDash((int[]) null);
        }
    };
}
Also used : Graphics(org.eclipse.draw2d.Graphics) CompositeFigure(org.whole.lang.ui.figures.CompositeFigure) RoundBracketsBorder(org.whole.lang.ui.figures.RoundBracketsBorder)

Example 3 with RoundBracketsBorder

use of org.whole.lang.ui.figures.RoundBracketsBorder in project whole by wholeplatform.

the class UnionTypePart method createFigure.

protected IFigure createFigure() {
    border = new RoundBracketsBorder() {

        @Override
        protected void setBracketsStyle(Graphics g) {
            g.setForegroundColor(FigureConstants.contentLighterColor);
        }
    };
    return new CompositeFigure(false) {

        protected void paintFigure(Graphics g) {
            super.paintFigure(g);
            g.setForegroundColor(ColorConstants.lightGray);
            g.setLineStyle(SWT.LINE_CUSTOM);
            g.setLineDash(new int[] { 1, 1 });
            drawFixedSizeRowSeparators(g);
            g.setLineStyle(SWT.LINE_SOLID);
            g.setLineDash((int[]) null);
        }
    };
// return new StringSeparatedCompositeRowFigure("\u222a", 10) {
// @Override
// public Color getLocalForegroundColor() {
// return FigureConstants.contentColor;
// }
// };
}
Also used : Graphics(org.eclipse.draw2d.Graphics) CompositeFigure(org.whole.lang.ui.figures.CompositeFigure) RoundBracketsBorder(org.whole.lang.ui.figures.RoundBracketsBorder)

Example 4 with RoundBracketsBorder

use of org.whole.lang.ui.figures.RoundBracketsBorder in project whole by wholeplatform.

the class PointwiseProductPart method createFigure.

protected IFigure createFigure() {
    // \u2219
    IFigure figure = new StringSeparatedCompositeColumnFigure("\u2022", 10);
    figure.setBorder(new RoundBracketsBorder());
    return figure;
}
Also used : StringSeparatedCompositeColumnFigure(org.whole.lang.ui.figures.StringSeparatedCompositeColumnFigure) RoundBracketsBorder(org.whole.lang.ui.figures.RoundBracketsBorder) IFigure(org.eclipse.draw2d.IFigure)

Example 5 with RoundBracketsBorder

use of org.whole.lang.ui.figures.RoundBracketsBorder in project whole by wholeplatform.

the class OrPart method createFigure.

protected IFigure createFigure() {
    border = new RoundBracketsBorder() {

        @Override
        protected void setBracketsStyle(Graphics g) {
            g.setForegroundColor(FigureConstants.contentLighterColor);
        }
    };
    return new CompositeFigure(false) {

        protected void paintFigure(Graphics g) {
            super.paintFigure(g);
            g.setForegroundColor(ColorConstants.lightGray);
            g.setLineStyle(SWT.LINE_CUSTOM);
            g.setLineDash(new int[] { 1, 1 });
            drawFixedSizeRowSeparators(g);
            g.setLineStyle(SWT.LINE_SOLID);
            g.setLineDash((int[]) null);
        }
    };
}
Also used : Graphics(org.eclipse.draw2d.Graphics) CompositeFigure(org.whole.lang.ui.figures.CompositeFigure) RoundBracketsBorder(org.whole.lang.ui.figures.RoundBracketsBorder)

Aggregations

RoundBracketsBorder (org.whole.lang.ui.figures.RoundBracketsBorder)10 Graphics (org.eclipse.draw2d.Graphics)4 IFigure (org.eclipse.draw2d.IFigure)4 CompositeFigure (org.whole.lang.ui.figures.CompositeFigure)3 StringSeparatedCompositeColumnFigure (org.whole.lang.ui.figures.StringSeparatedCompositeColumnFigure)3 StringSeparatedCompositeRowFigure (org.whole.lang.ui.figures.StringSeparatedCompositeRowFigure)2 InfixExpressionFigure (org.whole.lang.math.ui.figures.InfixExpressionFigure)1