use of org.adempiere.webui.component.Row in project adempiere by adempiere.
the class ProcessPanel method configColumns.
/**
* Congure columns
* @param field
* @param field_To
*/
private void configColumns(WEditor editor, WEditor editorTo) {
int maxToAdd = getColumns() * 2;
int columnsToAdd = getColumns();
// for To field
if (editorTo != null) {
columnsToAdd += 2;
}
// Verify if is new row or not
if ((cols + columnsToAdd) > maxToAdd || currentRow == null) {
cols = 0;
currentRow = new Row();
rows.appendChild(currentRow);
}
}
use of org.adempiere.webui.component.Row in project adempiere by adempiere.
the class ProcessPanel method initComponents.
/**
* Initialize components
*/
@Override
public void initComponents() {
m_separators = new ArrayList<Label>();
rows = new Rows();
//
mainPanel = new Panel();
parameterPanel = GridFactory.newGridLayout();
parameterPanel.setInnerWidth(width);
//setup columns
Columns columns = new Columns();
parameterPanel.appendChild(columns);
int colN = getColumns() * 2;
if (colN != 0) {
int percent = 100 / colN;
for (int i = 0; i < colN; i++) {
Column col = new Column();
col.setWidth((i == 0 ? ((int) percent / 2) : percent) + "%");
columns.appendChild(col);
}
}
// Add Rows
parameterPanel.appendChild(rows);
//
mainLayout = new Borderlayout();
mainLayout.setStyle("border: none; overflow: auto");
// Message Panel
if (isShowDescription()) {
messageDiv = new Div();
message = new Html();
messageDiv.appendChild(message);
messageDiv.setStyle(MESSAGE_DIV_STYLE);
messagePanel = new North();
messagePanel.appendChild(messageDiv);
messagePanel.setAutoscroll(true);
messagePanel.setStyle("border: none;");
mainLayout.appendChild(messagePanel);
}
// Parameter Panel
centerPanel = new Center();
mainLayout.appendChild(centerPanel);
centerPanel.appendChild(parameterPanel);
centerPanel.setFlex(false);
centerPanel.setStyle("border: none");
// Buttons Panel
if (isShowButtons()) {
Grid southRowPanel = GridFactory.newGridLayout();
Rows rows = southRowPanel.newRows();
Row row = rows.newRow();
Hbox hBox = new Hbox();
hBox.appendChild(lSaved);
fSavedName.addEventListener(Events.ON_CHANGE, this);
hBox.appendChild(fSavedName);
bSave.setEnabled(false);
bSave.setImage("/images/Save24.png");
bSave.setSclass("action-button");
bSave.addActionListener(this);
hBox.appendChild(bSave);
bDelete.setEnabled(false);
bDelete.setImage("/images/Delete24.png");
bDelete.setSclass("action-button");
bDelete.addActionListener(this);
hBox.appendChild(bDelete);
row.appendChild(hBox);
Panel confParaPanel = new Panel();
confParaPanel.setAlign("right");
// BR [ 300 ]
try {
// Set Ok
WAppsAction action = new WAppsAction(ConfirmPanel.A_OK, null, ConfirmPanel.A_OK);
bOK = action.getButton();
// Set to Cancel
action = new WAppsAction(ConfirmPanel.A_CANCEL, null, ConfirmPanel.A_CANCEL);
bCancel = action.getButton();
// Add Listener
bOK.addEventListener(Events.ON_CLICK, this);
bCancel.addEventListener(Events.ON_CLICK, this);
// Add to Panel
confParaPanel.appendChild(bCancel);
confParaPanel.appendChild(bOK);
} catch (Exception e) {
log.severe("Error loading Buttons " + e.getLocalizedMessage());
}
//
row.appendChild(confParaPanel);
South south = new South();
south.appendChild(southRowPanel);
// Add to Main panel
mainLayout.appendChild(south);
}
// Set Text
if (isShowDescription()) {
message.setContent(getTextMsg());
}
//
mainPanel.appendChild(mainLayout);
mainPanel.setHeight("100%");
mainPanel.setWidth("100%");
}
use of org.adempiere.webui.component.Row in project adempiere by adempiere.
the class WAllocation method zkInit.
/**
* Static Init
* @throws Exception
*/
private void zkInit() throws Exception {
//
confirmPanel = new ConfirmPanel(true);
form.appendChild(mainLayout);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
dateLabel.setText(Msg.getMsg(Env.getCtx(), "Date"));
autoWriteOff.setSelected(false);
autoWriteOff.setText(Msg.getMsg(Env.getCtx(), "AutoWriteOff", true));
autoWriteOff.setTooltiptext(Msg.getMsg(Env.getCtx(), "AutoWriteOff", false));
//
parameterPanel.appendChild(parameterLayout);
allocationPanel.appendChild(allocationLayout);
bpartnerLabel.setText(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
paymentLabel.setText(" " + Msg.translate(Env.getCtx(), "C_Payment_ID"));
invoiceLabel.setText(" " + Msg.translate(Env.getCtx(), "C_Invoice_ID"));
paymentPanel.appendChild(paymentLayout);
invoicePanel.appendChild(invoiceLayout);
invoiceInfo.setText(".");
paymentInfo.setText(".");
chargeLabel.setText(" " + Msg.translate(Env.getCtx(), "C_Charge_ID"));
differenceLabel.setText(Msg.getMsg(Env.getCtx(), "Difference"));
differenceField.setText("0");
differenceField.setStyle("text-align: right");
descriptionLabel.setText(Msg.getMsg(Env.getCtx(), "Description"));
confirmPanel.addActionListener(this);
currencyLabel.setText(Msg.translate(Env.getCtx(), "C_Currency_ID"));
multiCurrency.setText(Msg.getMsg(Env.getCtx(), "MultiCurrency"));
multiCurrency.addActionListener(this);
allocCurrencyLabel.setText(".");
organizationLabel.setText(Msg.translate(Env.getCtx(), "AD_Org_ID"));
apartLabel.setText(Msg.translate(Env.getCtx(), "APAR"));
North north = new North();
north.setStyle("border: none");
mainLayout.appendChild(north);
north.appendChild(parameterPanel);
Rows rows = null;
Row row = null;
parameterLayout.setWidth("100%");
rows = parameterLayout.newRows();
row = rows.newRow();
row.appendChild(bpartnerLabel.rightAlign());
row.appendChild(bpartnerSearch.getComponent());
row.appendChild(dateLabel.rightAlign());
row.appendChild(dateField.getComponent());
row.appendChild(organizationLabel.rightAlign());
row.appendChild(organizationPick.getComponent());
row = rows.newRow();
row.appendChild(currencyLabel.rightAlign());
row.appendChild(currencyPick.getComponent());
Div div = new Div();
div.setStyle("text-align: center");
div.appendChild(multiCurrency);
row.appendChild(div);
row.appendChild(apartLabel.rightAlign());
row.appendChild(aparPick.getComponent());
row.appendChild(new Space());
row.appendChild(new Space());
row.setSpans("1,1,2,1,1");
row = rows.newRow();
row.appendChild(new Space());
row.appendChild(autoWriteOff);
row.appendChild(new Space());
row.appendChild(new Space());
row.appendChild(new Space());
row.appendChild(new Space());
South south = new South();
south.setStyle("border: none");
mainLayout.appendChild(south);
south.appendChild(southPanel);
southPanel.appendChild(allocationPanel);
allocationPanel.appendChild(allocationLayout);
allocationLayout.setWidth("100%");
rows = allocationLayout.newRows();
row = rows.newRow();
row.appendChild(differenceLabel.rightAlign());
row.appendChild(allocCurrencyLabel.rightAlign());
row.appendChild(differenceField);
row.appendChild(new Space());
row.appendChild(chargeLabel.rightAlign());
row.appendChild(chargePick.getComponent());
row.appendChild(new Space());
row.appendChild(descriptionLabel.rightAlign());
row.appendChild(descriptionField);
row.appendChild(new Space());
row.appendChild(confirmPanel);
paymentPanel.appendChild(paymentLayout);
paymentPanel.setWidth("100%");
paymentPanel.setHeight("100%");
paymentLayout.setWidth("100%");
paymentLayout.setHeight("100%");
paymentLayout.setStyle("border: none");
invoicePanel.appendChild(invoiceLayout);
invoicePanel.setWidth("100%");
invoicePanel.setHeight("100%");
invoiceLayout.setWidth("100%");
invoiceLayout.setHeight("100%");
invoiceLayout.setStyle("border: none");
north = new North();
north.setStyle("border: none");
paymentLayout.appendChild(north);
north.appendChild(paymentLabel);
south = new South();
south.setStyle("border: none");
paymentLayout.appendChild(south);
south.appendChild(paymentInfo.rightAlign());
Center center = new Center();
paymentLayout.appendChild(center);
center.appendChild(paymentTable);
paymentTable.setWidth("99%");
paymentTable.setHeight("100%");
paymentTable.setMultiSelection(true);
center.setStyle("border: none");
north = new North();
north.setStyle("border: none");
invoiceLayout.appendChild(north);
north.appendChild(invoiceLabel);
south = new South();
south.setStyle("border: none");
invoiceLayout.appendChild(south);
south.appendChild(invoiceInfo.rightAlign());
center = new Center();
invoiceLayout.appendChild(center);
center.appendChild(invoiceTable);
invoiceTable.setWidth("99%");
invoiceTable.setHeight("99%");
invoiceTable.setMultiSelection(true);
center.setStyle("border: none");
//
center = new Center();
center.setFlex(true);
mainLayout.appendChild(center);
center.appendChild(infoPanel);
infoPanel.setStyle("border: none");
infoPanel.setWidth("100%");
infoPanel.setHeight("100%");
north = new North();
north.setStyle("border: none");
north.setHeight("49%");
infoPanel.appendChild(north);
north.appendChild(paymentPanel);
north.setSplittable(true);
center = new Center();
center.setStyle("border: none");
center.setFlex(true);
infoPanel.appendChild(center);
center.appendChild(invoicePanel);
}
use of org.adempiere.webui.component.Row in project adempiere by adempiere.
the class WCreateFromShipmentUI method zkInit.
// dynInit
/**
* Instance Data
* @throws Exception
*/
protected void zkInit() throws Exception {
boolean isRMAWindow = isRMA();
bPartnerLabel.setText(Msg.getElement(Env.getCtx(), "C_BPartner_ID"));
orderLabel.setText(Msg.getElement(Env.getCtx(), "C_Order_ID", false));
invoiceLabel.setText(Msg.getElement(Env.getCtx(), "C_Invoice_ID", false));
rmaLabel.setText(Msg.translate(Env.getCtx(), "M_RMA_ID"));
locatorLabel.setText(Msg.translate(Env.getCtx(), "M_Locator_ID"));
sameWarehouseCb.setText(Msg.getMsg(Env.getCtx(), "FromSameWarehouseOnly", true));
sameWarehouseCb.setTooltiptext(Msg.getMsg(Env.getCtx(), "FromSameWarehouseOnly", false));
upcLabel.setText(Msg.getElement(Env.getCtx(), "UPC", false));
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);
parameterStdPanel.appendChild(parameterStdLayout);
Rows rows = (Rows) parameterStdLayout.newRows();
Row row = rows.newRow();
row.appendChild(bPartnerLabel.rightAlign());
if (bPartnerField != null)
row.appendChild(bPartnerField.getComponent());
if (!isRMAWindow) {
row.appendChild(orderLabel.rightAlign());
row.appendChild(orderField);
}
row = rows.newRow();
row.appendChild(locatorLabel.rightAlign());
row.appendChild(locatorField.getComponent());
if (!isRMAWindow) {
row.appendChild(invoiceLabel.rightAlign());
row.appendChild(invoiceField);
}
row = rows.newRow();
row.appendChild(new Space());
row.appendChild(sameWarehouseCb);
row = rows.newRow();
row.appendChild(upcLabel.rightAlign());
row.appendChild(upcField.getComponent());
if (isRMAWindow) {
// Add RMA document selection to panel
row.appendChild(rmaLabel.rightAlign());
row.appendChild(rmaField);
}
// Add to Main
v_CreateFromPanel.setWidth("100%");
v_CreateFromPanel.setHeight("100%");
v_Container.appendChild(v_CreateFromPanel);
}
use of org.adempiere.webui.component.Row in project adempiere by adempiere.
the class WBOMDrop method createSelectionPanel.
// dispose
/**************************************************************************
* Create Selection Panel
* @param order
* @param invoice
* @param project
*/
private void createSelectionPanel(boolean order, boolean invoice, boolean project) {
Caption caption = new Caption(Msg.translate(Env.getCtx(), "Selection"));
// grpSelectionPanel.setWidth("100%");
grpSelectionPanel.appendChild(caption);
grpSelectionPanel.appendChild(selectionPanel);
productField.setRows(1);
productField.setMold("select");
KeyNamePair[] keyNamePair = getProducts();
for (int i = 0; i < keyNamePair.length; i++) {
productField.addItem(keyNamePair[i]);
}
Rows rows = selectionPanel.newRows();
Row boxProductQty = rows.newRow();
Label lblProduct = new Label(Msg.translate(Env.getCtx(), "M_Product_ID"));
Label lblQty = new Label(Msg.translate(Env.getCtx(), "Qty"));
productQty.setValue(new BigDecimal(1));
productField.addEventListener(Events.ON_SELECT, this);
productQty.addEventListener(Events.ON_CHANGE, this);
productField.setWidth("99%");
boxProductQty.appendChild(lblProduct.rightAlign());
boxProductQty.appendChild(productField);
boxProductQty.appendChild(lblQty.rightAlign());
boxProductQty.appendChild(productQty);
if (order) {
keyNamePair = getOrders();
orderField.setRows(1);
orderField.setMold("select");
orderField.setWidth("99%");
for (int i = 0; i < keyNamePair.length; i++) {
orderField.addItem(keyNamePair[i]);
}
Label lblOrder = new Label(Msg.translate(Env.getCtx(), "C_Order_ID"));
Row boxOrder = rows.newRow();
orderField.addEventListener(Events.ON_CLICK, this);
boxOrder.appendChild(lblOrder.rightAlign());
boxOrder.appendChild(orderField);
boxOrder.appendChild(new Space());
boxOrder.appendChild(new Space());
}
if (invoice) {
invoiceField.setRows(1);
invoiceField.setMold("select");
invoiceField.setWidth("99%");
keyNamePair = getInvoices();
for (int i = 0; i < keyNamePair.length; i++) {
invoiceField.addItem(keyNamePair[i]);
}
Label lblInvoice = new Label(Msg.translate(Env.getCtx(), "C_Invoice_ID"));
Row boxInvoices = rows.newRow();
invoiceField.addEventListener(Events.ON_SELECT, this);
boxInvoices.appendChild(lblInvoice.rightAlign());
boxInvoices.appendChild(invoiceField);
boxInvoices.appendChild(new Space());
boxInvoices.appendChild(new Space());
}
if (project) {
projectField.setRows(1);
projectField.setMold("select");
projectField.setWidth("99%");
keyNamePair = getProjects();
for (int i = 0; i < keyNamePair.length; i++) {
projectField.addItem(keyNamePair[i]);
}
Label lblProject = new Label(Msg.translate(Env.getCtx(), "C_Project_ID"));
Row boxProject = rows.newRow();
projectField.addEventListener(Events.ON_SELECT, this);
boxProject.appendChild(lblProject.rightAlign());
boxProject.appendChild(projectField);
boxProject.appendChild(new Space());
boxProject.appendChild(new Space());
}
// Enabled in ActionPerformed
confirmPanel.setEnabled("Ok", false);
}
Aggregations