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);
}
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");
}
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);
}
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);
}
});
}
}
Aggregations