Search in sources :

Example 61 with Row

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

the class WScanBarUI method createProductPanel.

/**
     * Creates the New Charge panel.
     *
     * The New Charge panel is used to specify the name and key of an account
     * and whether or not the account is a charge account.
     */
private void createProductPanel() {
    //  load Locator
    locatorLabel.setValue(Msg.translate(Env.getCtx(), "M_Locator_ID"));
    locatorLabel.setMandatory(true);
    MLocatorLookup locator = new MLocatorLookup(Env.getCtx(), form.getWindowNo());
    locator.setOnly_Warehouse_ID(Env.getContextAsInt(Env.getCtx(), "#M_Warehouse_ID"));
    locatorField = new WLocatorEditor("M_Locator_ID", true, false, true, locator, form.getWindowNo());
    locatorField.setMandatory(true);
    locatorField.addValueChangeListener(this);
    locatorToLabel.setValue(Msg.translate(Env.getCtx(), "M_LocatorTo_ID"));
    locatorToLabel.setVisible(false);
    MLocatorLookup locatorTo = new MLocatorLookup(Env.getCtx(), form.getWindowNo());
    locatorToField = new WLocatorEditor("M_LocatorTo_ID", true, false, true, locatorTo, form.getWindowNo());
    //locatorField.setMandatory(true);
    locatorToField.addValueChangeListener(this);
    locatorToField.setVisible(false);
    upcLabel.setText(Msg.getElement(Env.getCtx(), "Value", false));
    upcLabel.setMandatory(true);
    upcField = new WStringEditor("UPC", false, false, true, 10, 30, null, null);
    upcField.getComponent().addEventListener(Events.ON_CHANGE, this);
    qtyCountLabel.setText(Msg.getElement(Env.getCtx(), "QtyCount", false));
    qtyCountField.getComponent().addEventListener(Events.ON_CHANGE, this);
    lotLabel.setText(Msg.getElement(Env.getCtx(), "Lot", false));
    lotField = new WStringEditor("Lot", false, false, true, 10, 30, null, null);
    lotField.getComponent().addEventListener(Events.ON_CHANGE, this);
    serNoLabel.setText(Msg.getElement(Env.getCtx(), "SerNo", false));
    serNoField = new WStringEditor("SerNo", false, false, true, 10, 30, null, null);
    serNoField.getComponent().addEventListener(Events.ON_CHANGE, this);
    productValueLabel.setValue(Msg.translate(Env.getCtx(), "Value"));
    productLabel.setValue(Msg.translate(Env.getCtx(), "Name"));
    UOMLabel.setValue(Msg.translate(Env.getCtx(), "C_UOM_ID"));
    Rows rows = new Rows();
    newGrid.appendChild(rows);
    Row row = new Row();
    rows.appendChild(row);
    row.setSpans("3");
    row.appendChild(new Separator());
    row = new Row();
    rows.appendChild(row);
    row.appendChild(locatorLabel);
    row.appendChild(locatorField.getComponent());
    row = new Row();
    rows.appendChild(row);
    row.appendChild(locatorToLabel);
    row.appendChild(locatorToField.getComponent());
    row = new Row();
    rows.appendChild(row);
    row.setSpans("3");
    row.appendChild(new Separator());
    row = new Row();
    rows.appendChild(row);
    row.appendChild(upcLabel);
    row.appendChild(upcField.getComponent());
    row.appendChild(qtyCountLabel);
    row.appendChild(qtyCountField.getComponent());
    row = new Row();
    rows.appendChild(row);
    row.setSpans("3");
    row.appendChild(new Separator());
    row = new Row();
    rows.appendChild(row);
    row.appendChild(serNoLabel);
    row.appendChild(serNoField.getComponent());
    row = new Row();
    rows.appendChild(row);
    row.setSpans("3");
    row.appendChild(new Separator());
    row = new Row();
    rows.appendChild(row);
    row.appendChild(lotLabel);
    row.appendChild(lotField.getComponent());
    row = new Row();
    rows.appendChild(row);
    row.setSpans("3");
    row.appendChild(new Separator());
    //Product Info
    productValueField.setReadonly(true);
    row = new Row();
    rows.appendChild(row);
    row.appendChild(productValueLabel);
    row.appendChild(productValueField);
    productField.setReadonly(true);
    row.appendChild(productLabel);
    row.appendChild(productField);
    UOMField.setReadonly(true);
    row.appendChild(UOMLabel);
    row.appendChild(UOMField);
    row = new Row();
    rows.appendChild(row);
    row.setSpans("3");
    row.appendChild(new Separator());
    row = new Row();
    rows.appendChild(row);
    row.setSpans("3");
    row.appendChild(new Separator());
    row = new Row();
    rows.appendChild(row);
    row.setSpans("3");
    row.appendChild(new Separator());
    upcField.setVisible(false);
    qtyCountField.setVisible(false);
    lotField.setVisible(false);
    serNoField.setVisible(false);
    return;
}
Also used : MLocatorLookup(org.compiere.model.MLocatorLookup) WLocatorEditor(org.adempiere.webui.editor.WLocatorEditor) Row(org.adempiere.webui.component.Row) Separator(org.zkoss.zul.Separator) WStringEditor(org.adempiere.webui.editor.WStringEditor) Rows(org.adempiere.webui.component.Rows)

