use of org.whole.lang.ui.layout.TableLayout in project whole by wholeplatform.
the class ArgumentsFigure method paintFigure.
protected void paintFigure(Graphics g) {
super.paintFigure(g);
TableLayout l = getLayoutManager();
if (l.rows() == 0)
return;
g.setBackgroundColor(FigureConstants.modulesColor);
drawColumnBackground(g, 0);
g.setForegroundColor(ColorConstants.lightGray);
drawHeadersRowSeparator(g);
}
use of org.whole.lang.ui.layout.TableLayout in project whole by wholeplatform.
the class PatternsFigure method paintFigure.
@Override
protected void paintFigure(Graphics graphics) {
super.paintFigure(graphics);
TableLayout l = getLayoutManager();
if (l.rows() == 0)
return;
graphics.setBackgroundColor(ColorConstants.gray);
drawHeadersRowBackground(graphics);
graphics.setBackgroundColor(FigureConstants.modulesColor);
int oldAlpha = graphics.getAlpha();
graphics.setAlpha(getBackgroundAlpha());
Rectangle tb = getTableBounds();
Rectangle cb1 = l.getColumnBounds(1);
graphics.fillRectangle(cb1.x, tb.y, cb1.width + l.getColumnBounds(2).width, tb.height);
graphics.setAlpha(oldAlpha);
graphics.setForegroundColor(ColorConstants.lightGray);
drawRowSeparators(graphics);
drawHeadersRowSeparator(graphics);
drawTableBottomBorder(graphics);
}
use of org.whole.lang.ui.layout.TableLayout in project whole by wholeplatform.
the class SelectionPointFigure method paintFigure.
protected void paintFigure(Graphics g) {
super.paintFigure(g);
TableLayout l = getLayoutManager();
if (l.rows() == 0)
return;
if (asStageDown) {
final int SP = 2, HM = 3;
g.setBackgroundColor(FigureConstants.hostLanguageColor);
Rectangle b = getTableBounds();
Rectangle b0 = l.getColumnBounds(0);
g.fillRectangle(b0.right() - 1, b.y, b.width - b0.width - 1, b.height);
g.setForegroundColor(ColorConstants.lightGray);
g.drawRectangle(b0.right() - 1, b.y, b.width - b0.width - 1, b.height - 1);
g.setLineStyle(SWT.LINE_CUSTOM);
g.setLineDash(new int[] { 1, 3 });
g.setForegroundColor(ColorConstants.gray);
Rectangle.SINGLETON.setLocation(b.x, b.y);
Rectangle.SINGLETON.setSize(b0.width + HM + SP, b.height);
g.setClip(Rectangle.SINGLETON);
g.drawRectangle(b.x, b.y, b0.width + HM + SP, b.height - 1);
g.setClip(b);
g.setLineStyle(SWT.LINE_SOLID);
g.setLineDash((int[]) null);
}
g.setForegroundColor(ColorConstants.lightGray);
drawRowSeparators(g);
// g.setForegroundColor(ColorConstants.gray);
//
// g.setLineStyle(SWT.LINE_CUSTOM);
// g.setLineDash(new int[] {1,3});
// drawRowSeparators(g);
// g.setLineStyle(SWT.LINE_SOLID);
// g.setLineDash((int[]) null);
}
use of org.whole.lang.ui.layout.TableLayout in project whole by wholeplatform.
the class BindingsTableFigure method paintFigure.
protected void paintFigure(Graphics g) {
super.paintFigure(g);
TableLayout l = getLayoutManager();
if (l.rows() == 0)
return;
g.setBackgroundColor(FigureConstants.templateLanguageColor);
int oldAlpha = g.getAlpha();
g.setAlpha(FigureConstants.templateLanguageAlpha);
Rectangle tb = getTableBounds();
Rectangle cb1 = l.getColumnBounds(0);
g.fillRectangle(cb1.x, tb.y, cb1.width, tb.height - 1);
g.setAlpha(oldAlpha);
g.setForegroundColor(ColorConstants.lightGray);
drawColumnSeparators(g);
}
use of org.whole.lang.ui.layout.TableLayout in project whole by wholeplatform.
the class InputBindingsTableFigure method paintFigure.
protected void paintFigure(Graphics g) {
super.paintFigure(g);
TableLayout l = getLayoutManager();
if (l.rows() == 0)
return;
if (asStageDown) {
final int SP = 2, HM = 3;
g.setBackgroundColor(FigureConstants.hostLanguageColor);
Rectangle b = getTableBounds();
Rectangle b0 = l.getColumnBounds(0);
g.fillRectangle(b.x + 1, b.y, b.width - 2, b.height);
// g.fillRectangle(b0.right()-1, b.y, b.width-b0.width-1, b.height);
// g.setForegroundColor(ColorConstants.lightGray);
// g.drawRectangle(b0.right()-1, b.y, b.width-b0.width-1, b.height-1);
// g.setLineStyle(SWT.LINE_CUSTOM);
// g.setLineDash(new int[] {1,3});
// g.setForegroundColor(ColorConstants.gray);
// Rectangle.SINGLETON.setLocation(b.x, b.y);
// Rectangle.SINGLETON.setSize(b0.width+HM+SP, b.height);
// g.setClip(Rectangle.SINGLETON);
// g.drawRectangle(b.x, b.y, b0.width+HM+SP, b.height-1);
// g.setClip(b);
}
g.setForegroundColor(ColorConstants.lightGray);
g.setLineStyle(SWT.LINE_SOLID);
g.setLineDash((int[]) null);
drawRowSeparators(g);
drawColumnSeparators(g);
// drawTableBottomBorder(g);
// drawTableBorder(g);
}
Aggregations