int count = 0;
while (i <= size() / items()) {
w.write("<div class='UIColorLine'>");
int j = 0;
while (j <= items() && count < size()) {
Color color = getColors()[count];
String actionLink = "javascript:eXo.webui.UIColorPicker.setColor('" + color.getName() + "')";
w.write("<a href=\""
+ actionLink
+ "\" class=\""
+ color.getName()
+ " ColorCell \" onmousedown=\"event.cancelBubble=true\"><img src=\"/eXoResources/skin/sharedImages/Blank.gif\" /></a>");
count++;
j++;
}
w.write("</div>");