colorPaletteTablePane.getStyles().put("horizontalSpacing", 4);
colorPaletteTablePane.getStyles().put("verticalSpacing", 4);
}
private static Component createColorPaletteCell(int index) {
Border border = new Border();
border.getStyles().put("backgroundColor", index);
TerraTheme terraTheme = (TerraTheme)Theme.getTheme();
Label label = new Label();
label.setText(Integer.toString(index));
label.getStyles().put("font", "{size:'80%'}");
label.getStyles().put("backgroundColor", terraTheme.getColor(4));
label.getStyles().put("padding", 1);
BoxPane boxPane = new BoxPane();
boxPane.getStyles().put("padding", 2);
boxPane.getStyles().put("horizontalAlignment", HorizontalAlignment.CENTER);
boxPane.getStyles().put("verticalAlignment", VerticalAlignment.CENTER);
boxPane.add(new Border(label));
border.setContent(boxPane);
return border;
}