Search in sources :

Example 6 with Borderlayout

use of org.zkoss.zkex.zul.Borderlayout in project adempiere by adempiere.

the class ZkJRViewer method init.

// initialization
private void init() {
    Borderlayout layout = new Borderlayout();
    layout.setStyle("position: absolute; height: 99%; width: 99%");
    this.appendChild(layout);
    this.setStyle("width: 100%; height: 100%; position: absolute");
    toolbar = new Toolbar();
    toolbar.setHeight("26px");
    sendMail = new Toolbarbutton();
    archive = new Toolbarbutton();
    sendMail.setImage("/images/SendMail24.png");
    sendMail.setTooltiptext("Send Mail");
    toolbar.appendChild(sendMail);
    sendMail.addEventListener(Events.ON_CLICK, this);
    archive.setImage("/images/Archive24.png");
    archive.setTooltiptext("Archived Documents/Reports");
    toolbar.appendChild(archive);
    archive.addEventListener(Events.ON_CLICK, this);
    toolbar.appendChild(new Separator("vertical"));
    //
    // we have drop down in toolbar to select PDF or XLS
    //
    previewType.setMold("select");
    previewType.appendItem("PDF", "PDF");
    previewType.appendItem("Excel", "XLS");
    previewType.appendItem("RTF", "RTF");
    toolbar.appendChild(previewType);
    previewType.addEventListener(Events.ON_SELECT, this);
    North north = new North();
    layout.appendChild(north);
    north.appendChild(toolbar);
    Center center = new Center();
    center.setFlex(true);
    layout.appendChild(center);
    iframe = new Iframe();
    iframe.setId(jasperPrint.getName());
    iframe.setHeight("100%");
    iframe.setWidth("100%");
    iframe.setAutohide(Boolean.TRUE);
    try {
        renderReport();
    } catch (Exception e) {
        log.log(Level.SEVERE, e.getLocalizedMessage(), e.getMessage());
        throw new AdempiereException("Failed to render report.", e);
    }
    center.appendChild(iframe);
    this.setBorder("normal");
}
Also used : Iframe(org.zkoss.zul.Iframe) Center(org.zkoss.zkex.zul.Center) AdempiereException(org.adempiere.exceptions.AdempiereException) Toolbarbutton(org.zkoss.zul.Toolbarbutton) North(org.zkoss.zkex.zul.North) Borderlayout(org.zkoss.zkex.zul.Borderlayout) Separator(org.zkoss.zul.Separator) IOException(java.io.IOException) FileNotFoundException(java.io.FileNotFoundException) AdempiereException(org.adempiere.exceptions.AdempiereException) Toolbar(org.zkoss.zul.Toolbar)

Example 7 with Borderlayout

use of org.zkoss.zkex.zul.Borderlayout in project adempiere by adempiere.

the class WScanBarUI method zkInit.

private void zkInit() {
    Borderlayout contentPane = new Borderlayout();
    form.appendChild(contentPane);
    North north = new North();
    contentPane.appendChild(north);
    north.appendChild(newGrid);
    Center center = new Center();
    contentPane.appendChild(center);
    center.appendChild(productPanel);
    South south = new South();
    contentPane.appendChild(south);
    Panel southPanel = new Panel();
    south.appendChild(southPanel);
    southPanel.appendChild(new Separator());
    southPanel.appendChild(gridConfirm);
}
Also used : Panel(org.adempiere.webui.component.Panel) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Center(org.zkoss.zkex.zul.Center) South(org.zkoss.zkex.zul.South) North(org.zkoss.zkex.zul.North) Borderlayout(org.zkoss.zkex.zul.Borderlayout) Separator(org.zkoss.zul.Separator)

Example 8 with Borderlayout

use of org.zkoss.zkex.zul.Borderlayout in project adempiere by adempiere.

the class WExpressReceiptScanBarUI method zkInit.

private void zkInit() {
    Borderlayout contentPane = new Borderlayout();
    form.appendChild(contentPane);
    North north = new North();
    contentPane.appendChild(north);
    north.appendChild(newGrid);
    Center center = new Center();
    contentPane.appendChild(center);
    center.appendChild(m_panelProduct);
    South south = new South();
    contentPane.appendChild(south);
    Panel southPanel = new Panel();
    south.appendChild(southPanel);
    southPanel.appendChild(new Separator());
    southPanel.appendChild(m_grdConfirm);
}
Also used : Panel(org.adempiere.webui.component.Panel) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Center(org.zkoss.zkex.zul.Center) South(org.zkoss.zkex.zul.South) North(org.zkoss.zkex.zul.North) Borderlayout(org.zkoss.zkex.zul.Borderlayout) Separator(org.zkoss.zul.Separator)

Example 9 with Borderlayout

use of org.zkoss.zkex.zul.Borderlayout in project adempiere by adempiere.

the class WExpressReceiptScanBarUI method productPanel.

/**
     * Creates the account panel.
     *
     * The account panel contains:
     * <li>a table detailing all accounts
     * <li>a button for creating charges for selected accounts
     */
private void productPanel() {
    Borderlayout borderlayout = new Borderlayout();
    borderlayout.setStyle("position: absolute");
    borderlayout.setWidth("100%");
    borderlayout.setHeight("100%");
    m_panelProduct.appendChild(borderlayout);
    North north = new North();
    north.setBorder("none");
    borderlayout.appendChild(north);
    Label label = new Label(Msg.translate(Env.getCtx(), "M_Product_ID"));
    label.setStyle("font-weight: bold;");
    north.appendChild(label);
    Center center = new Center();
    center.setBorder("none");
    center.setFlex(true);
    center.setAutoscroll(true);
    borderlayout.appendChild(center);
    center.appendChild(productTable);
    South south = new South();
    south.setBorder("none");
    borderlayout.appendChild(south);
    Panel southPanel = new Panel();
    southPanel.setAlign("right");
    south.appendChild(southPanel);
    return;
}
Also used : Panel(org.adempiere.webui.component.Panel) ConfirmPanel(org.adempiere.webui.component.ConfirmPanel) Center(org.zkoss.zkex.zul.Center) Label(org.adempiere.webui.component.Label) South(org.zkoss.zkex.zul.South) North(org.zkoss.zkex.zul.North) Borderlayout(org.zkoss.zkex.zul.Borderlayout)

Example 10 with Borderlayout

use of org.zkoss.zkex.zul.Borderlayout 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)

Aggregations

Borderlayout (org.zkoss.zkex.zul.Borderlayout)16 Center (org.zkoss.zkex.zul.Center)13 North (org.zkoss.zkex.zul.North)11 South (org.zkoss.zkex.zul.South)10 ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)8 Panel (org.adempiere.webui.component.Panel)7 Separator (org.zkoss.zul.Separator)4 PropertyVetoException (java.beans.PropertyVetoException)3 Button (org.adempiere.webui.component.Button)3 Label (org.adempiere.webui.component.Label)3 WAppsAction (org.adempiere.webui.component.WAppsAction)3 West (org.zkoss.zkex.zul.West)3 org.zkoss.zul (org.zkoss.zul)3 Row (org.zkoss.zul.Row)3 IOException (java.io.IOException)2 Listbox (org.adempiere.webui.component.Listbox)2 ToolBarButton (org.adempiere.webui.component.ToolBarButton)2 Pre (org.zkoss.zhtml.Pre)2 Text (org.zkoss.zhtml.Text)2 Div (org.zkoss.zul.Div)2