Example 62 with Row

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

the class WPOSInfoProduct method init.

@Override
protected void init() {
    parameterPanel = new Panel();
    Groupbox groupPanel = new Groupbox();
    infoProductLayout = GridFactory.newGridLayout();
    Caption v_TitleBorder = new Caption(Msg.getMsg(Env.getCtx(), "InfoProduct"));
    groupPanel.appendChild(v_TitleBorder);
    groupPanel.appendChild(infoProductLayout);
    labelLayout = GridFactory.newGridLayout();
    buttonPanel = new Panel();
    buttonPanel.appendChild(labelLayout);
    parameterPanel.appendChild(groupPanel);
    buttonPanel.setStyle("border: none; width:99%;moz-box-shadow: 0 0 0px #888;-webkit-box-shadow: 0 0 0px #888;box-shadow: 0 0 0px #888;");
    labelLayout.setStyle("border: none; width:100%;moz-box-shadow: 0 0 0px #888;-webkit-box-shadow: 0 0 0px #888;box-shadow: 0 0 0px #888;");
    infoProductLayout.setStyle("border: none; width:100%; moz-box-shadow: 0 0 0px #888;-webkit-box-shadow: 0 0 0px #888;box-shadow: 0 0 0px #888;");
    parameterPanel.setStyle("border: none; width:99%;");
    Rows rows = null;
    Row row = null;
    rows = infoProductLayout.newRows();
    row = rows.newRow();
    //	For Image
    buttonImage = new Panel();
    row.appendChild(buttonImage);
    buttonImage.setWidth("138px");
    buttonImage.setHeight("130px");
    row.appendChild(buttonPanel);
    rows = labelLayout.newRows();
    row = rows.newRow();
    //	For Value
    labelValue = new Label();
    labelValue.setStyle(WPOS.FONTSIZEMEDIUM + " font-weight:bold");
    //	Add
    row.appendChild(labelValue);
    row = rows.newRow();
    //  For Price List
    labelPriceName = new Label();
    labelPriceName.setStyle(WPOS.FONTSIZEMEDIUM + " font-weight:bold");
    //	Add
    row.appendChild(labelPriceName);
    labelPrice = new Label();
    labelPrice.setStyle(WPOS.FONTSIZELARGE + "font-weight:bold");
    //	Add
    row.appendChild(labelPrice);
    labelPriceList = new Label();
    labelPriceList.setStyle(WPOS.FONTSIZELARGE + "font-weight:bold");
    //	Add
    row.appendChild(labelPriceList);
    row = rows.newRow();
    //	For Name
    labelName = new Label();
    labelName.setStyle(WPOS.FONTSIZEMEDIUM + " font-weight:bold");
    //	Add
    row.appendChild(labelName);
    row = rows.newRow();
    //  For UOM
    labelUOMSymbol = new Label(Msg.getElement(Env.getCtx(), "C_UOM_ID"));
    labelUOMSymbol.setStyle(WPOS.FONTSIZEMEDIUM + " font-weight:bold");
    //	Add
    row.appendChild(labelUOMSymbol);
    row = rows.newRow();
    //	For Category
    labelProductCategory = new Label(Msg.getElement(Env.getCtx(), "M_Product_Category_ID"));
    labelProductCategory.setStyle(WPOS.FONTSIZEMEDIUM + " font-weight:bold");
    //	Add
    row.appendChild(labelProductCategory);
    row = rows.newRow();
    //	For Category
    labelProductTax = new Label(Msg.getElement(Env.getCtx(), "C_TaxCategory_ID"));
    labelProductTax.setStyle(WPOS.FONTSIZEMEDIUM + " font-weight:bold");
    //	Add
    row.appendChild(labelProductTax);
    row = rows.newRow();
    //	For Description
    labelDescription = new Label();
    labelDescription.setHeight("19px");
    labelDescription.setClass("label-description");
    //	Add
    row.appendChild(labelDescription);
    initialValue();
}
Also used : Panel(org.adempiere.webui.component.Panel) Groupbox(org.zkoss.zul.Groupbox) Label(org.adempiere.webui.component.Label) Row(org.adempiere.webui.component.Row) Caption(org.zkoss.zul.Caption) Rows(org.adempiere.webui.component.Rows)

