}
}
@Override
public void draw(final Canvas canvas) {
final Color secondary1 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1);
final Color secondary2 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);
final Color secondary3 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3);
/*
* REVIEW if (getViewAxis(TableAxis.class) != null) { if
* (((SelectableViewAxis)
* getViewAxis(SelectableViewAxis.class)).isSelected(getView())) {
* canvas.drawSolidRectangle(left, 0, getSize().getWidth() - left, top,
* Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2)); secondary2 =
* secondary1; } }
*/
if (getState().isObjectIdentified()) {
canvas.drawRectangle(left, 0, getSize().getWidth() - left, top, secondary2);
final int xExtent = getSize().getWidth();
canvas.drawSolidRectangle(xExtent - BORDER + 1, 1, BORDER - 2, top - 2, secondary3);
canvas.drawLine(xExtent - BORDER, 0, xExtent - BORDER, top - 2, secondary2);
}
// lines
int x = 0;
final int y = top / 2;
canvas.drawLine(x, y, x + left, y, secondary2);
final boolean isOpen = getSpecification().isOpen();
final int canOpen = canOpen();
final boolean addBox = isOpen || canOpen != NodeSpecification.CANT_OPEN;
if (addBox) {
x += BOX_X_OFFSET;
canvas.drawLine(x, y, x + BOX_SIZE - 1, y, secondary3);
canvas.drawSolidRectangle(x, y - BOX_SIZE / 2, BOX_SIZE, BOX_SIZE, Toolkit.getColor(ColorsAndFonts.COLOR_WHITE));
canvas.drawRectangle(x, y - BOX_SIZE / 2, BOX_SIZE, BOX_SIZE, secondary1);
if (canOpen == NodeSpecification.UNKNOWN) {
} else {
final Color black = Toolkit.getColor(ColorsAndFonts.COLOR_BLACK);
canvas.drawLine(x + BOX_PADDING, y, x + BOX_SIZE - 1 - BOX_PADDING, y, black);
if (!isOpen) {
x += BOX_SIZE / 2;
canvas.drawLine(x, y - BOX_SIZE / 2 + BOX_PADDING, x, y + BOX_SIZE / 2 - BOX_PADDING, black);
}