Search in sources :

Example 1 with Toolbar

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

the class ADTreePanel method init.

//	End Yamel Senih
private void init() {
    this.setWidth("100%");
    this.setHeight("100%");
    tree = new Tree();
    tree.setMultiple(false);
    tree.setWidth("100%");
    tree.setVflex(true);
    // Due to bug in the new paging functionality
    tree.setPageSize(-1);
    tree.setStyle("border: none");
    pnlSearch = new TreeSearchPanel(tree, Events.ON_SELECT);
    Toolbar toolbar = new Toolbar();
    toolbar.appendChild(pnlSearch);
    this.appendChild(toolbar);
    Panelchildren pc = new Panelchildren();
    this.appendChild(pc);
    pc.appendChild(tree);
    // Elaine 2009/02/27 - expand tree
    toolbar = new Toolbar();
    chkExpand = new Checkbox();
    chkExpand.setText(Msg.getMsg(Env.getCtx(), "ExpandTree"));
    chkExpand.addEventListener(Events.ON_CHECK, this);
    toolbar.appendChild(chkExpand);
    this.appendChild(toolbar);
}
Also used : Checkbox(org.adempiere.webui.component.Checkbox) Tree(org.zkoss.zul.Tree) Panelchildren(org.zkoss.zul.Panelchildren) Toolbar(org.zkoss.zul.Toolbar)

Example 2 with Toolbar

use of org.zkoss.zul.Toolbar 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 3 with Toolbar

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

the class MenuPanel method initComponents.

private void initComponents() {
    this.setWidth("100%");
    this.setHeight("100%");
    this.setStyle("position: relative");
    menuTree = new Tree();
    menuTree.setMultiple(false);
    menuTree.setId("mnuMain");
    menuTree.setWidth("100%");
    menuTree.setVflex(true);
    menuTree.setSizedByContent(false);
    // Due to bug in the new paging functionality
    menuTree.setPageSize(-1);
    menuTree.setStyle("border: none");
    pnlSearch = new TreeSearchPanel(menuTree);
    Toolbar toolbar = new Toolbar();
    toolbar.setMold("panel");
    toolbar.appendChild(pnlSearch);
    this.appendChild(toolbar);
    Panelchildren pc = new Panelchildren();
    this.appendChild(pc);
    pc.appendChild(menuTree);
    // Elaine 2009/02/27 - expand tree
    toolbar = new Toolbar();
    toolbar.setStyle("verticle-align: middle; padding: 2px");
    chkExpand = new Checkbox();
    chkExpand.setText(Msg.getMsg(Env.getCtx(), "ExpandTree"));
    chkExpand.addEventListener(Events.ON_CHECK, this);
    toolbar.appendChild(chkExpand);
    toolbar.setMold("panel");
    this.appendChild(toolbar);
}
Also used : Checkbox(org.adempiere.webui.component.Checkbox) MTree(org.compiere.model.MTree) Tree(org.zkoss.zul.Tree) Panelchildren(org.zkoss.zul.Panelchildren) Toolbar(org.zkoss.zul.Toolbar)

Example 4 with Toolbar

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

the class WGraph method loadData.

private void loadData() {
    list = builder.loadData();
    if (m_renderChart && m_chartSelection) {
        Toolbar toolbar = new Toolbar();
        panel.appendChild(toolbar);
        int AD_Reference_Value_ID = DB.getSQLValue(null, "SELECT AD_Reference_ID FROM AD_Reference WHERE Name = ?", "PA_Goal ChartType");
        MLookupInfo info = MLookupFactory.getLookup_List(Env.getLanguage(Env.getCtx()), AD_Reference_Value_ID);
        MLookup mLookup = new MLookup(info, 0);
        WTableDirEditor editor = new WTableDirEditor("ChartType", false, false, true, mLookup);
        toolbar.appendChild(editor.getComponent());
        editor.addValueChangeListener(new ValueChangeListener() {

            public void valueChange(ValueChangeEvent evt) {
                Object value = evt.getNewValue();
                if (value == null || value.toString().trim().length() == 0)
                    return;
                JFreeChart chart = null;
                chart = builder.createChart(value.toString());
                if (chart != null)
                    render(chart);
            }
        });
    }
}
Also used : WTableDirEditor(org.adempiere.webui.editor.WTableDirEditor) MLookupInfo(org.compiere.model.MLookupInfo) ValueChangeEvent(org.adempiere.exceptions.ValueChangeEvent) ValueChangeListener(org.adempiere.exceptions.ValueChangeListener) MLookup(org.compiere.model.MLookup) Point(java.awt.Point) JFreeChart(org.jfree.chart.JFreeChart) Toolbar(org.zkoss.zul.Toolbar)

Aggregations

Toolbar (org.zkoss.zul.Toolbar)4 Checkbox (org.adempiere.webui.component.Checkbox)2 Panelchildren (org.zkoss.zul.Panelchildren)2 Tree (org.zkoss.zul.Tree)2 Point (java.awt.Point)1 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 AdempiereException (org.adempiere.exceptions.AdempiereException)1 ValueChangeEvent (org.adempiere.exceptions.ValueChangeEvent)1 ValueChangeListener (org.adempiere.exceptions.ValueChangeListener)1 WTableDirEditor (org.adempiere.webui.editor.WTableDirEditor)1 MLookup (org.compiere.model.MLookup)1 MLookupInfo (org.compiere.model.MLookupInfo)1 MTree (org.compiere.model.MTree)1 JFreeChart (org.jfree.chart.JFreeChart)1 Borderlayout (org.zkoss.zkex.zul.Borderlayout)1 Center (org.zkoss.zkex.zul.Center)1 North (org.zkoss.zkex.zul.North)1 Iframe (org.zkoss.zul.Iframe)1 Separator (org.zkoss.zul.Separator)1