Search in sources :

Example 11 with Checkbox

use of org.adempiere.webui.component.Checkbox in project adempiere by adempiere.

the class ADTreePanel method init.

//	End Yamel Senih
private void init() {
    this.setWidth("100%");
    this.setHeight("100%");
    tree = new Tree();
    tree.setMultiple(false);
    tree.setWidth("100%");
    tree.setVflex(true);
    // Due to bug in the new paging functionality
    tree.setPageSize(-1);
    tree.setStyle("border: none");
    pnlSearch = new TreeSearchPanel(tree, Events.ON_SELECT);
    Toolbar toolbar = new Toolbar();
    toolbar.appendChild(pnlSearch);
    this.appendChild(toolbar);
    Panelchildren pc = new Panelchildren();
    this.appendChild(pc);
    pc.appendChild(tree);
    // Elaine 2009/02/27 - expand tree
    toolbar = new Toolbar();
    chkExpand = new Checkbox();
    chkExpand.setText(Msg.getMsg(Env.getCtx(), "ExpandTree"));
    chkExpand.addEventListener(Events.ON_CHECK, this);
    toolbar.appendChild(chkExpand);
    this.appendChild(toolbar);
}
Also used : Checkbox(org.adempiere.webui.component.Checkbox) Tree(org.zkoss.zul.Tree) Panelchildren(org.zkoss.zul.Panelchildren) Toolbar(org.zkoss.zul.Toolbar)

Example 12 with Checkbox

use of org.adempiere.webui.component.Checkbox in project adempiere by adempiere.

the class WPaySelect method onEvent.

//	dispose
/**************************************************************************
	 *  ActionListener
	 *  @param e event
	 */
public void onEvent(Event e) {
    boolean triggerRefresh = false;
    if (!m_loadedOK)
        return;
    if (e != null) {
        Component component = e.getTarget();
        if (component != null) {
            //  Generic components in the criteria fields
            if (component instanceof Textbox) {
                Textbox tb = ((Textbox) component);
                if (tb.hasChanged()) {
                    triggerRefresh = true;
                } else {
                    //else
                    return;
                }
            } else if (component instanceof Checkbox) {
                //  Check box changes generally always cause a refresh
                //  Capture changes that don't in a specific event handler
                triggerRefresh = true;
                Checkbox cb = (Checkbox) component;
                if (cb.getName() != null && cb.getName().equals("AutoQuery")) {
                    //  Only trigger a refresh if the check box is selected
                    if (!cb.isSelected()) {
                        return;
                    }
                }
            } else {
                //  Assume another type of component
                if (e.getName().equals("onChange") || e.getName().equals("onSelect")) {
                    triggerRefresh = true;
                }
            }
            String fieldName = "";
            if (component.getAttribute("fieldName") != null) {
                fieldName = (String) component.getAttribute("fieldName");
            }
            if (triggerRefresh && fieldName.equals("fieldBankAccount")) {
                loadBankInfo();
            }
            //  Generate PaySelection
            if (component.equals(bGenerate)) {
                generatePaySelect();
                dispose();
            } else if (component.equals(bCancel))
                dispose();
            // Refresh if the autoquery feature is selected or the refresh button is clicked.
            if (component.equals(bRefresh) || (checkAutoQuery.isSelected() && triggerRefresh)) {
                setFieldOldValues();
                loadTableInfo();
            }
        }
    }
}
Also used : Checkbox(org.adempiere.webui.component.Checkbox) Textbox(org.adempiere.webui.component.Textbox) Component(org.zkoss.zk.ui.Component)

Example 13 with Checkbox

use of org.adempiere.webui.component.Checkbox in project adempiere by adempiere.

the class AboutWindow method createTrace.

