use of org.adempiere.webui.component.Row in project adempiere by adempiere.
the class WScanBarUI 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(Env.getContextAsInt(Env.getCtx(), "#M_Warehouse_ID"));
locatorField = new WLocatorEditor("M_Locator_ID", true, false, true, locator, form.getWindowNo());
locatorField.setMandatory(true);
locatorField.addValueChangeListener(this);
locatorToLabel.setValue(Msg.translate(Env.getCtx(), "M_LocatorTo_ID"));
locatorToLabel.setVisible(false);
MLocatorLookup locatorTo = new MLocatorLookup(Env.getCtx(), form.getWindowNo());
locatorToField = new WLocatorEditor("M_LocatorTo_ID", true, false, true, locatorTo, form.getWindowNo());
//locatorField.setMandatory(true);
locatorToField.addValueChangeListener(this);
locatorToField.setVisible(false);
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.appendChild(locatorToLabel);
row.appendChild(locatorToField.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.Row in project adempiere by adempiere.
the class WPOSInfoProduct method init.
@Override
protected void init() {
parameterPanel = new Panel();
Groupbox groupPanel = new Groupbox();
infoProductLayout = GridFactory.newGridLayout();
Caption v_TitleBorder = new Caption(Msg.getMsg(Env.getCtx(), "InfoProduct"));
groupPanel.appendChild(v_TitleBorder);
groupPanel.appendChild(infoProductLayout);
labelLayout = GridFactory.newGridLayout();
buttonPanel = new Panel();
buttonPanel.appendChild(labelLayout);
parameterPanel.appendChild(groupPanel);
buttonPanel.setStyle("border: none; width:99%;moz-box-shadow: 0 0 0px #888;-webkit-box-shadow: 0 0 0px #888;box-shadow: 0 0 0px #888;");
labelLayout.setStyle("border: none; width:100%;moz-box-shadow: 0 0 0px #888;-webkit-box-shadow: 0 0 0px #888;box-shadow: 0 0 0px #888;");
infoProductLayout.setStyle("border: none; width:100%; moz-box-shadow: 0 0 0px #888;-webkit-box-shadow: 0 0 0px #888;box-shadow: 0 0 0px #888;");
parameterPanel.setStyle("border: none; width:99%;");
Rows rows = null;
Row row = null;
rows = infoProductLayout.newRows();
row = rows.newRow();
// For Image
buttonImage = new Panel();
row.appendChild(buttonImage);
buttonImage.setWidth("138px");
buttonImage.setHeight("130px");
row.appendChild(buttonPanel);
rows = labelLayout.newRows();
row = rows.newRow();
// For Value
labelValue = new Label();
labelValue.setStyle(WPOS.FONTSIZEMEDIUM + " font-weight:bold");
// Add
row.appendChild(labelValue);
row = rows.newRow();
// For Price List
labelPriceName = new Label();
labelPriceName.setStyle(WPOS.FONTSIZEMEDIUM + " font-weight:bold");
// Add
row.appendChild(labelPriceName);
labelPrice = new Label();
labelPrice.setStyle(WPOS.FONTSIZELARGE + "font-weight:bold");
// Add
row.appendChild(labelPrice);
labelPriceList = new Label();
labelPriceList.setStyle(WPOS.FONTSIZELARGE + "font-weight:bold");
// Add
row.appendChild(labelPriceList);
row = rows.newRow();
// For Name
labelName = new Label();
labelName.setStyle(WPOS.FONTSIZEMEDIUM + " font-weight:bold");
// Add
row.appendChild(labelName);
row = rows.newRow();
// For UOM
labelUOMSymbol = new Label(Msg.getElement(Env.getCtx(), "C_UOM_ID"));
labelUOMSymbol.setStyle(WPOS.FONTSIZEMEDIUM + " font-weight:bold");
// Add
row.appendChild(labelUOMSymbol);
row = rows.newRow();
// For Category
labelProductCategory = new Label(Msg.getElement(Env.getCtx(), "M_Product_Category_ID"));
labelProductCategory.setStyle(WPOS.FONTSIZEMEDIUM + " font-weight:bold");
// Add
row.appendChild(labelProductCategory);
row = rows.newRow();
// For Category
labelProductTax = new Label(Msg.getElement(Env.getCtx(), "C_TaxCategory_ID"));
labelProductTax.setStyle(WPOS.FONTSIZEMEDIUM + " font-weight:bold");
// Add
row.appendChild(labelProductTax);
row = rows.newRow();
// For Description
labelDescription = new Label();
labelDescription.setHeight("19px");
labelDescription.setClass("label-description");
// Add
row.appendChild(labelDescription);
initialValue();
}
use of org.adempiere.webui.component.Row in project adempiere by adempiere.
the class WCollectDetail method loadDebitPanel.
/**
* Load Debit Panel
* @return void
*/
public void loadDebitPanel() {
v_DebitPanel = GridFactory.newGridLayout();
v_DebitPanel.setWidth("100%");
v_DebitPanel.setHeight("95px");
Rows rows = v_DebitPanel.newRows();
Row row = rows.newRow();
row.setSpans("1,2");
fDebitRoutingNo = new WPOSTextField(Msg.translate(p_ctx, "RoutingNo"), keyboard);
fDebitRoutingNo.setStyle(HEIGHT + WIDTH + FONT_SIZE);
row.appendChild(fDebitRoutingNo);
fDebitRoutingNo.addEventListener("onFocus", this);
fDebitCVC = new WPOSTextField(Msg.translate(p_ctx, "A_Country"), keyboard);
row.appendChild(fDebitCVC);
fDebitCVC.setStyle(HEIGHT + WIDTH + FONT_SIZE);
fDebitCVC.addEventListener("onFocus", this);
fDebitCountry = new WPOSTextField(Msg.translate(p_ctx, "R_CVV2Match"), keyboard);
row = rows.newRow();
row.appendChild(fDebitCountry);
fDebitCountry.addEventListener("onFocus", this);
fDebitCountry.setStyle(HEIGHT + WIDTH + FONT_SIZE);
}
use of org.adempiere.webui.component.Row in project adempiere by adempiere.
the class WCollectDetail method loadStandardPanel.
/**
* Load standard Panel
* @return void
*/
public void loadStandardPanel() {
v_StandarPanel = GridFactory.newGridLayout();
v_StandarPanel.setWidth("100%");
v_StandarPanel.setHeight("75px");
groupPanel.appendChild(v_StandarPanel);
Rows rows = null;
Row row = null;
rows = v_StandarPanel.newRows();
row = rows.newRow();
// Payment type selection
//C_Payment_v.TenderType
int AD_Column_ID = 8416;
MLookup lookup = MLookupFactory.get(Env.getCtx(), 0, 0, AD_Column_ID, DisplayType.List);
ArrayList<Object> types = lookup.getData(true, false, true, true);
bMinus = v_Parent.createButtonAction("Minus", KeyStroke.getKeyStroke(KeyEvent.VK_F3, Event.F3));
bMinus.addActionListener(this);
row.setHeight("55px");
fTenderType = ListboxFactory.newDropdownListbox();
fTenderType.addActionListener(this);
int pos = 0;
// default to cash payment
for (Object obj : types) {
if (obj instanceof ValueNamePair) {
ValueNamePair key = (ValueNamePair) obj;
fTenderType.appendItem(key.getName(), key);
if (key.getID().equals(getTenderType())) {
fTenderType.setSelectedIndex(pos);
}
pos++;
}
}
fTenderType.setStyle(HEIGHT + WIDTH + FONT_SIZE);
row.appendChild(fTenderType);
Label lPayAmt = new Label(Msg.translate(p_ctx, "PayAmt"));
lPayAmt.setWidth("225px");
fPayAmt = new POSNumberBox(false);
row.appendChild(fPayAmt);
row.appendChild(bMinus);
fPayAmt.setValue(new BigDecimal("0.0"));
fPayAmt.setStyle("text-align:right;" + HEIGHT + WIDTH + FONT_SIZE);
fPayAmt.addEventListener("onBlur", this);
fPayAmt.addEventListener(Events.ON_CHANGING, this);
fPayAmt.addEventListener(Events.ON_CHANGE, this);
}
use of org.adempiere.webui.component.Row in project adempiere by adempiere.
the class WCollectDetail method loadCreditMemoPanel.
/**
* Load for Credit Memo
* @return void
*/
private void loadCreditMemoPanel() {
v_CreditMemoPanel = GridFactory.newGridLayout();
v_CreditMemoPanel.setWidth("100%");
v_CreditMemoPanel.setHeight("95px");
Rows rows = v_CreditMemoPanel.newRows();
Row row = rows.newRow();
row.setSpans("1,2");
// Add label credit note
lCreditMemo = new Label(Msg.translate(Env.getCtx(), "CreditMemo") + ":");
lCreditMemo.setStyle(HEIGHT + WIDTH + FONT_SIZE);
row.appendChild(lCreditMemo);
MLookup lookup = getCreditMemoLockup(v_Parent.getC_BPartner_ID());
ArrayList<Object> types = lookup.getData(false, false, true, true);
row = rows.newRow();
fCreditMemo = ListboxFactory.newDropdownListbox();
row.appendChild(fCreditMemo);
fCreditMemo.setStyle(HEIGHT + WIDTH + FONT_SIZE);
fCreditMemo.setValue(Msg.translate(p_ctx, "CreditMemoType"));
fCreditMemo.addActionListener(this);
/**
* Load Credit Notes
*/
for (Object obj : types) {
if (obj instanceof KeyNamePair) {
KeyNamePair key = (KeyNamePair) obj;
fCreditMemo.appendItem(key.getName(), key.getID());
}
}
}
Aggregations