use of org.adempiere.webui.component.Rows in project adempiere by adempiere.
the class WRecordAccessDialog method jbInit.
// dynInit
/**
* Static Init
* @throws Exception
*/
private void jbInit() throws Exception {
bDelete.setImage(ServletFns.resolveThemeURL("~./images/Delete16.png"));
bDelete.setTooltiptext(Msg.getMsg(Env.getCtx(), "Delete"));
bNew.setImage(ServletFns.resolveThemeURL("~./images/New16.png"));
bNew.setTooltiptext(Msg.getMsg(Env.getCtx(), "New"));
bUp.setImage(ServletFns.resolveThemeURL("~./images/Previous16.png"));
bUp.setTooltiptext(Msg.getMsg(Env.getCtx(), "Previous"));
bDown.setImage(ServletFns.resolveThemeURL("~./images/Next16.png"));
bDown.setTooltiptext(Msg.getMsg(Env.getCtx(), "Next"));
cbActive.setText(Msg.translate(Env.getCtx(), "IsActive"));
cbExclude.setText(Msg.translate(Env.getCtx(), "IsExclude"));
cbReadOnly.setText(Msg.translate(Env.getCtx(), "IsReadOnly"));
cbDependent.setText(Msg.translate(Env.getCtx(), "IsDependentEntities"));
Grid grid = GridFactory.newGridLayout();
this.appendChild(grid);
Rows rows = new Rows();
grid.appendChild(rows);
Row row = new Row();
rows.appendChild(row);
row.appendChild(bUp);
row.appendChild(new Label());
row.appendChild(new Label());
row.appendChild(new Label());
row.appendChild(new Label());
row.appendChild(new Label());
row.appendChild(bNew);
row = new Row();
rows.appendChild(row);
row.appendChild(roleLabel);
row.appendChild(roleField);
row.appendChild(cbActive);
row.appendChild(cbExclude);
row.appendChild(cbReadOnly);
row.appendChild(cbDependent);
row.appendChild(bDelete);
row = new Row();
rows.appendChild(row);
row.appendChild(bDown);
row.appendChild(new Label());
row.appendChild(new Label());
row.appendChild(new Label());
row.appendChild(new Label());
row.appendChild(new Label());
row.appendChild(rowNoLabel);
row = new Row();
rows.appendChild(row);
row.setSpans("7");
Div div = new Div();
div.setAlign("right");
div.appendChild(confirmPanel);
row.appendChild(div);
bUp.addEventListener(Events.ON_CLICK, this);
bDown.addEventListener(Events.ON_CLICK, this);
bDelete.addEventListener(Events.ON_CLICK, this);
bNew.addEventListener(Events.ON_CLICK, this);
confirmPanel.addActionListener(this);
}
use of org.adempiere.webui.component.Rows in project adempiere by adempiere.
the class WHRActionNotice method zkInit.
/**
* Static Init
*
* @throws Exception
*/
private void zkInit() throws Exception {
form.setWidth("99%");
form.setHeight("100%");
form.setStyle("position: absolute; padding: 0; margin: 0");
form.appendChild(mainLayout);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
mainLayout.setStyle("position: absolute");
// Process
labelProcess.setText(Msg.translate(Env.getCtx(), "HR_Process_ID"));
fieldProcess.addEventListener(Events.ON_SELECT, this);
// BPartner
labelBPartner.setText(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
fieldEmployee.addEventListener(Events.ON_SELECT, this);
// Date
labelValidFrom.setText(Msg.translate(Env.getCtx(), "Date"));
fieldValidFrom.addValueChangeListener(this);
// Concept
labelConcept.setText(Msg.translate(Env.getCtx(), "HR_Concept_ID"));
fieldConcept.addEventListener(Events.ON_SELECT, this);
// Concept's
labelColumnType.setText(Msg.translate(Env.getCtx(), "ColumnType"));
labelDescription.setText(Msg.translate(Env.getCtx(), "Description"));
fieldDate.setVisible(false);
fieldDate.addValueChangeListener(this);
fieldQty.setVisible(false);
fieldQty.addValueChangeListener(this);
fieldAmount.setVisible(false);
fieldAmount.addValueChangeListener(this);
fieldText.setVisible(false);
fieldText.addValueChangeListener(this);
fieldDescription.addValueChangeListener(this);
fieldColumnType.setReadWrite(false);
ConfirmPanel panel = new ConfirmPanel(false, false, false, false, false, false, false);
bOk = panel.createButton(ConfirmPanel.A_OK);
bOk.addActionListener(this);
North north = new North();
north.setStyle("border: none");
mainLayout.appendChild(north);
north.appendChild(parameterPanel);
Rows rows = new Rows();
rows.setParent(parameterPanel);
Row row = rows.newRow();
row.appendChild(labelProcess.rightAlign());
row.appendChild(fieldProcess);
fieldProcess.setWidth("100%");
row.appendChild(labelBPartner.rightAlign());
row.appendChild(fieldEmployee);
fieldEmployee.setWidth("100%");
row = rows.newRow();
row.appendChild(labelValidFrom.rightAlign());
row.appendChild(fieldValidFrom.getComponent());
row.appendChild(labelConcept.rightAlign());
row.appendChild(fieldConcept);
fieldConcept.setWidth("100%");
row = rows.newRow();
// Add div for Qty-Amount-Date-Text-RuleEngine
Div div = new Div();
row.appendChild(labelColumnType.rightAlign());
row.appendChild(fieldColumnType.getComponent());
row.appendChild(new Space());
div.appendChild(fieldDate.getComponent());
div.appendChild(fieldQty.getComponent());
div.appendChild(fieldAmount.getComponent());
div.appendChild(fieldText.getComponent());
div.appendChild(fieldTextLookup);
row.appendChild(div);
fieldDate.fillHorizontal();
fieldQty.fillHorizontal();
fieldAmount.fillHorizontal();
fieldText.fillHorizontal();
fieldValidFrom.fillHorizontal();
fieldTextLookup.setWidth("100%");
// End Yamel Senih
row = rows.newRow();
row.appendChild(labelDescription.rightAlign());
row.appendChild(fieldDescription.getComponent());
row.appendChild(new Space());
row.appendChild(bOk);
//
Center center = new Center();
center.setFlex(true);
center.appendChild(miniTable);
mainLayout.appendChild(center);
miniTable.setVflex(true);
miniTable.setFixedLayout(true);
miniTable.setWidth("99%");
miniTable.setHeight("99%");
configureMiniTable();
}
use of org.adempiere.webui.component.Rows in project adempiere by adempiere.
the class WExpressReceiptScanBarUI method createProductPanel.
/**
* Creates the New Charge panel.
*
* The New Charge panel is used to specify the name and key of an account
* and whether or not the account is a charge account.
*/
private void createProductPanel() {
// load Locator
locatorLabel.setValue(Msg.translate(Env.getCtx(), "M_Locator_ID"));
locatorLabel.setMandatory(true);
MLocatorLookup locator = new MLocatorLookup(Env.getCtx(), form.getWindowNo());
locator.setOnly_Warehouse_ID(getDefaultWarehouseId());
locatorField = new WLocatorEditor("M_Locator_ID", true, false, true, locator, form.getWindowNo());
locatorField.setMandatory(true);
locatorField.setValue(Env.getContextAsInt(Env.getCtx(), form.getWindowNo(), "M_Locator_ID"));
locatorField.addValueChangeListener(this);
upcLabel.setText(Msg.getElement(Env.getCtx(), "Value", false));
upcLabel.setMandatory(true);
upcField = new WStringEditor("UPC", false, false, true, 10, 30, null, null);
upcField.getComponent().addEventListener(Events.ON_CHANGE, this);
qtyCountLabel.setText(Msg.getElement(Env.getCtx(), "QtyCount", false));
qtyCountField.getComponent().addEventListener(Events.ON_CHANGE, this);
lotLabel.setText(Msg.getElement(Env.getCtx(), "Lot", false));
lotField = new WStringEditor("Lot", false, false, true, 10, 30, null, null);
lotField.getComponent().addEventListener(Events.ON_CHANGE, this);
serNoLabel.setText(Msg.getElement(Env.getCtx(), "SerNo", false));
serNoField = new WStringEditor("SerNo", false, false, true, 10, 30, null, null);
serNoField.getComponent().addEventListener(Events.ON_CHANGE, this);
productValueLabel.setValue(Msg.translate(Env.getCtx(), "Value"));
productLabel.setValue(Msg.translate(Env.getCtx(), "Name"));
UOMLabel.setValue(Msg.translate(Env.getCtx(), "C_UOM_ID"));
Rows rows = new Rows();
newGrid.appendChild(rows);
Row row = new Row();
rows.appendChild(row);
row.setSpans("3");
row.appendChild(new Separator());
row = new Row();
rows.appendChild(row);
row.appendChild(locatorLabel);
row.appendChild(locatorField.getComponent());
row = new Row();
rows.appendChild(row);
row.setSpans("3");
row.appendChild(new Separator());
row = new Row();
rows.appendChild(row);
row.appendChild(upcLabel);
row.appendChild(upcField.getComponent());
row.appendChild(qtyCountLabel);
row.appendChild(qtyCountField.getComponent());
row = new Row();
rows.appendChild(row);
row.setSpans("3");
row.appendChild(new Separator());
row = new Row();
rows.appendChild(row);
row.appendChild(serNoLabel);
row.appendChild(serNoField.getComponent());
row = new Row();
rows.appendChild(row);
row.setSpans("3");
row.appendChild(new Separator());
row = new Row();
rows.appendChild(row);
row.appendChild(lotLabel);
row.appendChild(lotField.getComponent());
row = new Row();
rows.appendChild(row);
row.setSpans("3");
row.appendChild(new Separator());
//Product Info
productValueField.setReadonly(true);
row = new Row();
rows.appendChild(row);
row.appendChild(productValueLabel);
row.appendChild(productValueField);
productField.setReadonly(true);
row.appendChild(productLabel);
row.appendChild(productField);
UOMField.setReadonly(true);
row.appendChild(UOMLabel);
row.appendChild(UOMField);
row = new Row();
rows.appendChild(row);
row.setSpans("3");
row.appendChild(new Separator());
row = new Row();
rows.appendChild(row);
row.setSpans("3");
row.appendChild(new Separator());
row = new Row();
rows.appendChild(row);
row.setSpans("3");
row.appendChild(new Separator());
upcField.setVisible(false);
qtyCountField.setVisible(false);
lotField.setVisible(false);
serNoField.setVisible(false);
return;
}
use of org.adempiere.webui.component.Rows 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.adempiere.webui.component.Rows 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);
}
Aggregations