use of org.whole.lang.ui.layout.TableLayout in project whole by wholeplatform.
the class TableFigure method drawRowSeparatorBefore.
protected void drawRowSeparatorBefore(Graphics g, int rowIndex, int leftMargin, int rightMargin) {
TableLayout l = getLayoutManager();
int columns = l.columns();
if (rowIndex < columns) {
Rectangle ca = getTableBounds();
Rectangle r = l.getRowBounds(rowIndex + (l.hasHeaderRow() ? 1 : 0));
g.drawLine(ca.x - leftMargin, r.y, ca.right() - 1 + rightMargin, r.y);
}
}
use of org.whole.lang.ui.layout.TableLayout in project whole by wholeplatform.
the class FeatureTableTypeTableFigure method paintFigure.
protected void paintFigure(Graphics g) {
super.paintFigure(g);
TableLayout l = getLayoutManager();
if (l.rows() == 0)
return;
g.setForegroundColor(ColorConstants.lightGray);
drawColumnSeparators(g);
// drawColumnSeparatorBefore(g, 1);
Rectangle ca = getTableBounds();
Rectangle c = l.getColumnBounds(1);
Rectangle r = l.getRowBounds(1);
g.drawLine(c.x, r.y, ca.right() - 1, r.y);
}
use of org.whole.lang.ui.layout.TableLayout in project whole by wholeplatform.
the class VariantsTableFigure method paintFigure.
protected void paintFigure(Graphics g) {
super.paintFigure(g);
TableLayout l = getLayoutManager();
if (l.rows() == 0)
return;
g.setBackgroundColor(ColorConstants.orange);
g.setBackgroundColor(ColorConstants.orange);
int oldAlpha = g.getAlpha();
g.setAlpha(100);
Rectangle tb = getTableBounds();
Rectangle cb = l.getColumnBounds(1);
g.fillRectangle(cb.x, tb.y, cb.width + 1, tb.height);
g.setAlpha(40);
cb = l.getColumnBounds(0);
if (variantIndex != -1) {
Rectangle vb = l.getCellBounds(0, variantIndex);
g.fillRectangle(cb.x, tb.y, cb.width + 1, vb.y - tb.y);
g.fillRectangle(cb.x, vb.bottom(), cb.width + 1, tb.bottom() - vb.bottom());
} else {
g.fillRectangle(cb.x, tb.y, cb.width + 1, tb.height);
}
g.setAlpha(oldAlpha);
g.setForegroundColor(ColorConstants.orange);
drawRowSeparators(g);
}
use of org.whole.lang.ui.layout.TableLayout in project whole by wholeplatform.
the class DeclarationsFigure method paintFigure.
@Override
protected void paintFigure(Graphics graphics) {
super.paintFigure(graphics);
TableLayout l = getLayoutManager();
if (l.rows() == 0)
return;
Rectangle b = getBounds();
graphics.setBackgroundColor(FigureConstants.hostLanguageColor);
graphics.fillRectangle(b.x, b.y, b.width, b.height);
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 EnumValuesFigure method paintFigure.
protected void paintFigure(Graphics g) {
super.paintFigure(g);
TableLayout l = getLayoutManager();
if (l.rows() == 0)
return;
g.setForegroundColor(ColorConstants.lightGray);
drawHeadersRowSeparator(g);
drawColumnSeparators(g);
}
Aggregations