Example 63 with Row

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

the class WCollectDetail method loadDebitPanel.

/**
	 * Load Debit Panel
	 * @return void
	 */
public void loadDebitPanel() {
    v_DebitPanel = GridFactory.newGridLayout();
    v_DebitPanel.setWidth("100%");
    v_DebitPanel.setHeight("95px");
    Rows rows = v_DebitPanel.newRows();
    Row row = rows.newRow();
    row.setSpans("1,2");
    fDebitRoutingNo = new WPOSTextField(Msg.translate(p_ctx, "RoutingNo"), keyboard);
    fDebitRoutingNo.setStyle(HEIGHT + WIDTH + FONT_SIZE);
    row.appendChild(fDebitRoutingNo);
    fDebitRoutingNo.addEventListener("onFocus", this);
    fDebitCVC = new WPOSTextField(Msg.translate(p_ctx, "A_Country"), keyboard);
    row.appendChild(fDebitCVC);
    fDebitCVC.setStyle(HEIGHT + WIDTH + FONT_SIZE);
    fDebitCVC.addEventListener("onFocus", this);
    fDebitCountry = new WPOSTextField(Msg.translate(p_ctx, "R_CVV2Match"), keyboard);
    row = rows.newRow();
    row.appendChild(fDebitCountry);
    fDebitCountry.addEventListener("onFocus", this);
    fDebitCountry.setStyle(HEIGHT + WIDTH + FONT_SIZE);
}
Also used : Row(org.adempiere.webui.component.Row) Rows(org.adempiere.webui.component.Rows)

Example 64 with Row

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

the class WCollectDetail method loadStandardPanel.

/**
	 * Load standard Panel
	 * @return void
	 */
