@Test public void testGetHeaderBackgroundFillColour() { tests.stream().forEach(test -> { final GridColumn column = mock(test.getK1()); final Rectangle rectangle = theme.getHeaderBackground(column); assertEquals("Column '" + column.getClass().getSimpleName() + "' has wrong colour.", test.getK2(), rectangle.getFillColor()); }); }
@Override public Rectangle getHeaderBackground(final GridColumn<?> column) { final Rectangle background = new Rectangle(0, 0); if (column instanceof NameColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof InvocationParameterColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof org.kie.workbench.common.dmn.client.editors.expressions.types.function.supplementary.NameColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof RelationColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof LiteralExpressionColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof IsRowDragHandle) { background.setFillColor(KIEColours.HEADER_BACKGROUND_WHITE); } else if (column instanceof InputClauseColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof OutputClauseColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_DARK_BLUE); } else if (column instanceof RuleAnnotationClauseColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_WHITE); } else if (column instanceof ExpressionEditorColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof UndefinedExpressionColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof FunctionKindRowColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_WHITE); } return background; }
BaseExpressionGridTheme implements GridRendererTheme { @Override public Rectangle getHeaderBackground(final GridColumn<?> column) { final Rectangle background = new Rectangle(0, 0); if (column instanceof NameColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof InvocationParameterColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof org.kie.workbench.common.dmn.client.editors.expressions.types.function.supplementary.NameColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof RelationColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof LiteralExpressionColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof IsRowDragHandle) { background.setFillColor(KIEColours.HEADER_BACKGROUND_WHITE); } else if (column instanceof InputClauseColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof OutputClauseColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_DARK_BLUE); } else if (column instanceof RuleAnnotationClauseColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_WHITE); } else if (column instanceof ExpressionEditorColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof UndefinedExpressionColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof FunctionKindRowColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_WHITE); } return background; } }
BaseExpressionGridTheme implements GridRendererTheme { @Override public Rectangle getHeaderBackground(final GridColumn<?> column) { final Rectangle background = new Rectangle(0, 0); if (column instanceof NameColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof InvocationParameterColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof org.kie.workbench.common.dmn.client.editors.expressions.types.function.supplementary.NameColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof RelationColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof LiteralExpressionColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof IsRowDragHandle) { background.setFillColor(KIEColours.HEADER_BACKGROUND_WHITE); } else if (column instanceof InputClauseColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof OutputClauseColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_DARK_BLUE); } else if (column instanceof RuleAnnotationClauseColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_WHITE); } else if (column instanceof ExpressionEditorColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof UndefinedExpressionColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof FunctionKindRowColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_WHITE); } return background; }  }
BaseExpressionGridTheme implements GridRendererTheme { @Override public Rectangle getHeaderBackground(final GridColumn<?> column) { final Rectangle background = new Rectangle(0, 0); if (column instanceof NameColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof InvocationParameterColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof org.kie.workbench.common.dmn.client.editors.expressions.types.function.supplementary.NameColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof RelationColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof LiteralExpressionColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof IsRowDragHandle) { background.setFillColor(KIEColours.HEADER_BACKGROUND_WHITE); } else if (column instanceof InputClauseColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof OutputClauseColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_DARK_BLUE); } else if (column instanceof RuleAnnotationClauseColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_WHITE); } else if (column instanceof ExpressionEditorColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof UndefinedExpressionColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof FunctionKindRowColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_WHITE); } return background; }  @Override String getName(); @Override MultiPath getSelector(); @Override Rectangle getCellSelectorBorder(); @Override Rectangle getCellSelectorBackground(); @Override Rectangle getHeaderBackground(final GridColumn<?> column); @Override Rectangle getHeaderLinkBackground(final GridColumn<?> column); @Override MultiPath getHeaderGridLine(); @Override Text getHeaderText(); @Override Rectangle getBodyBackground(final GridColumn<?> column); @Override MultiPath getBodyGridLine(); @Override Text getBodyText(); @Override Rectangle getGridBoundary(); @Override Line getGridHeaderBodyDivider(); }
BaseExpressionGridTheme implements GridRendererTheme { @Override public Rectangle getHeaderBackground(final GridColumn<?> column) { final Rectangle background = new Rectangle(0, 0); if (column instanceof NameColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof InvocationParameterColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof org.kie.workbench.common.dmn.client.editors.expressions.types.function.supplementary.NameColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof RelationColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof LiteralExpressionColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof IsRowDragHandle) { background.setFillColor(KIEColours.HEADER_BACKGROUND_WHITE); } else if (column instanceof InputClauseColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof OutputClauseColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_DARK_BLUE); } else if (column instanceof RuleAnnotationClauseColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_WHITE); } else if (column instanceof ExpressionEditorColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof UndefinedExpressionColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_LIGHT_BLUE); } else if (column instanceof FunctionKindRowColumn) { background.setFillColor(KIEColours.HEADER_BACKGROUND_WHITE); } return background; }  @Override String getName(); @Override MultiPath getSelector(); @Override Rectangle getCellSelectorBorder(); @Override Rectangle getCellSelectorBackground(); @Override Rectangle getHeaderBackground(final GridColumn<?> column); @Override Rectangle getHeaderLinkBackground(final GridColumn<?> column); @Override MultiPath getHeaderGridLine(); @Override Text getHeaderText(); @Override Rectangle getBodyBackground(final GridColumn<?> column); @Override MultiPath getBodyGridLine(); @Override Text getBodyText(); @Override Rectangle getGridBoundary(); @Override Line getGridHeaderBodyDivider(); static final String FONT_FAMILY_HEADER; static final String FONT_FAMILY_LABEL; static final String FONT_FAMILY_EXPRESSION; static final double SELECTOR_STROKE_WIDTH; static final double STROKE_WIDTH; static final int FONT_SIZE; }