private Tabpanel createTrace() {
    Tabpanel tabPanel = new Tabpanel();
    Vbox vbox = new Vbox();
    vbox.setParent(tabPanel);
    vbox.setWidth("100%");
    vbox.setHeight("100%");
    Hbox hbox = new Hbox();
    bErrorsOnly = new Checkbox();
    bErrorsOnly.setLabel(Msg.getMsg(Env.getCtx(), "ErrorsOnly"));
    //default only show error
    bErrorsOnly.setChecked(true);
    bErrorsOnly.addEventListener(Events.ON_CHECK, this);
    hbox.appendChild(bErrorsOnly);
    btnDownload = new Button(Msg.getMsg(Env.getCtx(), "SaveFile"));
    btnDownload.addEventListener(Events.ON_CLICK, this);
    hbox.appendChild(btnDownload);
    btnErrorEmail = new Button(Msg.getMsg(Env.getCtx(), "SendEMail"));
    btnErrorEmail.addEventListener(Events.ON_CLICK, this);
    hbox.appendChild(btnErrorEmail);
    vbox.appendChild(hbox);
    Vector<String> columnNames = CLogErrorBuffer.get(true).getColumnNames(Env.getCtx());
    logTable = new Listbox();
    ListHead listHead = new ListHead();
    listHead.setParent(logTable);
    listHead.setSizable(true);
    for (Object obj : columnNames) {
        ListHeader header = new ListHeader(obj.toString());
        header.setWidth("100px");
        listHead.appendChild(header);
    }
    vbox.appendChild(logTable);
    logTable.setWidth("480px");
    logTable.setHeight("310px");
    logTable.setVflex(false);
    updateLogTable();
    return tabPanel;
}
Also used : Hbox(org.zkoss.zul.Hbox) ToolBarButton(org.adempiere.webui.component.ToolBarButton) Button(org.adempiere.webui.component.Button) Checkbox(org.adempiere.webui.component.Checkbox) ListHead(org.adempiere.webui.component.ListHead) ListHeader(org.adempiere.webui.component.ListHeader) Listbox(org.adempiere.webui.component.Listbox) Tabpanel(org.adempiere.webui.component.Tabpanel) Vbox(org.zkoss.zul.Vbox)

Example 14 with Checkbox

use of org.adempiere.webui.component.Checkbox in project adempiere by adempiere.

the class InfoBPartnerPanel method initComponents.

/**
	 *  Initialize the zk components.
	 */
