private GwtLegendOptions getLegendOptions(UIDL uidl) {
VConsole.log("Enter [getLegendOptions]");
VConsole.log("Tag name -> " + uidl.getTag());
GwtLegendOptions legendOptions = GwtLegendOptions.create();
if (uidl.hasAttribute("align")) {
legendOptions.setAlign(uidl.getStringAttribute("align"));
}
if (uidl.hasAttribute("backgroundColor")) {
legendOptions.setBackgroundColor(uidl
.getStringAttribute("backgroundColor"));
}
if (uidl.hasAttribute("borderColor")) {
legendOptions
.setBorderColor(uidl.getStringAttribute("borderColor"));
}
if (uidl.hasAttribute("borderRadius")) {
legendOptions.setBorderRadius(uidl.getIntAttribute("borderRadius"));
}
if (uidl.hasAttribute("borderWidth")) {
legendOptions.setBorderWidth(uidl.getIntAttribute("borderWidth"));
}
if (uidl.hasAttribute("enabled")) {
legendOptions.setEnabled(uidl.getBooleanAttribute("enabled"));
}
if (uidl.hasAttribute("floating")) {
legendOptions.setFloating(uidl.getBooleanAttribute("floating"));
}
if (uidl.hasAttribute("itemHiddenStyle")) {
legendOptions.setItemHiddenStyle(uidl
.getStringAttribute("itemHiddenStyle"));
}
if (uidl.hasAttribute("itemHoverStyle")) {
legendOptions.setItemHoverStyle(uidl
.getStringAttribute("itemHoverStyle"));
}
if (uidl.hasAttribute("itemStyle")) {
legendOptions.setItemStyle(uidl.getStringAttribute("itemStyle"));
}
if (uidl.hasAttribute("itemWidth")) {
legendOptions.setItemWidth(uidl.getIntAttribute("itemWidth"));
}
if (uidl.hasAttribute("layout")) {
legendOptions.setLayout(uidl.getStringAttribute("layout"));
}
if (uidl.hasAttribute("labelFormatter")) {
legendOptions.setLabelFormatter(getExecutableFunction(uidl
.getStringAttribute("labelFormatter")));
}
if (uidl.hasAttribute("margin")) {
legendOptions.setMargin(uidl.getIntAttribute("margin"));
}
if (uidl.hasAttribute("reversed")) {
legendOptions.setReversed(uidl.getBooleanAttribute("reversed"));
}
if (uidl.hasAttribute("shadow")) {
legendOptions.setShadow(uidl.getBooleanAttribute("shadow"));
}
if (uidl.hasAttribute("symbolPadding")) {
legendOptions.setSymbolPadding(uidl
.getIntAttribute("symbolPadding"));
}
if (uidl.hasAttribute("symbolWidth")) {
legendOptions.setSymbolWidth(uidl.getIntAttribute("symbolWidth"));
}
if (uidl.hasAttribute("verticalAlign")) {
legendOptions.setVerticalAlign(uidl
.getStringAttribute("verticalAlign"));
}
if (uidl.hasAttribute("width")) {
legendOptions.setWidth(uidl.getIntAttribute("width"));
}
if (uidl.hasAttribute("x")) {
legendOptions.setX(uidl.getIntAttribute("x"));
}
if (uidl.hasAttribute("y")) {
legendOptions.setY(uidl.getIntAttribute("y"));
}
VConsole.log("Exit [getLegendOptions]");
return legendOptions;
}