Search in sources :

Example 11 with Row

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

the class WScanBarUI method createConfirmPanel.

/**
     *  Create Confirmation Panel with OK Button.
     */
public void createConfirmPanel() {
    Rows rows = new Rows();
    Row row = new Row();
    confirmPanel.addActionListener(this);
    row.appendChild(confirmPanel);
    rows.appendChild(row);
    gridConfirm.appendChild(rows);
    return;
}
Also used : Row(org.adempiere.webui.component.Row) Rows(org.adempiere.webui.component.Rows)

Example 12 with Row

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

the class WExpressReceiptScanBarUI method createConfirmPanel.

/**
     *  Create Confirmation Panel with OK Button.
     */
public void createConfirmPanel() {
    Rows rows = new Rows();
    Row row = new Row();
    m_pnlConfirm.addActionListener(this);
    row.appendChild(m_pnlConfirm);
    rows.appendChild(row);
    m_grdConfirm.appendChild(rows);
    return;
}
Also used : Row(org.adempiere.webui.component.Row) Rows(org.adempiere.webui.component.Rows)

Example 13 with Row

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

the class FindWindow method addSelectionColumn.

// setValues
/**
     *  Add Selection Column to first Tab
     *  @param mField field
    **/
public void addSelectionColumn(GridField mField) {
    log.config(mField.getHeader());
    int displayLength = mField.getDisplayLength();
    if (displayLength <= 0 || displayLength > FIELDLENGTH)
        mField.setDisplayLength(FIELDLENGTH);
    else
        displayLength = 0;
    //  Editor
    WEditor editor = null;
    Label label = null;
    if (mField.isRangeLookup()) {
        Hbox box = new Hbox();
        editor = WebEditorFactory.getEditor(mField, false);
        label = editor.getLabel();
        editor.setMandatory(false);
        editor.setReadWrite(true);
        editor.dynamicDisplay();
        Component fieldLabel = editor.getComponent();
        box.appendChild(editor.getComponent());
        rangeFirstEditor.add(mField.getColumnName());
        // The Editor
        WEditor toRangeEditor = WebEditorFactory.getEditor(mField, false);
        // New Field value to be updated to editor
        toRangeEditor.setMandatory(false);
        toRangeEditor.setReadWrite(true);
        toRangeEditor.dynamicDisplay();
        //
        m_sEditors2.add(toRangeEditor);
        Label separator = new Label(" - ");
        box.appendChild(separator);
        Component fieldLabel1 = toRangeEditor.getComponent();
        box.appendChild(toRangeEditor.getComponent());
        if (//  set it back
        displayLength > 0)
            mField.setDisplayLength(displayLength);
        //
        if (isTwoColumns) {
            if (!isPair)
                panel = new Row();
        } else
            panel = new Row();
        panel.appendChild(LayoutUtils.makeRightAlign(label));
        panel.appendChild(box);
        contentSimpleRows.appendChild(panel);
        fieldLabel.addEventListener(Events.ON_OK, this);
        fieldLabel1.addEventListener(Events.ON_OK, this);
    } else {
        editor = WebEditorFactory.getEditor(mField, false);
        label = editor.getLabel();
        editor.setMandatory(false);
        editor.setReadWrite(true);
        editor.dynamicDisplay();
        Component fieldLabel = editor.getComponent();
        if (//  set it back
        displayLength > 0)
            mField.setDisplayLength(displayLength);
        //
        if (isTwoColumns) {
            if (!isPair)
                panel = new Row();
        } else
            panel = new Row();
        panel.appendChild(LayoutUtils.makeRightAlign(label));
        panel.appendChild(fieldLabel);
        contentSimpleRows.appendChild(panel);
        fieldLabel.addEventListener(Events.ON_OK, this);
        m_sEditors2.add(null);
    }
    m_sEditors.add(editor);
}
Also used : Hbox(org.zkoss.zul.Hbox) Label(org.adempiere.webui.component.Label) WEditor(org.adempiere.webui.editor.WEditor) Row(org.adempiere.webui.component.Row) Component(org.zkoss.zk.ui.Component)

