Search in sources :

Example 6 with Separator

use of org.zkoss.zul.Separator 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 Separator

use of org.zkoss.zul.Separator 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 Separator

use of org.zkoss.zul.Separator in project adempiere by adempiere.

the class ZkReportViewer method init.

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.setHeight("26px");
    previewType.setMold("select");
    previewType.appendItem("PDF", "PDF");
    previewType.appendItem("HTML", "HTML");
    previewType.appendItem("Excel", "XLS");
    toolBar.appendChild(previewType);
    previewType.addEventListener(Events.ON_SELECT, this);
    toolBar.appendChild(new Separator("vertical"));
    //set default type
    String type = m_reportEngine.getPrintFormat().isForm() ? MSysConfig.getValue("ZK_REPORT_FORM_OUTPUT_TYPE") : MSysConfig.getValue("ZK_REPORT_TABLE_OUTPUT_TYPE");
    if ("PDF".equals(type))
        previewType.setSelectedIndex(0);
    else if ("HTML".equals(type))
        previewType.setSelectedIndex(1);
    else if ("XLS".equals(type))
        previewType.setSelectedIndex(2);
    else
        //fallback to PDF
        previewType.setSelectedIndex(0);
    labelDrill.setValue(Msg.getMsg(Env.getCtx(), "Drill") + ": ");
    toolBar.appendChild(labelDrill);
    comboDrill.setMold("select");
    comboDrill.setTooltiptext(Msg.getMsg(Env.getCtx(), "Drill"));
    toolBar.appendChild(comboDrill);
    toolBar.appendChild(new Separator("vertical"));
    comboReport.setMold("select");
    comboReport.setTooltiptext(Msg.translate(Env.getCtx(), "AD_PrintFormat_ID"));
    toolBar.appendChild(comboReport);
    //	FR [ 237 ]
    //		toolBar.appendChild(new Separator("vertical"));
    comboReportView.setMold("select");
    comboReportView.setTooltiptext(Msg.translate(Env.getCtx(), "AD_ReportView_ID"));
    toolBar.appendChild(comboReportView);
    summary.setText(Msg.getMsg(Env.getCtx(), "Summary"));
    toolBar.appendChild(summary);
    bCustomize.setImage(ServletFns.resolveThemeURL("~./images/Preference24.png"));
    bCustomize.setTooltiptext(Msg.getMsg(Env.getCtx(), "PrintCustomize"));
    toolBar.appendChild(bCustomize);
    bCustomize.addEventListener(Events.ON_CLICK, this);
    bFind.setImage(ServletFns.resolveThemeURL("~./images/Find24.png"));
    bFind.setTooltiptext(Msg.getMsg(Env.getCtx(), "Find"));
    toolBar.appendChild(bFind);
    bFind.addEventListener(Events.ON_CLICK, this);
    toolBar.appendChild(new Separator("vertical"));
    bSendMail.setImage(ServletFns.resolveThemeURL("~./images/SendMail24.png"));
    bSendMail.setTooltiptext(Msg.getMsg(Env.getCtx(), "SendMail"));
    toolBar.appendChild(bSendMail);
    bSendMail.addEventListener(Events.ON_CLICK, this);
    bArchive.setImage(ServletFns.resolveThemeURL("~./images/Archive24.png"));
    bArchive.setTooltiptext(Msg.getMsg(Env.getCtx(), "Archive"));
    toolBar.appendChild(bArchive);
    bArchive.addEventListener(Events.ON_CLICK, this);
    if (m_isCanExport) {
        bExport.setImage(ServletFns.resolveThemeURL("~./images/ExportX24.png"));
        bExport.setTooltiptext(Msg.getMsg(Env.getCtx(), "Export"));
        toolBar.appendChild(bExport);
        bExport.addEventListener(Events.ON_CLICK, this);
    }
    toolBar.appendChild(new Separator("vertical"));
    bRefresh.setImage(ServletFns.resolveThemeURL("~./images/Refresh24.png"));
    bRefresh.setTooltiptext(Msg.getMsg(Env.getCtx(), "Refresh"));
    toolBar.appendChild(bRefresh);
    bRefresh.addEventListener(Events.ON_CLICK, this);
    North north = new North();
    layout.appendChild(north);
    north.appendChild(toolBar);
    Center center = new Center();
    center.setHflex("true");
    center.setVflex("true");
    layout.appendChild(center);
    iframe = new Iframe();
    iframe.setId("reportFrame");
    iframe.setHeight("100%");
    iframe.setWidth("100%");
    iframe.addEventListener(Events.ON_CLICK, this);
    iframe.addEventListener(Events.ON_RIGHT_CLICK, this);
    center.appendChild(iframe);
    try {
        renderReport();
    } catch (Exception e) {
        throw new AdempiereException("Failed to render report", e);
    }
    iframe.setAutohide(true);
    this.setBorder("normal");
    this.addEventListener("onZoom", new EventListener() {

        public void onEvent(Event event) throws Exception {
            if (event instanceof ZoomEvent) {
                ZoomEvent ze = (ZoomEvent) event;
                if (ze.getData() != null && ze.getData() instanceof MQuery) {
                    AEnv.zoom((MQuery) ze.getData());
                }
            }
        }
    });
    this.addEventListener(DrillEvent.ON_DRILL_ACROSS, new EventListener() {

        public void onEvent(Event event) throws Exception {
            if (event instanceof DrillEvent) {
                DrillEvent de = (DrillEvent) event;
                if (de.getData() != null && de.getData() instanceof MQuery) {
                    MQuery query = (MQuery) de.getData();
                    Listitem item = comboDrill.getSelectedItem();
                    if (item != null && item.getValue() != null && item.toString().trim().length() > 0) {
                        query.setTableName(item.getValue().toString());
                        executeDrill(query, event.getTarget());
                    }
                }
            }
        }
    });
    this.addEventListener(DrillEvent.ON_DRILL_DOWN, new EventListener() {

        public void onEvent(Event event) throws Exception {
            if (event instanceof DrillEvent) {
                DrillEvent de = (DrillEvent) event;
                if (de.getData() != null && de.getData() instanceof MQuery) {
                    MQuery query = (MQuery) de.getData();
                    executeDrill(query, event.getTarget());
                }
            }
        }
    });
}
Also used : Iframe(org.zkoss.zul.Iframe) Center(org.zkoss.zul.Center) Listitem(org.zkoss.zul.Listitem) MQuery(org.compiere.model.MQuery) Borderlayout(org.zkoss.zul.Borderlayout) SQLException(java.sql.SQLException) AdempiereException(org.adempiere.exceptions.AdempiereException) ZoomEvent(org.adempiere.webui.event.ZoomEvent) AdempiereException(org.adempiere.exceptions.AdempiereException) ZoomEvent(org.adempiere.webui.event.ZoomEvent) Event(org.zkoss.zk.ui.event.Event) DrillEvent(org.adempiere.webui.event.DrillEvent) DrillEvent(org.adempiere.webui.event.DrillEvent) North(org.zkoss.zul.North) EventListener(org.zkoss.zk.ui.event.EventListener) Separator(org.zkoss.zul.Separator)

