use of org.zkoss.zul.Borderlayout in project adempiere by adempiere.
the class SMJReportViewer method init.
//SMJReportViewer
/**
* 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 -------------
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"));
//fallback to PDF
previewType.setSelectedIndex(0);
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("reportFrame");
iframe.setHeight("100%");
iframe.setWidth("100%");
center.appendChild(iframe);
try {
renderReport("PDF");
} catch (Exception e) {
throw new AdempiereException("Failed to render report", e);
}
iframe.setAutohide(true);
this.setBorder("normal");
}
use of org.zkoss.zul.Borderlayout in project adempiere by adempiere.
the class InfoProductPanel method statInit.
// initComponents
private void statInit() {
// Fill the grid, setup the center data table & add the tabs
initComponents();
Rows rows = new Rows();
Row row = new Row();
rows.appendChild(row);
row.appendCellChild(lblValue.rightAlign());
row.appendCellChild(fieldValue);
row.appendCellChild(lblWarehouse.rightAlign());
row.appendCellChild(fWarehouse_ID.getComponent());
row.appendCellChild(lblBlank.rightAlign());
row.appendCellChild(checkOnlyStock);
row = new Row();
rows.appendChild(row);
row.appendCellChild(lblName.rightAlign());
row.appendCellChild(fieldName);
row.appendCellChild(lblPriceList.rightAlign());
row.appendCellChild(fPriceList_ID.getComponent());
row.appendCellChild(lblAS.rightAlign());
row.appendCellChild(fAS_ID.getComponent());
//
row = new Row();
rows.appendChild(row);
row.appendCellChild(lblUPC.rightAlign());
row.appendCellChild(fieldUPC);
row.appendCellChild(lblProductCategory.rightAlign());
row.appendCellChild(fProductCategory_ID.getComponent());
row.appendCellChild(lblASI.rightAlign());
row.appendCellChild(fASI_ID.getComponent());
row = new Row();
rows.appendChild(row);
row.appendCellChild(lblSKU.rightAlign());
row.appendCellChild(fieldSKU);
row.appendCellChild(lblVendor.rightAlign());
row.appendCellChild(fVendor_ID.getComponent());
row.appendCellChild(lblBlank.rightAlign());
row.appendCellChild(checkAND);
//
ColumnInfo[] s_layoutWarehouse = new ColumnInfo[] { new ColumnInfo(" ", "M_Warehouse_ID", IDColumn.class), new ColumnInfo(Msg.translate(Env.getCtx(), "WarehouseName"), "WarehouseName", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyAvailable"), "sum(QtyAvailable)", Double.class, true, true, null), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyOnHand"), "sum(QtyOnHand)", Double.class), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyReserved"), "sum(QtyReserved)", Double.class), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyOrdered"), "sum(QtyOrdered)", Double.class) };
// new ColumnInfo(Msg.translate(Env.getCtx(), "DocumentNote"), "DocumentNote", String.class)};
/** From Clause */
String s_sqlFrom = " M_PRODUCT_STOCK_V ";
/** Where Clause */
String s_sqlWhere = "(QtyOnHand <> 0 OR QtyAvailable <> 0 OR QtyReserved <> 0 OR QtyOrdered <> 0) AND M_Product_ID = ?";
// String s_sqlWhere = "M_Product_ID = ?";
m_sqlWarehouse = warehouseTbl.prepareTable(s_layoutWarehouse, s_sqlFrom, s_sqlWhere, false, "M_PRODUCT_STOCK_V");
m_sqlWarehouse += " Group By M_Warehouse_ID, WarehouseName ";
m_sqlWarehouse += " Order By sum(QtyOnHand) DESC, WarehouseName ";
warehouseTbl.setMultiSelection(false);
warehouseTbl.setSizedByContent(false);
//warehouseTbl.autoSize();
warehouseTbl.setShowTotals(true);
//warehouseTbl.getModel().addTableModelListener(this);
warehouseTbl.setAttribute("zk_component_ID", "Lookup_Data_Warehouse");
ColumnInfo[] s_layoutSubstitute = new ColumnInfo[] { new ColumnInfo(Msg.translate(Env.getCtx(), "Warehouse"), "orgname", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Description"), "description", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Value"), "value", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Name"), "Name", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyAvailable"), "QtyAvailable", Double.class, true, true, null), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyOnHand"), "QtyOnHand", Double.class), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyReserved"), "QtyReserved", Double.class), new ColumnInfo(Msg.translate(Env.getCtx(), "PriceStd"), "PriceStd", Double.class) };
s_sqlFrom = "M_PRODUCT_SUBSTITUTERELATED_V";
s_sqlWhere = "M_Product_ID = ? AND M_PriceList_Version_ID = ? and RowType = 'S'";
m_sqlSubstitute = substituteTbl.prepareTable(s_layoutSubstitute, s_sqlFrom, s_sqlWhere, false, "M_PRODUCT_SUBSTITUTERELATED_V");
substituteTbl.setMultiSelection(false);
substituteTbl.autoSize();
substituteTbl.getModel().addTableModelListener(this);
substituteTbl.setAttribute("zk_component_ID", "Lookup_Data_Substitute");
ColumnInfo[] s_layoutRelated = new ColumnInfo[] { new ColumnInfo(Msg.translate(Env.getCtx(), "Warehouse"), "orgname", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Description"), "description", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Value"), "value", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Name"), "Name", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyAvailable"), "QtyAvailable", Double.class, true, true, null), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyOnHand"), "QtyOnHand", Double.class), new ColumnInfo(Msg.translate(Env.getCtx(), "QtyReserved"), "QtyReserved", Double.class), new ColumnInfo(Msg.translate(Env.getCtx(), "PriceStd"), "PriceStd", Double.class) };
s_sqlFrom = "M_PRODUCT_SUBSTITUTERELATED_V";
s_sqlWhere = "M_Product_ID = ? AND M_PriceList_Version_ID = ? and RowType = 'R'";
m_sqlRelated = relatedTbl.prepareTable(s_layoutRelated, s_sqlFrom, s_sqlWhere, false, "M_PRODUCT_SUBSTITUTERELATED_V");
relatedTbl.setMultiSelection(false);
relatedTbl.autoSize();
relatedTbl.getModel().addTableModelListener(this);
relatedTbl.setAttribute("zk_component_ID", "Lookup_Data_Related");
//Available to Promise Tab
m_tableAtp.setMultiSelection(false);
m_tableAtp.autoSize();
m_tableAtp.setShowTotals(true);
m_tableAtp.setAttribute("zk_component_ID", "Lookup_Data_ATP");
//Vendor tab
ColumnInfo[] s_layoutVendor = new ColumnInfo[] { new ColumnInfo(Msg.translate(Env.getCtx(), "Vendor"), "(SELECT bp.Name FROM C_BPartner bp WHERE bp.C_BPartner_ID = M_PRODUCT_PO.C_BPartner_ID)", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsCurrentVendor"), "IsCurrentVendor", Boolean.class), new ColumnInfo(Msg.translate(Env.getCtx(), "C_UOM_ID"), "(SELECT Name FROM C_UOM WHERE C_UOM_ID = M_PRODUCT_PO.C_UOM_ID)", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "C_Currency_ID"), "(SELECT iso_code FROM C_Currency WHERE C_Currency_ID = M_PRODUCT_PO.C_Currency_ID)", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "PriceList"), "PriceList", BigDecimal.class), new ColumnInfo(Msg.translate(Env.getCtx(), "PricePO"), "PricePO", BigDecimal.class), new ColumnInfo(Msg.translate(Env.getCtx(), "VendorProductNo"), "VendorProductNo", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Order_Min"), "Order_Min", Double.class), new ColumnInfo(Msg.translate(Env.getCtx(), "DeliveryTime_Promised"), "DeliveryTime_Promised", Double.class), new ColumnInfo(Msg.translate(Env.getCtx(), "DeliveryTime_Actual"), "DeliveryTime_Actual", Double.class) };
s_sqlFrom = "M_PRODUCT_PO";
s_sqlWhere = "M_Product_ID = ?";
m_sqlVendor = vendorTbl.prepareTable(s_layoutVendor, s_sqlFrom, s_sqlWhere, false, "M_PRODUCT_PO");
vendorTbl.setMultiSelection(false);
vendorTbl.autoSize();
vendorTbl.setAttribute("zk_component_ID", "Lookup_Data_Vendor");
detailTabBox.setHeight("100%");
Tabpanels tabPanels = new Tabpanels();
detailTabBox.appendChild(tabPanels);
Tabs tabs = new Tabs();
detailTabBox.appendChild(tabs);
Tab tab = new Tab(Util.cleanAmp(Msg.translate(Env.getCtx(), "Warehouse")));
tab.addEventListener(Events.ON_SELECT, this);
tabs.appendChild(tab);
Tabpanel desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
desktopTabPanel.appendChild(warehouseTbl);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "Description"));
tab.addEventListener(Events.ON_SELECT, this);
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
fieldDescription.setWidth("99%");
fieldDescription.setHeight("99%");
desktopTabPanel.appendChild(fieldDescription);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "ProductAttribute"));
tab.addEventListener(Events.ON_SELECT, this);
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
fieldPAttributes.setWidth("99%");
fieldPAttributes.setHeight("99%");
desktopTabPanel.appendChild(fieldPAttributes);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "Substitute_ID"));
tab.addEventListener(Events.ON_SELECT, this);
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
desktopTabPanel.appendChild(substituteTbl);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.translate(Env.getCtx(), "RelatedProduct_ID"));
tab.addEventListener(Events.ON_SELECT, this);
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
desktopTabPanel.appendChild(relatedTbl);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Msg.getMsg(Env.getCtx(), "ATP"));
tab.addEventListener(Events.ON_SELECT, this);
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
desktopTabPanel.appendChild(m_tableAtp);
tabPanels.appendChild(desktopTabPanel);
tab = new Tab(Util.cleanAmp(Msg.translate(Env.getCtx(), "Vendor")));
tab.addEventListener(Events.ON_SELECT, this);
tabs.appendChild(tab);
desktopTabPanel = new Tabpanel();
desktopTabPanel.setHeight("100%");
desktopTabPanel.appendChild(vendorTbl);
tabPanels.appendChild(desktopTabPanel);
tabs.setAttribute("zk_component_ID", "Subordinate_Tabs");
// Add the tabs to the center south layout
Borderlayout tabLayout = new Borderlayout();
//
North north = new North();
tabLayout.appendChild(north);
north.appendChild(checkShowDetail);
//
Center center = new Center();
tabLayout.appendChild(center);
center.appendChild(detailTabBox);
// Set main panel elements. The other elements are handled by the info.java class
p_criteriaGrid.appendChild(rows);
p_centerSouth.appendChild(tabLayout);
p_centerSouth.setTitle(Msg.translate(Env.getCtx(), "WarehouseStock"));
p_centerSouth.setTooltiptext(Msg.translate(Env.getCtx(), "WarehouseStock"));
super.setSizes();
warehouseTbl.addActionListener(new EventListener<Event>() {
public void onEvent(Event event) throws Exception {
if (warehouseTbl.getRowCount() > 0) {
int selectedRow = warehouseTbl.getSelectedRow();
if (selectedRow < 0)
selectedRow = 0;
Object wh_data = warehouseTbl.getValueAt(selectedRow, warehouseTbl.getKeyColumnIndex());
if (wh_data != null && wh_data instanceof IDColumn) {
IDColumn dataColumn = (IDColumn) wh_data;
m_ATP_M_Warehouse_ID = dataColumn.getRecord_ID();
} else {
m_ATP_M_Warehouse_ID = m_M_Warehouse_ID;
}
} else {
m_ATP_M_Warehouse_ID = m_M_Warehouse_ID;
}
}
});
}
use of org.zkoss.zul.Borderlayout in project adempiere by adempiere.
the class InfoPAttributePanel method jbInit.
//
/**
* Static Init
* @throws Exception
*/
private void jbInit() throws Exception {
setWidth("410px");
setHeight("410px");
Borderlayout layout = new Borderlayout();
Center center = new Center();
layout.appendChild(center);
center.setFlex(true);
center.setAutoscroll(true);
center.setStyle("border: none");
this.appendChild(layout);
South south = new South();
layout.appendChild(south);
Grid grid = new Grid();
ThemeUtils.addSclass("small-grid", grid);
center.appendChild(grid);
rows = new Rows();
grid.appendChild(rows);
// ConfirmPanel
confirmPanel.addActionListener(this);
south.appendChild(confirmPanel);
}
use of org.zkoss.zul.Borderlayout in project adempiere by adempiere.
the class InvoiceHistory method jbInit.
/**
* Ststic Init
*/
void jbInit() throws Exception {
label.setText("Label");
Tabs tabs = new Tabs();
tabbox.appendChild(tabs);
Tabpanels tabpanels = new Tabpanels();
tabbox.appendChild(tabpanels);
tabs.appendChild(new Tab(Msg.getMsg(Env.getCtx(), "PriceHistory")));
tabs.appendChild(new Tab(Msg.getMsg(Env.getCtx(), "OrderPriceHistory")));
tabs.appendChild(new Tab(Msg.translate(Env.getCtx(), "QtyReserved")));
tabs.appendChild(new Tab(Msg.translate(Env.getCtx(), "QtyOrdered")));
tabs.appendChild(new Tab(Msg.getMsg(Env.getCtx(), "QtyUnconfirmed")));
if (m_M_Product_ID != 0)
tabs.appendChild(new Tab(Msg.getMsg(Env.getCtx(), "ATP")));
pricePane.setHeight("100%");
pricePane.appendChild(m_tablePrice);
tabpanels.appendChild(pricePane);
orderPricePane.setHeight("100%");
orderPricePane.appendChild(m_tableOrderPrice);
tabpanels.appendChild(orderPricePane);
reservedPane.setHeight("100%");
reservedPane.appendChild(m_tableReserved);
tabpanels.appendChild(reservedPane);
orderedPane.setHeight("100%");
orderedPane.appendChild(m_tableOrdered);
tabpanels.appendChild(orderedPane);
unconfirmedPane.setHeight("100%");
unconfirmedPane.appendChild(m_tableUnconfirmed);
tabpanels.appendChild(unconfirmedPane);
if (m_M_Product_ID != 0) {
atpPane.setHeight("100%");
atpPane.appendChild(m_tableAtp);
tabpanels.appendChild(atpPane);
}
tabbox.setSelectedIndex(0);
tabbox.addEventListener(Events.ON_SELECT, this);
confirmPanel.addActionListener(this);
Borderlayout borderlayout = new Borderlayout();
borderlayout.setWidth("100%");
borderlayout.setHeight("100%");
borderlayout.setStyle("border: none; position: relative");
this.appendChild(borderlayout);
North north = new North();
north.setStyle("border: none");
borderlayout.appendChild(north);
north.appendChild(label);
Center center = new Center();
center.setStyle("border: none");
center.setAutoscroll(true);
center.setHflex("true");
center.setVflex("true");
borderlayout.appendChild(center);
center.appendChild(tabbox);
South south = new South();
south.setStyle("border: none");
borderlayout.appendChild(south);
south.appendChild(confirmPanel);
}
use of org.zkoss.zul.Borderlayout in project adempiere by adempiere.
the class WCreateFromRMAUI method zkInit.
// dynInit
/**
* Init ZK
* @throws Exception
*/
protected void zkInit() throws Exception {
bPartnerLabel.setText(Msg.getElement(Env.getCtx(), "C_BPartner_ID"));
Borderlayout parameterLayout = new Borderlayout();
parameterLayout.setHeight("120px");
parameterLayout.setWidth("100%");
Panel parameterPanel = v_CreateFromPanel.getParameterPanel();
parameterPanel.appendChild(parameterLayout);
Grid parameterStdLayout = GridFactory.newGridLayout();
Panel parameterStdPanel = new Panel();
parameterStdPanel.appendChild(parameterStdLayout);
Center center = new Center();
parameterLayout.appendChild(center);
center.appendChild(parameterStdPanel);
Rows rows = (Rows) parameterStdLayout.newRows();
Row row = rows.newRow();
row.appendChild(bPartnerLabel.rightAlign());
if (bPartnerField != null)
row.appendChild(bPartnerField.getComponent());
// Add to Main
v_CreateFromPanel.setWidth("100%");
v_CreateFromPanel.setHeight("100%");
v_Container.appendChild(v_CreateFromPanel);
}
Aggregations