Example 14 with Row

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

the class FindWindow method initSimple.

/**
     * initialise lookup record tab
     * @throws IOException 
     *
    **/
private void initSimple() throws IOException {
    lblDocumentNo = new Label();
    lblDocumentNo.setValue(Msg.translate(Env.getCtx(), "DocumentNo").replaceAll("&", ""));
    lblDescription = new Label();
    lblDescription.setValue(Msg.translate(Env.getCtx(), "Description").replaceAll("&", ""));
    lblName = new Label();
    lblName.setValue(Msg.translate(Env.getCtx(), "Name").replaceAll("&", ""));
    lblValue = new Label();
    lblValue.setValue(Msg.translate(Env.getCtx(), "Value").replaceAll("&", ""));
    fieldDocumentNo = new Textbox();
    fieldDocumentNo.setId("fieldDocumentNo");
    fieldDocumentNo.setMaxlength(40);
    fieldDescription = new Textbox();
    fieldDescription.setId("fieldDescription");
    fieldDescription.setMaxlength(40);
    fieldName = new Textbox();
    fieldName.setMaxlength(40);
    fieldValue = new Textbox();
    fieldValue.setMaxlength(40);
    //	Get button from Action
    WAppsAction action = new WAppsAction(ConfirmPanel.A_NEW, null, ConfirmPanel.A_NEW);
    Button btnNew = action.getButton();
    btnNew.setName("btnNew");
    btnNew.addEventListener(Events.ON_CLICK, this);
    //	Get button from Action
    action = new WAppsAction(ConfirmPanel.A_OK, null, ConfirmPanel.A_OK);
    Button btnOk = action.getButton();
    btnOk.setName("btnOkSimple");
    btnOk.addEventListener(Events.ON_CLICK, this);
    //	Get from action
    action = new WAppsAction(ConfirmPanel.A_CANCEL, null, ConfirmPanel.A_CANCEL);
    Button btnCancel = action.getButton();
    btnCancel.setName("btnCancel");
    btnCancel.addEventListener(Events.ON_CLICK, this);
    Panel pnlButtonRight = new Panel();
    //	Change to Standard button order
    pnlButtonRight.appendChild(btnCancel);
    pnlButtonRight.appendChild(btnOk);
    pnlButtonRight.setAlign("right");
    pnlButtonRight.setWidth("100%");
    Panel pnlButtonLeft = new Panel();
    pnlButtonLeft.appendChild(btnNew);
    Hbox hboxButton = new Hbox();
    hboxButton.appendChild(pnlButtonLeft);
    hboxButton.appendChild(pnlButtonRight);
    hboxButton.setWidth("100%");
    pnlDocument = new Row();
    pnlDocument.setId("pnlDocument");
    pnlDocument.appendChild(LayoutUtils.makeRightAlign(lblDocumentNo));
    pnlDocument.appendChild(fieldDocumentNo);
    pnlDescription = new Row();
    pnlDescription.appendChild(LayoutUtils.makeRightAlign(lblDescription));
    pnlDescription.appendChild(fieldDescription);
    pnlValue = new Row();
    pnlValue.appendChild(LayoutUtils.makeRightAlign(lblValue));
    pnlValue.appendChild(fieldValue);
    pnlName = new Row();
    pnlName.appendChild(LayoutUtils.makeRightAlign(lblName));
    pnlName.appendChild(fieldName);
    contentSimple = new Grid();
    contentSimple.setId("contentSimple");
    contentSimple.setWidth("100%");
    contentSimple.makeNoStrip();
    contentSimpleRows = new Rows();
    contentSimple.appendChild(contentSimpleRows);
    contentSimpleRows.appendChild(pnlValue);
    contentSimpleRows.appendChild(pnlName);
    contentSimpleRows.appendChild(pnlDocument);
    contentSimpleRows.appendChild(pnlDescription);
    contentSimple.setVflex(true);
    Borderlayout layout = new Borderlayout();
    layout.setStyle("height: 100%; width: 99%; position: relative");
    winLookupRecord.appendChild(layout);
    Center center = new Center();
    layout.appendChild(center);
    center.appendChild(contentSimple);
    center.setFlex(true);
    South south = new South();
    layout.appendChild(south);
    south.appendChild(hboxButton);
    winLookupRecord.setWidth("100%");
    winLookupRecord.setHeight("100%");
    winLookupRecord.addEventListener(Events.ON_OK, this);
}
Also used : Panel(org.adempiere.webui.component.Panel) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Hbox(org.zkoss.zul.Hbox) Center(org.zkoss.zkex.zul.Center) Button(org.adempiere.webui.component.Button) ToolBarButton(org.adempiere.webui.component.ToolBarButton) Grid(org.adempiere.webui.component.Grid) Label(org.adempiere.webui.component.Label) Textbox(org.adempiere.webui.component.Textbox) South(org.zkoss.zkex.zul.South) Row(org.adempiere.webui.component.Row) Borderlayout(org.zkoss.zkex.zul.Borderlayout) WAppsAction(org.adempiere.webui.component.WAppsAction) Rows(org.adempiere.webui.component.Rows)