public void loadStandardPanel() {
    v_StandarPanel = GridFactory.newGridLayout();
    v_StandarPanel.setWidth("100%");
    v_StandarPanel.setHeight("75px");
    groupPanel.appendChild(v_StandarPanel);
    Rows rows = null;
    Row row = null;
    rows = v_StandarPanel.newRows();
    row = rows.newRow();
    // Payment type selection
    //C_Payment_v.TenderType
    int AD_Column_ID = 8416;
    MLookup lookup = MLookupFactory.get(Env.getCtx(), 0, 0, AD_Column_ID, DisplayType.List);
    ArrayList<Object> types = lookup.getData(true, false, true, true);
    bMinus = v_Parent.createButtonAction("Minus", KeyStroke.getKeyStroke(KeyEvent.VK_F3, Event.F3));
    bMinus.addActionListener(this);
    row.setHeight("55px");
    fTenderType = ListboxFactory.newDropdownListbox();
    fTenderType.addActionListener(this);
    int pos = 0;
    // default to cash payment
    for (Object obj : types) {
        if (obj instanceof ValueNamePair) {
            ValueNamePair key = (ValueNamePair) obj;
            fTenderType.appendItem(key.getName(), key);
            if (key.getID().equals(getTenderType())) {
                fTenderType.setSelectedIndex(pos);
            }
            pos++;
        }
    }
    fTenderType.setStyle(HEIGHT + WIDTH + FONT_SIZE);
    row.appendChild(fTenderType);
    Label lPayAmt = new Label(Msg.translate(p_ctx, "PayAmt"));
    lPayAmt.setWidth("225px");
    fPayAmt = new POSNumberBox(false);
    row.appendChild(fPayAmt);
    row.appendChild(bMinus);
    fPayAmt.setValue(new BigDecimal("0.0"));
    fPayAmt.setStyle("text-align:right;" + HEIGHT + WIDTH + FONT_SIZE);
    fPayAmt.addEventListener("onBlur", this);
    fPayAmt.addEventListener(Events.ON_CHANGING, this);
    fPayAmt.addEventListener(Events.ON_CHANGE, this);
}
Also used : MLookup(org.compiere.model.MLookup) Label(org.adempiere.webui.component.Label) Row(org.adempiere.webui.component.Row) ValueNamePair(org.compiere.util.ValueNamePair) BigDecimal(java.math.BigDecimal) Rows(org.adempiere.webui.component.Rows)

Example 65 with Row

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

the class WCollectDetail method loadCreditMemoPanel.

/**
	 * Load for Credit Memo
	 * @return void
	 */
private void loadCreditMemoPanel() {
    v_CreditMemoPanel = GridFactory.newGridLayout();
    v_CreditMemoPanel.setWidth("100%");
    v_CreditMemoPanel.setHeight("95px");
    Rows rows = v_CreditMemoPanel.newRows();
    Row row = rows.newRow();
    row.setSpans("1,2");
    //	Add label credit note
    lCreditMemo = new Label(Msg.translate(Env.getCtx(), "CreditMemo") + ":");
    lCreditMemo.setStyle(HEIGHT + WIDTH + FONT_SIZE);
    row.appendChild(lCreditMemo);
    MLookup lookup = getCreditMemoLockup(v_Parent.getC_BPartner_ID());
    ArrayList<Object> types = lookup.getData(false, false, true, true);
    row = rows.newRow();
    fCreditMemo = ListboxFactory.newDropdownListbox();
    row.appendChild(fCreditMemo);
    fCreditMemo.setStyle(HEIGHT + WIDTH + FONT_SIZE);
    fCreditMemo.setValue(Msg.translate(p_ctx, "CreditMemoType"));
    fCreditMemo.addActionListener(this);
    /**
		 *	Load Credit Notes
		 */
    for (Object obj : types) {
        if (obj instanceof KeyNamePair) {
            KeyNamePair key = (KeyNamePair) obj;
            fCreditMemo.appendItem(key.getName(), key.getID());
        }
    }
}
Also used : MLookup(org.compiere.model.MLookup) Label(org.adempiere.webui.component.Label) Row(org.adempiere.webui.component.Row) KeyNamePair(org.compiere.util.KeyNamePair) Rows(org.adempiere.webui.component.Rows)

Aggregations

Row (org.adempiere.webui.component.Row)79 Rows (org.adempiere.webui.component.Rows)69 Label (org.adempiere.webui.component.Label)29 Grid (org.adempiere.webui.component.Grid)24 Panel (org.adempiere.webui.component.Panel)20 Div (org.zkoss.zul.Div)18 Center (org.zkoss.zul.Center)15 Hbox (org.zkoss.zul.Hbox)15 Space (org.zkoss.zul.Space)14 ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)12 Center (org.zkoss.zkex.zul.Center)11 Separator (org.zkoss.zul.Separator)11 North (org.zkoss.zkex.zul.North)10 Borderlayout (org.zkoss.zul.Borderlayout)9 North (org.zkoss.zul.North)9 South (org.zkoss.zkex.zul.South)8 South (org.zkoss.zul.South)8 Caption (org.zkoss.zul.Caption)6 Listbox (org.adempiere.webui.component.Listbox)5 WSearchEditor (org.adempiere.webui.editor.WSearchEditor)5