private void addPlayButton() {
addButton("play");
}
private void addButton(String label) {
Element anchor = new Element("a");
String id = "carousel-" + label;
anchor.setAttribute("id", id);
String className = label;
anchor.setAttribute("class", className);
anchor.setAttribute("href", "#");
String messageTipKey = label + ".tip";
String anchorTitle = JsDialectUtil.templateMessage(arguments, messageTipKey);
anchor.setAttribute("title", anchorTitle);
Element span = new Element("span");
String messageKey = label;
String buttonText = JsDialectUtil.templateMessage(arguments, messageKey);
span.addChild(new Text(buttonText));
anchor.addChild(span);
element.addChild(anchor);
}