Example 15 with Row

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

the class InfoPAttributePanel method dynInit.

//	jbInit
/**
	 * 	Dynamic Init of the Center Panel
	 */
private void dynInit() {
    addAttributes();
    boolean isGuarantee = true;
    boolean isSerial = true;
    boolean isLot = true;
    if (p_M_AttributeSet_ID > 0) {
        MAttributeSet as = new MAttributeSet(Env.getCtx(), p_M_AttributeSet_ID, null);
        isGuarantee = as.isGuaranteeDate();
        isSerial = as.isSerNo();
        isLot = as.isLot();
    }
    //
    String s = Msg.translate(Env.getCtx(), "GuaranteeDate");
    guaranteeDateSelection = new Listbox();
    guaranteeDateSelection.setRows(0);
    guaranteeDateSelection.setMultiple(false);
    guaranteeDateSelection.setMold("select");
    guaranteeDateSelection.setWidth("150px");
    guaranteeDateSelection.appendItem(s + " <", s + " <");
    guaranteeDateSelection.appendItem(s + " =", s + " =");
    guaranteeDateSelection.appendItem(s + " >", s + " >");
    guaranteeDateSelection.setAttribute("zk_component_ID", "InfoPAttributePanel_guaranteeDateSelection");
    initLotSelection();
    //	Fixed Instance Selection Fields
    Row row;
    Div div;
    if (isSerial) {
        row = new Row();
        rows.appendChild(row);
        div = new Div();
        div.setAlign("right");
        div.appendChild(serNoLabel);
        row.appendChild(div);
        row.appendChild(serNoField.getComponent());
        serNoField.getComponent().setWidth("150px");
        serNoField.getComponent().setAttribute("zk_component_ID", "InfoPAttributePanel_serNoField");
    }
    if (isLot) {
        row = new Row();
        rows.appendChild(row);
        div = new Div();
        div.setAlign("right");
        div.appendChild(lotLabel);
        row.appendChild(div);
        row.appendChild(lotField.getComponent());
        lotField.getComponent().setWidth("150px");
        lotField.getComponent().setAttribute("zk_component_ID", "InfoPAttributePanel_lotField");
        row = new Row();
        rows.appendChild(row);
        div = new Div();
        div.setAlign("right");
        div.appendChild(lotLabel2);
        row.appendChild(div);
        row.appendChild(lotSelection);
    }
    if (isGuarantee) {
        row = new Row();
        rows.appendChild(row);
        div = new Div();
        div.setAlign("right");
        div.appendChild(guaranteeDateSelection);
        row.appendChild(div);
        row.appendChild(guaranteeDateField);
        guaranteeDateField.setAttribute("zk_component_ID", "InfoPAttributePanel_guaranteeDateField");
    }
}
Also used : Div(org.zkoss.zul.Div) Row(org.adempiere.webui.component.Row) Listbox(org.adempiere.webui.component.Listbox) MAttributeSet(org.compiere.model.MAttributeSet)

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