// Derived colors
private Color titleBarBevelColor;
// private Color contentBevelColor; // TODO: future use
public FakeWindowSkin() {
TerraTheme theme = (TerraTheme) Theme.getTheme();
setBackgroundColor(theme.getColor(10));
titleBarColor = theme.getColor(4);
titleBarBackgroundColor = theme.getColor(14);
titleBarBorderColor = theme.getColor(12);
contentBorderColor = theme.getColor(7);
padding = new Insets(8);
// Set the derived colors
titleBarBevelColor = TerraTheme.brighten(titleBarBackgroundColor);
// The title bar table pane contains two nested box panes: one for
// the title contents and the other for the buttons
titleBarTablePane.getColumns().add(new TablePane.Column(1, true));
titleBarTablePane.getColumns().add(new TablePane.Column(-1));
TablePane.Row titleRow = new TablePane.Row(-1);
titleBarTablePane.getRows().add(titleRow);
titleRow.add(titleBoxPane);
titleRow.add(buttonBoxPane);
titleBarTablePane.getStyles().put("padding", new Insets(2));
// Initialize the title box pane
titleBoxPane.add(iconImageView);
titleBoxPane.add(titleLabel);
titleBoxPane.getStyles().put("verticalAlignment", VerticalAlignment.CENTER);
titleBoxPane.getStyles().put("padding", new Insets(0, 0, 0, 2));
Font titleFont = theme.getFont().deriveFont(Font.BOLD);
titleLabel.getStyles().put("font", titleFont);
iconImageView.setPreferredSize(16, 16);
iconImageView.getStyles().put("fill", true);
iconImageView.getStyles().put("backgroundColor", null);