use of org.zkoss.zul.Decimalbox in project adempiere by adempiere.
the class POSNumberBox method init.
private void init() {
Table grid = new Table();
appendChild(grid);
grid.setStyle("border: none; padding: 0px; margin: 0px;" + HEIGHT + WIDTH + FONT_SIZE);
grid.setDynamicProperty("border", "0");
grid.setDynamicProperty("cellpadding", "0");
grid.setDynamicProperty("cellspacing", "0");
Tr tr = new Tr();
grid.appendChild(tr);
tr.setStyle("border: none; padding: 0px; margin: 0px; white-space:nowrap; ");
Td td = new Td();
tr.appendChild(td);
td.setStyle("border: none; padding: 0px; margin: 0px;");
decimalBox = new Decimalbox();
if (integral) {
decimalBox.setScale(0);
decimalBox.setStyle("display: inline;width:85x;" + HEIGHT + FONT_SIZE);
} else
decimalBox.setStyle("display: inline;text-align:right;width:80px;" + HEIGHT + FONT_SIZE);
td.appendChild(decimalBox);
Td btnColumn = new Td();
tr.appendChild(btnColumn);
btnColumn.setStyle("border: none; padding: 0px; margin: 0px;" + HEIGHT);
btnColumn.setSclass("editor-button");
btn = new Button();
btn.setImage("/images/Calculator10.png");
btn.setTabindex(-1);
LayoutUtils.addSclass("editor-button", btn);
btnColumn.appendChild(btn);
popup = getCalculatorPopup();
LayoutUtils.addSclass("editor-button", btn);
btn.setPopup(popup);
btn.setStyle("text-align: center; height:35px;");
appendChild(popup);
String style = AEnv.isFirefox2() ? "display: inline" : "display: inline-block";
style = style + ";white-space:nowrap";
this.setStyle(style);
}
Aggregations