private void initComponents() {
    labelValue = new Label();
    labelValue.setValue(Util.cleanAmp(Msg.translate(Env.getCtx(), "Value")));
    labelName = new Label();
    labelName.setValue(Util.cleanAmp(Msg.translate(Env.getCtx(), "Name")));
    labelContact = new Label();
    labelContact.setValue(Msg.translate(Env.getCtx(), "Contact"));
    labelEMail = new Label();
    labelEMail.setValue(Msg.getMsg(Env.getCtx(), "EMail"));
    labelPostal = new Label();
    labelPostal.setValue(Msg.getMsg(Env.getCtx(), "Postal"));
    labelPhone = new Label();
    labelPhone.setValue(Msg.translate(Env.getCtx(), "Phone"));
    //Record_ID
    fieldID = 0;
    //
    fieldValue = new Textbox();
    fieldValue.setMaxlength(40);
    fieldValue.setAttribute("zk_component_ID", "Lookup_Criteria_fieldValue");
    fieldValue.addEventListener(Events.ON_CHANGE, this);
    //
    fieldName = new Textbox();
    fieldName.setMaxlength(40);
    fieldName.setAttribute("zk_component_ID", "Lookup_Criteria_fieldName");
    fieldName.addEventListener(Events.ON_CHANGE, this);
    //
    fieldContact = new Textbox();
    fieldContact.setMaxlength(40);
    fieldContact.setAttribute("zk_component_ID", "Lookup_Criteria_fieldContact");
    fieldContact.addEventListener(Events.ON_CHANGE, this);
    //
    fieldEMail = new Textbox();
    fieldEMail.setMaxlength(40);
    fieldEMail.setAttribute("zk_component_ID", "Lookup_Criteria_fieldEMail");
    fieldEMail.addEventListener(Events.ON_CHANGE, this);
    //
    fieldPostal = new Textbox();
    fieldPostal.setMaxlength(40);
    fieldPostal.setAttribute("zk_component_ID", "Lookup_Criteria_fieldPostal");
    fieldPostal.addEventListener(Events.ON_CHANGE, this);
    //
    fieldPhone = new Textbox();
    fieldPhone.setMaxlength(40);
    fieldPhone.setAttribute("zk_component_ID", "Lookup_Criteria_fieldPhone");
    fieldPhone.addEventListener(Events.ON_CHANGE, this);
    //
    checkAND = new Checkbox();
    checkAND.setText(Msg.getMsg(Env.getCtx(), "SearchAND"));
    checkAND.setName("SearchAND");
    checkAND.setTooltiptext(Msg.getMsg(Env.getCtx(), "SearchANDInfo"));
    checkAND.setSelected(true);
    checkAND.addActionListener(this);
    checkAND.setAttribute("zk_component_ID", "Lookup_Criteria_checkAND");
    //
    checkCustomer = new Checkbox();
    checkCustomer.addActionListener(this);
    checkCustomer.setAttribute("zk_component_ID", "Lookup_Criteria_checkCustomer");
    checkCustomer.setName("checkCustomer");
    if (m_isSOTrx)
        checkCustomer.setLabel(Msg.getMsg(Env.getCtx(), "OnlyCustomers"));
    else
        checkCustomer.setLabel(Msg.getMsg(Env.getCtx(), "OnlyVendors"));
    checkCustomer.setSelected(m_isSOMatch);
}
Also used : Checkbox(org.adempiere.webui.component.Checkbox) Label(org.adempiere.webui.component.Label) Textbox(org.adempiere.webui.component.Textbox)

Example 15 with Checkbox

use of org.adempiere.webui.component.Checkbox in project adempiere by adempiere.

the class InfoOrderPanel method onEvent.

public void onEvent(Event e) {
    if (!p_loadedOK)
        return;
    Component component = e.getTarget();
    if (component != null) {
        if (component instanceof Checkbox) {
            Checkbox cb = (Checkbox) component;
            //  ShowDetail check box
            if (cb.getName() != null && cb.getName().equals("IsSOTrx")) {
                if (cb.isChecked()) {
                    fIsDelivered.setLabel(Msg.translate(Env.getCtx(), "IsDelivered"));
                } else {
                    fIsDelivered.setLabel(Msg.translate(Env.getCtx(), "Received"));
                }
            }
        }
    }
    //
    super.onEvent(e);
}
Also used : Checkbox(org.adempiere.webui.component.Checkbox) Component(org.zkoss.zk.ui.Component)

Aggregations

Checkbox (org.adempiere.webui.component.Checkbox)18 Textbox (org.adempiere.webui.component.Textbox)8 Component (org.zkoss.zk.ui.Component)7 Label (org.adempiere.webui.component.Label)6 Datebox (org.adempiere.webui.component.Datebox)5 DecimalFormat (java.text.DecimalFormat)3 SimpleDateFormat (java.text.SimpleDateFormat)3 Combobox (org.adempiere.webui.component.Combobox)3 NumberBox (org.adempiere.webui.component.NumberBox)3 Button (org.adempiere.webui.component.Button)2 WSearchEditor (org.adempiere.webui.editor.WSearchEditor)2 IDColumn (org.compiere.minigrid.IDColumn)2 Decimalbox (org.zkoss.zul.Decimalbox)2 Hbox (org.zkoss.zul.Hbox)2 Panelchildren (org.zkoss.zul.Panelchildren)2 Radio (org.zkoss.zul.Radio)2 Radiogroup (org.zkoss.zul.Radiogroup)2 Toolbar (org.zkoss.zul.Toolbar)2 Tree (org.zkoss.zul.Tree)2 BigDecimal (java.math.BigDecimal)1