topBar.addButton(devConsoleButton);
topBar.addSeparator();
// Skin select:
SelectItem selectItem = new SelectItem();
selectItem.setHeight(21);
selectItem.setWidth(130);
LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>();
valueMap.put("Graphite", "Graphite");
valueMap.put("EnterpriseBlue", "Enterprise Blue");
valueMap.put("Enterprise", "Enterprise Gray");
selectItem.setValueMap(valueMap);
String currentSkin = Cookies.getCookie("skin_name");
if (currentSkin == null) {
currentSkin = "Graphite";
}
selectItem.setDefaultValue(currentSkin);
selectItem.setShowTitle(false);
selectItem.addChangeHandler(new ChangeHandler() {
public void onChange(ChangeEvent event) {
Cookies.setCookie("skin_name", (String) event.getValue());
com.google.gwt.user.client.Window.Location.reload();
}