use of org.whole.lang.ui.layout.TableLayout in project whole by wholeplatform.
the class TableFigure method drawColumnBackground.
protected void drawColumnBackground(Graphics g, int index, int alpha) {
TableLayout l = getLayoutManager();
if (l.rows() > 0) {
int oldAlpha = g.getAlpha();
g.setAlpha(alpha);
Rectangle tb = getTableBounds();
Rectangle cb = l.getColumnBounds(index);
g.fillRectangle(cb.x, tb.y, cb.width, tb.height);
g.setAlpha(oldAlpha);
}
}
use of org.whole.lang.ui.layout.TableLayout in project whole by wholeplatform.
the class TableFigure method drawHeadersRowSeparator.
protected void drawHeadersRowSeparator(Graphics g, int leftMargin, int rightMargin) {
TableLayout l = getLayoutManager();
if (l.rows() > 0) {
Rectangle ca = getTableBounds();
Rectangle yb = (l.hasHeaderRow() && l.rows() > 1) ? l.getRowBounds(1) : ca;
g.drawLine(ca.x - leftMargin, yb.y, ca.right() - 1 + rightMargin, yb.y);
}
}
use of org.whole.lang.ui.layout.TableLayout in project whole by wholeplatform.
the class TableFigure method drawColumnSeparatorBefore.
protected void drawColumnSeparatorBefore(Graphics g, int columnIndex, int topMargin, int bottomMargin) {
TableLayout l = getLayoutManager();
if (l.rows() > 0 && columnIndex < l.columns()) {
Rectangle ca = getTableBounds();
Rectangle r = l.getColumnBounds(columnIndex);
g.drawLine(r.x, ca.y - topMargin, r.x, ca.bottom() - 1 + bottomMargin);
}
}
use of org.whole.lang.ui.layout.TableLayout in project whole by wholeplatform.
the class ChooseTableFigure method paintFigure.
protected void paintFigure(Graphics g) {
super.paintFigure(g);
TableLayout l = getLayoutManager();
if (l.rows() == 0)
return;
g.setForegroundColor(ColorConstants.lightGray);
drawRowSeparators(g);
}
use of org.whole.lang.ui.layout.TableLayout in project whole by wholeplatform.
the class RevisionsFigure method paintFigure.
protected void paintFigure(Graphics g) {
super.paintFigure(g);
TableLayout l = getLayoutManager();
if (l.rows() == 0)
return;
Rectangle tb = getTableBounds();
Rectangle cb1 = l.getColumnBounds(1);
Rectangle cb2 = l.getColumnBounds(2);
Rectangle cb3 = l.getColumnBounds(3);
g.setBackgroundColor(FigureConstants.hostLanguageColor);
g.fillRectangle(cb1.x, tb.y, cb1.width + 1, tb.height);
g.setBackgroundColor(FigureConstants.addBackgroundColor);
g.fillRectangle(cb2.x, tb.y, cb2.width + 1, tb.height);
g.setBackgroundColor(FigureConstants.deleteBackgroundColor);
g.fillRectangle(cb3.x, tb.y, cb3.width + 1, tb.height);
g.setBackgroundColor(ColorConstants.gray);
drawHeadersRowBackground(g);
g.setForegroundColor(ColorConstants.lightGray);
drawHeadersRowSeparator(g);
drawRowSeparators(g);
drawTableBorder(g);
}
Aggregations