use of org.adempiere.webui.component.Row in project adempiere by adempiere.
the class WScanBarUI method createConfirmPanel.
/**
* Create Confirmation Panel with OK Button.
*/
public void createConfirmPanel() {
Rows rows = new Rows();
Row row = new Row();
confirmPanel.addActionListener(this);
row.appendChild(confirmPanel);
rows.appendChild(row);
gridConfirm.appendChild(rows);
return;
}
use of org.adempiere.webui.component.Row in project adempiere by adempiere.
the class WExpressReceiptScanBarUI method createConfirmPanel.
/**
* Create Confirmation Panel with OK Button.
*/
public void createConfirmPanel() {
Rows rows = new Rows();
Row row = new Row();
m_pnlConfirm.addActionListener(this);
row.appendChild(m_pnlConfirm);
rows.appendChild(row);
m_grdConfirm.appendChild(rows);
return;
}
use of org.adempiere.webui.component.Row in project adempiere by adempiere.
the class FindWindow method addSelectionColumn.
// setValues
/**
* Add Selection Column to first Tab
* @param mField field
**/
public void addSelectionColumn(GridField mField) {
log.config(mField.getHeader());
int displayLength = mField.getDisplayLength();
if (displayLength <= 0 || displayLength > FIELDLENGTH)
mField.setDisplayLength(FIELDLENGTH);
else
displayLength = 0;
// Editor
WEditor editor = null;
Label label = null;
if (mField.isRangeLookup()) {
Hbox box = new Hbox();
editor = WebEditorFactory.getEditor(mField, false);
label = editor.getLabel();
editor.setMandatory(false);
editor.setReadWrite(true);
editor.dynamicDisplay();
Component fieldLabel = editor.getComponent();
box.appendChild(editor.getComponent());
rangeFirstEditor.add(mField.getColumnName());
// The Editor
WEditor toRangeEditor = WebEditorFactory.getEditor(mField, false);
// New Field value to be updated to editor
toRangeEditor.setMandatory(false);
toRangeEditor.setReadWrite(true);
toRangeEditor.dynamicDisplay();
//
m_sEditors2.add(toRangeEditor);
Label separator = new Label(" - ");
box.appendChild(separator);
Component fieldLabel1 = toRangeEditor.getComponent();
box.appendChild(toRangeEditor.getComponent());
if (// set it back
displayLength > 0)
mField.setDisplayLength(displayLength);
//
if (isTwoColumns) {
if (!isPair)
panel = new Row();
} else
panel = new Row();
panel.appendChild(LayoutUtils.makeRightAlign(label));
panel.appendChild(box);
contentSimpleRows.appendChild(panel);
fieldLabel.addEventListener(Events.ON_OK, this);
fieldLabel1.addEventListener(Events.ON_OK, this);
} else {
editor = WebEditorFactory.getEditor(mField, false);
label = editor.getLabel();
editor.setMandatory(false);
editor.setReadWrite(true);
editor.dynamicDisplay();
Component fieldLabel = editor.getComponent();
if (// set it back
displayLength > 0)
mField.setDisplayLength(displayLength);
//
if (isTwoColumns) {
if (!isPair)
panel = new Row();
} else
panel = new Row();
panel.appendChild(LayoutUtils.makeRightAlign(label));
panel.appendChild(fieldLabel);
contentSimpleRows.appendChild(panel);
fieldLabel.addEventListener(Events.ON_OK, this);
m_sEditors2.add(null);
}
m_sEditors.add(editor);
}
use of org.adempiere.webui.component.Row in project adempiere by adempiere.
the class FindWindow method initSimple.
/**
* initialise lookup record tab
* @throws IOException
*
**/
private void initSimple() throws IOException {
lblDocumentNo = new Label();
lblDocumentNo.setValue(Msg.translate(Env.getCtx(), "DocumentNo").replaceAll("&", ""));
lblDescription = new Label();
lblDescription.setValue(Msg.translate(Env.getCtx(), "Description").replaceAll("&", ""));
lblName = new Label();
lblName.setValue(Msg.translate(Env.getCtx(), "Name").replaceAll("&", ""));
lblValue = new Label();
lblValue.setValue(Msg.translate(Env.getCtx(), "Value").replaceAll("&", ""));
fieldDocumentNo = new Textbox();
fieldDocumentNo.setId("fieldDocumentNo");
fieldDocumentNo.setMaxlength(40);
fieldDescription = new Textbox();
fieldDescription.setId("fieldDescription");
fieldDescription.setMaxlength(40);
fieldName = new Textbox();
fieldName.setMaxlength(40);
fieldValue = new Textbox();
fieldValue.setMaxlength(40);
// Get button from Action
WAppsAction action = new WAppsAction(ConfirmPanel.A_NEW, null, ConfirmPanel.A_NEW);
Button btnNew = action.getButton();
btnNew.setName("btnNew");
btnNew.addEventListener(Events.ON_CLICK, this);
// Get button from Action
action = new WAppsAction(ConfirmPanel.A_OK, null, ConfirmPanel.A_OK);
Button btnOk = action.getButton();
btnOk.setName("btnOkSimple");
btnOk.addEventListener(Events.ON_CLICK, this);
// Get from action
action = new WAppsAction(ConfirmPanel.A_CANCEL, null, ConfirmPanel.A_CANCEL);
Button btnCancel = action.getButton();
btnCancel.setName("btnCancel");
btnCancel.addEventListener(Events.ON_CLICK, this);
Panel pnlButtonRight = new Panel();
// Change to Standard button order
pnlButtonRight.appendChild(btnCancel);
pnlButtonRight.appendChild(btnOk);
pnlButtonRight.setAlign("right");
pnlButtonRight.setWidth("100%");
Panel pnlButtonLeft = new Panel();
pnlButtonLeft.appendChild(btnNew);
Hbox hboxButton = new Hbox();
hboxButton.appendChild(pnlButtonLeft);
hboxButton.appendChild(pnlButtonRight);
hboxButton.setWidth("100%");
pnlDocument = new Row();
pnlDocument.setId("pnlDocument");
pnlDocument.appendChild(LayoutUtils.makeRightAlign(lblDocumentNo));
pnlDocument.appendChild(fieldDocumentNo);
pnlDescription = new Row();
pnlDescription.appendChild(LayoutUtils.makeRightAlign(lblDescription));
pnlDescription.appendChild(fieldDescription);
pnlValue = new Row();
pnlValue.appendChild(LayoutUtils.makeRightAlign(lblValue));
pnlValue.appendChild(fieldValue);
pnlName = new Row();
pnlName.appendChild(LayoutUtils.makeRightAlign(lblName));
pnlName.appendChild(fieldName);
contentSimple = new Grid();
contentSimple.setId("contentSimple");
contentSimple.setWidth("100%");
contentSimple.makeNoStrip();
contentSimpleRows = new Rows();
contentSimple.appendChild(contentSimpleRows);
contentSimpleRows.appendChild(pnlValue);
contentSimpleRows.appendChild(pnlName);
contentSimpleRows.appendChild(pnlDocument);
contentSimpleRows.appendChild(pnlDescription);
contentSimple.setVflex(true);
Borderlayout layout = new Borderlayout();
layout.setStyle("height: 100%; width: 99%; position: relative");
winLookupRecord.appendChild(layout);
Center center = new Center();
layout.appendChild(center);
center.appendChild(contentSimple);
center.setFlex(true);
South south = new South();
layout.appendChild(south);
south.appendChild(hboxButton);
winLookupRecord.setWidth("100%");
winLookupRecord.setHeight("100%");
winLookupRecord.addEventListener(Events.ON_OK, this);
}
use of org.adempiere.webui.component.Row in project adempiere by adempiere.
the class InfoPAttributePanel method dynInit.
// jbInit
/**
* Dynamic Init of the Center Panel
*/
private void dynInit() {
addAttributes();
boolean isGuarantee = true;
boolean isSerial = true;
boolean isLot = true;
if (p_M_AttributeSet_ID > 0) {
MAttributeSet as = new MAttributeSet(Env.getCtx(), p_M_AttributeSet_ID, null);
isGuarantee = as.isGuaranteeDate();
isSerial = as.isSerNo();
isLot = as.isLot();
}
//
String s = Msg.translate(Env.getCtx(), "GuaranteeDate");
guaranteeDateSelection = new Listbox();
guaranteeDateSelection.setRows(0);
guaranteeDateSelection.setMultiple(false);
guaranteeDateSelection.setMold("select");
guaranteeDateSelection.setWidth("150px");
guaranteeDateSelection.appendItem(s + " <", s + " <");
guaranteeDateSelection.appendItem(s + " =", s + " =");
guaranteeDateSelection.appendItem(s + " >", s + " >");
guaranteeDateSelection.setAttribute("zk_component_ID", "InfoPAttributePanel_guaranteeDateSelection");
initLotSelection();
// Fixed Instance Selection Fields
Row row;
Div div;
if (isSerial) {
row = new Row();
rows.appendChild(row);
div = new Div();
div.setAlign("right");
div.appendChild(serNoLabel);
row.appendChild(div);
row.appendChild(serNoField.getComponent());
serNoField.getComponent().setWidth("150px");
serNoField.getComponent().setAttribute("zk_component_ID", "InfoPAttributePanel_serNoField");
}
if (isLot) {
row = new Row();
rows.appendChild(row);
div = new Div();
div.setAlign("right");
div.appendChild(lotLabel);
row.appendChild(div);
row.appendChild(lotField.getComponent());
lotField.getComponent().setWidth("150px");
lotField.getComponent().setAttribute("zk_component_ID", "InfoPAttributePanel_lotField");
row = new Row();
rows.appendChild(row);
div = new Div();
div.setAlign("right");
div.appendChild(lotLabel2);
row.appendChild(div);
row.appendChild(lotSelection);
}
if (isGuarantee) {
row = new Row();
rows.appendChild(row);
div = new Div();
div.setAlign("right");
div.appendChild(guaranteeDateSelection);
row.appendChild(div);
row.appendChild(guaranteeDateField);
guaranteeDateField.setAttribute("zk_component_ID", "InfoPAttributePanel_guaranteeDateField");
}
}
Aggregations