Example 9 with Separator

use of org.zkoss.zul.Separator 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 10 with Separator

use of org.zkoss.zul.Separator in project adempiere by adempiere.

the class AboutWindow method createCredit.

private Tabpanel createCredit() {
    Tabpanel tabPanel = new Tabpanel();
    Vbox vbox = new Vbox();
    vbox.setParent(tabPanel);
    vbox.setWidth("100%");
    Hbox hbox = new Hbox();
    hbox.setParent(vbox);
    ToolBarButton link = new ToolBarButton();
    link.setImage("images/Posterita.jpg");
    link.setParent(hbox);
    link.setHref("http://www.posterita.org");
    link.setTarget("_blank");
    Label label = new Label("Contributed the initial Zk Web Client code.");
    label.setParent(hbox);
    Separator separator = new Separator();
    separator.setParent(vbox);
    Div div = new Div();
    div.setParent(vbox);
    div.setWidth("100%");
    Label caption = new Label("Sponsors");
    caption.setStyle("font-weight: bold;");
    div.appendChild(caption);
    separator = new Separator();
    separator.setBar(true);
    separator.setParent(div);
    Vbox content = new Vbox();
    content.setWidth("100%");
    content.setParent(div);
    link = new ToolBarButton();
    link = new ToolBarButton();
    link.setLabel("eEvolution");
    link.setHref("http://www.eevolution.com/");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Adaxa");
    link.setHref("http://www.adaxa.com/");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Westfalia IT");
    link.setHref("http://www.westfalia-it.com");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Walkingtree ");
    link.setHref("http://www.walkingtree.in");
    link.setTarget("_blank");
    link.setParent(content);
    link.setLabel("Sysnova");
    link.setHref("http://www.sysnova.com/");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Idalica");
    link.setHref("http://www.idalica.com/");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("ERPCyA");
    link.setHref("http://www.erpcya.com/");
    link.setTarget("_blank");
    link.setParent(content);
    separator = new Separator();
    separator.setParent(vbox);
    div = new Div();
    div.setParent(vbox);
    div.setWidth("100%");
    caption = new Label("Contributors");
    caption.setStyle("font-weight: bold;");
    div.appendChild(caption);
    separator = new Separator();
    separator.setBar(true);
    separator.setParent(div);
    content = new Vbox();
    content.setWidth("100%");
    content.setParent(div);
    link = new ToolBarButton();
    link.setLabel("Victor PĂ©rez");
    link.setHref("http://wiki.adempiere.net/User:vpj-cd");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Paul Bowden");
    link.setHref("http://wiki.adempiere.net/User:Phib");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Michael McKay");
    link.setHref("http://wiki.adempiere.net/User:MJMcKay");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Mario Calderon");
    link.setHref("http://wiki.adempiere.net/User:mar_cal_westf");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Ashley G Ramdass");
    link.setHref("http://wiki.adempiere.net/User:Agramdass");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Low Heng Sin");
    link.setHref("http://wiki.adempiere.net/User:Hengsin");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Carlos Ruiz");
    link.setHref("http://wiki.adempiere.net/User:CarlosRuiz");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Teo Sarca");
    link.setHref("http://wiki.adempiere.net/User:Teo_sarca");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Trifon Trifonov");
    link.setHref("http://wiki.adempiere.net/User:Trifonnt");
    link.setTarget("_blank");
    link.setParent(content);
    link = new ToolBarButton();
    link.setLabel("Yamel Senih");
    link.setHref("http://wiki.adempiere.net/User:Yamel_Senih");
    link.setTarget("_blank");
    link.setParent(content);
    return tabPanel;
}
Also used : Div(org.zkoss.zul.Div) Hbox(org.zkoss.zul.Hbox) ToolBarButton(org.adempiere.webui.component.ToolBarButton) Label(org.adempiere.webui.component.Label) Tabpanel(org.adempiere.webui.component.Tabpanel) Vbox(org.zkoss.zul.Vbox) Separator(org.zkoss.zul.Separator)

Aggregations

Separator (org.zkoss.zul.Separator)38 Row (org.adempiere.webui.component.Row)11 Center (org.zkoss.zul.Center)11 Label (org.adempiere.webui.component.Label)10 Rows (org.adempiere.webui.component.Rows)10 ConfirmPanel (org.adempiere.webui.component.ConfirmPanel)9 Div (org.zkoss.zul.Div)9 North (org.zkoss.zul.North)9 Hbox (org.zkoss.zul.Hbox)8 South (org.zkoss.zul.South)8 Panel (org.adempiere.webui.component.Panel)7 Borderlayout (org.zkoss.zul.Borderlayout)7 North (org.zkoss.zkex.zul.North)6 South (org.zkoss.zkex.zul.South)5 Vbox (org.zkoss.zul.Vbox)5 Button (org.adempiere.webui.component.Button)4 Tabpanel (org.adempiere.webui.component.Tabpanel)4 Borderlayout (org.zkoss.zkex.zul.Borderlayout)4 Center (org.zkoss.zkex.zul.Center)4 Space (org.zkoss.zul.Space)4