Search in sources :

Example 21 with Rows

use of org.adempiere.webui.component.Rows 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 22 with Rows

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

the class WBrowserSearch method initComponents.

/**
	 * Initialize components
	 */
@Override
public void initComponents() {
    if (mainPanel != null)
        return;
    //	
    m_separators = new ArrayList<Label>();
    rows = new Rows();
    //
    mainPanel = new Panel();
    centerPanel = GridFactory.newGridLayout();
    //setup columns
    Columns columns = new Columns();
    centerPanel.appendChild(columns);
    int colN = getColumns() * 2;
    if (colN != 0) {
        int percent = 100 / colN;
        for (int i = 0; i < colN; i++) {
            Column col = new Column();
            col.setWidth((i == 0 ? ((int) percent / 2) : percent) + "%");
            columns.appendChild(col);
        }
    }
    //	Add Rows
    centerPanel.appendChild(rows);
    mainPanel.appendChild(centerPanel);
    mainPanel.setStyle("overflow-y:auto");
}
Also used : Panel(org.adempiere.webui.component.Panel) Column(org.adempiere.webui.component.Column) Label(org.adempiere.webui.component.Label) Columns(org.adempiere.webui.component.Columns) Rows(org.adempiere.webui.component.Rows)

Example 23 with Rows

use of org.adempiere.webui.component.Rows 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 24 with Rows

use of org.adempiere.webui.component.Rows 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 25 with Rows

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

the class InfoPanel method init.

