čtvrtek 2. prosince 2010

ZK Calendar Colors

Unfortunately, colours for the ZK Calendar has to be specified in the Java. They cannot be set in a CSS file. Because writing hexadecimal colour codes directly in the code is error prone, I have created a simple enum constant with a set of ZK Calendar colors:

public enum ZkCalendarsColor  {
 GREY("#B4BAB7", "#72706F"),
 GREEN("#4CB052", "#0D7813"),
 KHAKI("#BFBF4D", "#88880E"),
 PURPLE("#B373B3", "#7A367A"),
 RED("#D96666", "#A32929"),
 BLUE("#668CD9", "#3467CE");
 
 private String contentColor;
 private String headerColor;
 
 private ZkCalendarsColor(String contentColor, String headerColor) {
  this.contentColor = contentColor;
  this.headerColor = headerColor;
 }

 public String getContentColor() {
  return contentColor;
 }

 public String getHeaderColor() {
  return headerColor;
 }
}

Žádné komentáře: