Search in sources :

Example 6 with Decimalbox

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);
}
Also used : Td(org.zkoss.zhtml.Td) Table(org.zkoss.zhtml.Table) Decimalbox(org.zkoss.zul.Decimalbox) Button(org.adempiere.webui.component.Button) Tr(org.zkoss.zhtml.Tr)

Aggregations

Decimalbox (org.zkoss.zul.Decimalbox)6 Checkbox (org.adempiere.webui.component.Checkbox)2 TableValueChangeEvent (org.adempiere.webui.event.TableValueChangeEvent)2 IDColumn (org.compiere.minigrid.IDColumn)2 Table (org.zkoss.zhtml.Table)2 Td (org.zkoss.zhtml.Td)2 Tr (org.zkoss.zhtml.Tr)2 Component (org.zkoss.zk.ui.Component)2 Listitem (org.zkoss.zul.Listitem)2 Button (org.adempiere.webui.component.Button)1 Datebox (org.adempiere.webui.component.Datebox)1 Label (org.adempiere.webui.component.Label)1 Textbox (org.adempiere.webui.component.Textbox)1 WTableColumn (org.adempiere.webui.component.WTableColumn)1 HtmlBasedComponent (org.zkoss.zk.ui.HtmlBasedComponent)1 Hbox (org.zkoss.zul.Hbox)1 Radio (org.zkoss.zul.Radio)1 Radiogroup (org.zkoss.zul.Radiogroup)1