protected void init() {
    ThemeUtils.addSclass("ad-infopanel", this);
    if (isModal()) {
        setAttribute(Window.MODE_KEY, Window.MODE_MODAL);
        setBorder("normal");
        setClosable(true);
        setWidth(p_width + "px");
        setHeight(p_height + "px");
        setContentStyle("overflow: auto");
        setSizable(true);
        setMaximizable(true);
        ThemeUtils.addSclass("ad-infopanel-modal", this);
    } else {
        setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED);
        //			setBorder("none");
        //			setWidth("100%");
        //			setHeight("100%");
        //			setStyle("position: absolute");
        ThemeUtils.addSclass("ad-infopanel-embedded", this);
    }
    // Elaine 2008/12/16
    confirmPanel = new ConfirmPanel(true, true, false, true, true, true);
    confirmPanel.addActionListener(Events.ON_CLICK, this);
    // Elaine 2008/12/16
    confirmPanel.getButton(ConfirmPanel.A_CUSTOMIZE).setVisible(hasCustomize());
    confirmPanel.getButton(ConfirmPanel.A_HISTORY).setVisible(hasHistory());
    confirmPanel.getButton(ConfirmPanel.A_ZOOM).setVisible(hasZoom());
    confirmPanel.getButton(ConfirmPanel.A_OK).setVisible(p_saveResults);
    checkAutoQuery.setText(Msg.getMsg(Env.getCtx(), "AutoRefresh"));
    checkAutoQuery.setTooltip(Msg.getMsg(Env.getCtx(), "AutoRefresh"));
    checkAutoQuery.setName("AutoQuery");
    checkAutoQuery.setSelected(MSysConfig.getValue(SYSCONFIG_INFO_AUTO_QUERY, "Y", Env.getAD_Client_ID(Env.getCtx())).equals("Y"));
    checkAutoQuery.setAttribute("zk_component_ID", "Lookup_Confirm_checkAutoQuery");
    checkAutoQuery.addActionListener(this);
    confirmPanel.getButton(ConfirmPanel.A_REFRESH).getParent().insertBefore(checkAutoQuery, confirmPanel.getButton(ConfirmPanel.A_REFRESH));
    confirmPanel.getButton(ConfirmPanel.A_REFRESH).getParent().insertBefore(new Separator("vertical"), confirmPanel.getButton(ConfirmPanel.A_REFRESH));
    //
    statusBar.setEastVisibility(false);
    statusBar.setAttribute("zk_component_ID", "info_statusBar");
    //
    p_southLayout.setVflex("min");
    Center center = new Center();
    center.appendChild(confirmPanel);
    p_southLayout.appendChild(center);
    South south = new South();
    south.appendChild(statusBar);
    p_southLayout.appendChild(south);
    //
    // Reset button
    bReset = confirmPanel.createButton(ConfirmPanel.A_RESET);
    bReset.addActionListener(this);
    lblReset = new Label();
    lblReset.setValue(Util.cleanAmp(Msg.translate(Env.getCtx(), "Reset")));
    p_table.setOddRowSclass(null);
    p_table.setAttribute("zk_component_ID", "Lookup_Data_SearchResults");
    p_table.setVflex(true);
    // Sizes
    p_centerNorth.setVflex("min");
    p_centerCenter.setVflex("1");
    p_centerSouth.setHeight("25%");
    //
    ThemeUtils.addSclass("info-panel-center", p_centerLayout);
    // May be empty
    p_centerLayout.appendChild(p_centerNorth);
    // the table
    p_centerLayout.appendChild(p_centerCenter);
    // detail tabs or other
    p_centerLayout.appendChild(p_centerSouth);
    //
    // Need to use a container for p_table so we can insert paging if required.
    Div div = new Div();
    div.appendChild(p_table);
    div.setVflex("1");
    div.setHflex("1");
    p_centerCenter.appendChild(div);
    p_centerCenter.setAutoscroll(false);
    p_centerCenter.setHflex("1");
    //
    p_centerSouth.setCollapsible(true);
    p_centerSouth.setSplittable(true);
    p_centerSouth.setHflex("1");
    //  Setup the north reset button and criteria grid
    West spWest = new West();
    spWest.setHflex("min");
    ThemeUtils.addSclass("criteria", spWest);
    Center spCenter = new Center();
    //spCenter.setWidth("100%");
    spCenter.setHflex("1");
    spCenter.setVflex("min");
    ThemeUtils.addSclass("criteria", spCenter);
    p_northLayout.setHflex("min");
    p_northLayout.setVflex("min");
    p_northLayout.appendChild(spWest);
    p_northLayout.appendChild(spCenter);
    // spWest - the reset button
    Grid bGrid = GridFactory.newGridLayout();
    bGrid.setSizedByContent(true);
    Columns bColumns = new Columns();
    Column col = new Column();
    col.setHflex("min");
    bColumns.appendChild(col);
    bGrid.appendChild(bColumns);
    Rows bRows = new Rows();
    Row bRow = new Row();
    bGrid.appendChild(bRows);
    bRows.appendChild(bRow);
    bRow.appendChild(bReset);
    bRow = new Row();
    bRows.appendChild(bRow);
    bRow.appendChild(lblReset);
    spWest.appendChild(bGrid);
    // The criteria table
    //p_criteriaGrid.setSizedByContent(true);
    spCenter.appendChild(p_criteriaGrid);
    Borderlayout mainPanel = new Borderlayout();
    mainPanel.setWidth("100%");
    mainPanel.setHeight("100%");
    //
    North north = new North();
    mainPanel.appendChild(north);
    north.appendChild(p_northLayout);
    //
    center = new Center();
    mainPanel.appendChild(center);
    center.appendChild(p_centerLayout);
    //
    south = new South();
    mainPanel.appendChild(south);
    south.appendChild(p_southLayout);
    //
    if (!isModal()) {
        mainPanel.setStyle("position: absolute");
    }
    this.appendChild(mainPanel);
    this.addEventListener(Events.ON_OK, this);
    this.setVisible(true);
}
Also used : Center(org.zkoss.zul.Center) West(org.zkoss.zul.West) Grid(org.adempiere.webui.component.Grid) South(org.zkoss.zul.South) Label(org.adempiere.webui.component.Label) Columns(org.adempiere.webui.component.Columns) Borderlayout(org.zkoss.zul.Borderlayout) Div(org.zkoss.zul.Div) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) IDColumn(org.compiere.minigrid.IDColumn) Column(org.adempiere.webui.component.Column) North(org.zkoss.zul.North) Row(org.adempiere.webui.component.Row) Separator(org.zkoss.zul.Separator) Rows(org.adempiere.webui.component.Rows)

Aggregations

Rows (org.adempiere.webui.component.Rows)76 Row (org.adempiere.webui.component.Row)69 Label (org.adempiere.webui.component.Label)28 Grid (org.adempiere.webui.component.Grid)27 Panel (org.adempiere.webui.component.Panel)20 Center (org.zkoss.zul.Center)17 Div (org.zkoss.zul.Div)15 ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)13 Hbox (org.zkoss.zul.Hbox)13 Space (org.zkoss.zul.Space)13 South (org.zkoss.zul.South)12 Center (org.zkoss.zkex.zul.Center)11 North (org.zkoss.zul.North)11 North (org.zkoss.zkex.zul.North)10 Borderlayout (org.zkoss.zul.Borderlayout)10 Separator (org.zkoss.zul.Separator)10 South (org.zkoss.zkex.zul.South)8 Caption (org.zkoss.zul.Caption)6 Tab (org.adempiere.webui.component.Tab)5 Row (org.zkoss.zul.Row)5