use of org.adempiere.pos.WPOSTextField in project adempiere by adempiere.
the class WQueryBPartner method init.
/**
* Set up Panel
*/
protected void init() {
setTitle(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
Panel panel = new Panel();
setVisible(true);
Panel mainPanel = new Panel();
Grid bPartnerLayout = GridFactory.newGridLayout();
Groupbox groupPanel = new Groupbox();
Caption v_TitleBorder = new Caption(Msg.getMsg(ctx, "Query"));
// Set title window
this.setClosable(true);
// add listener on 'ENTER' key
addEventListener(Events.ON_OK, this);
appendChild(panel);
// North
northPanel = new Panel();
mainPanel.appendChild(mainLayout);
mainPanel.setStyle("width: 100%; height: 100%; padding: 0; margin: 0");
mainLayout.setHeight("100%");
mainLayout.setWidth("100%");
Center center = new Center();
//
North north = new North();
north.setStyle("border: none");
mainLayout.appendChild(north);
north.appendChild(groupPanel);
groupPanel.appendChild(v_TitleBorder);
groupPanel.appendChild(bPartnerLayout);
appendChild(mainPanel);
bPartnerLayout.setWidth("100%");
Rows rows = null;
Row row = null;
rows = bPartnerLayout.newRows();
row = rows.newRow();
Label labelValue = new Label(Msg.translate(ctx, "Value"));
row.appendChild(labelValue.rightAlign());
labelValue.setStyle(WPOS.FONTSIZESMALL);
fieldValue = new WPOSTextField(null, posPanel.getKeyboard());
row.appendChild(fieldValue);
fieldValue.setWidth("120px");
fieldValue.addEventListener(this);
fieldValue.setStyle(WPOS.FONTSIZESMALL);
Label labelTaxID = new Label(Msg.translate(ctx, "TaxID"));
row.appendChild(labelTaxID.rightAlign());
labelValue.setStyle(WPOS.FONTSIZESMALL);
fieldTaxID = new WPOSTextField(null, posPanel.getKeyboard());
row.appendChild(fieldTaxID);
fieldTaxID.setWidth("120px");
fieldTaxID.addEventListener(this);
fieldTaxID.setStyle(WPOS.FONTSIZESMALL);
Label labelContact = new Label(Msg.translate(ctx, "Contact"));
row.appendChild(labelContact.rightAlign());
labelContact.setStyle(WPOS.FONTSIZESMALL);
fieldContact = new WPOSTextField(null, posPanel.getKeyboard());
row.appendChild(fieldContact);
fieldContact.setWidth("120px");
fieldContact.addEventListener(this);
fieldContact.setStyle(WPOS.FONTSIZESMALL);
Label labelPhone = new Label(Msg.translate(ctx, "Phone"));
row.appendChild(labelPhone.rightAlign());
labelPhone.setStyle(WPOS.FONTSIZESMALL);
fieldPhone = new WPOSTextField(null, posPanel.getKeyboard());
row.appendChild(fieldPhone);
fieldPhone.setWidth("120px");
fieldPhone.addEventListener(this);
fieldPhone.setStyle(WPOS.FONTSIZESMALL);
// New Line
row = rows.newRow();
Label labelName = new Label(Msg.translate(ctx, "Name"));
row.appendChild(labelName.rightAlign());
labelName.setStyle(WPOS.FONTSIZESMALL);
fieldName = new WPOSTextField(null, posPanel.getKeyboard());
row.appendChild(fieldName);
fieldName.addEventListener(this);
fieldName.setWidth("120px");
fieldName.setStyle(WPOS.FONTSIZESMALL);
Label labelName2 = new Label(Msg.translate(ctx, "Name2"));
row.appendChild(labelName2.rightAlign());
labelName2.setStyle(WPOS.FONTSIZESMALL);
fieldName2 = new WPOSTextField(null, posPanel.getKeyboard());
row.appendChild(fieldName2);
fieldName2.addEventListener(this);
fieldName2.setWidth("120px");
fieldName2.setStyle(WPOS.FONTSIZESMALL);
//
Label labelEmail = new Label(Msg.translate(ctx, "Email"));
row.appendChild(labelEmail.rightAlign());
labelEmail.setStyle(WPOS.FONTSIZESMALL);
fieldEmail = new WPOSTextField(null, posPanel.getKeyboard());
row.appendChild(fieldEmail);
fieldEmail.addEventListener(this);
fieldEmail.setWidth("120px");
fieldEmail.setStyle(WPOS.FONTSIZESMALL);
//
Label labelCity = new Label(Msg.translate(ctx, "City"));
row.appendChild(labelCity.rightAlign());
labelCity.setStyle(WPOS.FONTSIZESMALL);
fieldCity = new WPOSTextField(null, posPanel.getKeyboard());
fieldCity.setWidth("120px");
row.appendChild(fieldCity);
fieldCity.addEventListener("onFocus", this);
fieldCity.setStyle(WPOS.FONTSIZESMALL);
posTable = ListboxFactory.newDataTable();
posTable.prepareTable(columnInfos, "C_Order", "C_POS_ID = " + posPanel.getC_POS_ID(), false, "C_Order");
center = new Center();
center.setStyle("border: none");
posTable.setWidth("100%");
posTable.setHeight("99%");
posTable.addActionListener(this);
center.appendChild(posTable);
mainLayout.appendChild(center);
posTable.setClass("Table-OrderLine");
posTable.autoSize();
posTable.addEventListener(Events.ON_DOUBLE_CLICK, this);
addNewAction();
}
use of org.adempiere.pos.WPOSTextField in project adempiere by adempiere.
the class WQueryDocType method init.
/**
* Set up Panel
*/
protected void init() {
setTitle(Msg.translate(Env.getCtx(), "C_DocType_ID"));
Panel panel = new Panel();
setVisible(true);
Panel mainPanel = new Panel();
Grid productLayout = GridFactory.newGridLayout();
Groupbox groupPanel = new Groupbox();
Caption v_TitleBorder = new Caption(Msg.getMsg(ctx, QUERY));
// Set title window
this.setClosable(true);
// add listener on 'ENTER' key
addEventListener(Events.ON_OK, this);
appendChild(panel);
northPanel = new Panel();
mainPanel.appendChild(mainLayout);
groupPanel.appendChild(v_TitleBorder);
mainPanel.setStyle("width: 100%; height: 100%; padding: 0; margin: 0");
mainLayout.setHeight("100%");
mainLayout.setWidth("100%");
Center center = new Center();
//
North north = new North();
north.setStyle("border: none");
mainLayout.appendChild(north);
north.appendChild(groupPanel);
groupPanel.appendChild(productLayout);
appendChild(mainPanel);
productLayout.setWidth("100%");
Rows rows = null;
Row row = null;
rows = productLayout.newRows();
row = rows.newRow();
Label labelName = new Label(Msg.translate(ctx, NAME));
labelName.setStyle(WPOS.FONTSIZESMALL);
row.setHeight("60px");
row.appendChild(labelName.rightAlign());
fieldName = new WPOSTextField("", posPanel.getKeyboard());
row.appendChild(fieldName);
fieldName.addEventListener(this);
fieldName.setWidth("120px");
fieldName.setStyle(WPOS.FONTSIZESMALL);
Label labelDescription = new Label(Msg.translate(ctx, DESCRIPTION));
labelDescription.setStyle(WPOS.FONTSIZESMALL);
row.setHeight("60px");
row.appendChild(labelDescription.rightAlign());
fieldDescription = new WPOSTextField(null, posPanel.getKeyboard());
row.appendChild(fieldDescription);
fieldDescription.addEventListener(this);
fieldDescription.setWidth("120px");
fieldDescription.setStyle(WPOS.FONTSIZESMALL);
// Center
posTable = ListboxFactory.newDataTable();
posTable.prepareTable(columnInfos, "C_DocType", null, false, "C_DocType");
enableButtons();
center = new Center();
center.setStyle("border: none");
posTable.setWidth("100%");
posTable.setHeight("99%");
posTable.addActionListener(this);
center.appendChild(posTable);
mainLayout.appendChild(center);
posTable.setClass("Table-OrderLine");
posTable.autoSize();
posTable.addEventListener(Events.ON_DOUBLE_CLICK, this);
refresh();
}
use of org.adempiere.pos.WPOSTextField in project adempiere by adempiere.
the class WQueryOrderHistory method init.
/**
* Set up Panel
*/
protected void init() {
setTitle(Msg.translate(Env.getCtx(), "C_Order_ID"));
Panel panel = new Panel();
setVisible(true);
Panel mainPanel = new Panel();
Grid productLayout = GridFactory.newGridLayout();
Groupbox groupPanel = new Groupbox();
Caption v_TitleBorder = new Caption(Msg.getMsg(ctx, QUERY));
// Set title window
this.setClosable(true);
// add listener on 'ENTER' key
addEventListener(Events.ON_OK, this);
appendChild(panel);
northPanel = new Panel();
mainPanel.appendChild(mainLayout);
groupPanel.appendChild(v_TitleBorder);
mainPanel.setStyle("width: 100%; height: 100%; padding: 0; margin: 0");
mainLayout.setHeight("100%");
mainLayout.setWidth("100%");
Center center = new Center();
//
North north = new North();
north.setStyle("border: none");
mainLayout.appendChild(north);
north.appendChild(groupPanel);
groupPanel.appendChild(productLayout);
appendChild(mainPanel);
productLayout.setWidth("100%");
Rows rows = null;
Row row = null;
rows = productLayout.newRows();
row = rows.newRow();
Label labelDocumentNo = new Label(Msg.translate(ctx, DOCUMENTNO));
labelDocumentNo.setStyle(WPOS.FONTSIZESMALL);
row.setHeight("20px");
row.appendChild(labelDocumentNo.rightAlign());
fieldDocumentNo = new WPOSTextField("", posPanel.getKeyboard());
row.appendChild(fieldDocumentNo);
fieldDocumentNo.addEventListener(this);
fieldDocumentNo.setWidth("120px");
fieldDocumentNo.setStyle(WPOS.FONTSIZESMALL);
//
Label labelDateFrom = new Label(Msg.translate(ctx, DATEORDEREDFROM));
labelDateFrom.setStyle(WPOS.FONTSIZESMALL);
row.appendChild(labelDateFrom.rightAlign());
fieldDateFrom = new Datebox();
fieldDateFrom.setValue(Env.getContextAsDate(Env.getCtx(), "#Date"));
fieldDateFrom.addEventListener("onBlur", this);
fieldDateFrom.setStyle(WPOS.FONTSIZESMALL);
row.appendChild(fieldDateFrom);
fieldAllowDate = new Checkbox();
fieldAllowDate.setLabel(Msg.translate(ctx, DATE));
fieldAllowDate.setSelected(false);
row.appendChild(fieldAllowDate);
fieldAllowDate.addActionListener(this);
fieldAllowDate.setStyle(WPOS.FONTSIZESMALL);
row = rows.newRow();
Label labelBPartner = new Label(Msg.translate(ctx, BPARTNERID));
labelBPartner.setStyle(WPOS.FONTSIZESMALL);
row.setHeight("60px");
row.appendChild(labelBPartner.rightAlign());
fieldBPartner = new WPOSTextField("", posPanel.getKeyboard());
row.appendChild(fieldBPartner);
fieldBPartner.addEventListener(this);
fieldBPartner.setWidth("120px");
fieldBPartner.setStyle(WPOS.FONTSIZESMALL);
Label labelDateTo = new Label(Msg.translate(ctx, DATEORDEREDTO));
labelDateTo.setStyle(WPOS.FONTSIZESMALL);
row.appendChild(labelDateTo.rightAlign());
fieldDateTo = new Datebox();
fieldDateTo.setValue(Env.getContextAsDate(Env.getCtx(), "#Date"));
fieldDateTo.addEventListener("onBlur", this);
fieldDateTo.setStyle(WPOS.FONTSIZESMALL);
row.appendChild(fieldDateTo);
fieldProcessed = new Checkbox();
fieldProcessed.setLabel(Msg.translate(ctx, PROCESSED));
fieldProcessed.setSelected(false);
row.appendChild(fieldProcessed);
fieldProcessed.addActionListener(this);
fieldProcessed.setStyle(WPOS.FONTSIZESMALL);
// Center
posTable = ListboxFactory.newDataTable();
posTable.prepareTable(columnInfos, "C_Order", "C_POS_ID = " + posPanel.getC_POS_ID(), false, "C_Order");
enableButtons();
center = new Center();
center.setStyle("border: none");
posTable.setWidth("100%");
posTable.setHeight("99%");
posTable.addActionListener(this);
center.appendChild(posTable);
mainLayout.appendChild(center);
posTable.setClass("Table-OrderLine");
posTable.autoSize();
posTable.addEventListener(Events.ON_DOUBLE_CLICK, this);
refresh();
}
Aggregations