use of org.adempiere.pos.POSTextField in project adempiere by adempiere.
the class VPOSBPartner method initBPartner.
// jbInit
/**
* Dynamic Init
*/
private void initBPartner() {
// Display
m_gbc.anchor = GridBagConstraints.NORTHWEST;
m_gbc.gridx = 0;
m_gbc.gridy = 0;
m_gbc.gridwidth = 1;
m_gbc.weightx = 0;
m_gbc.weighty = 0;
m_gbc.fill = GridBagConstraints.HORIZONTAL;
m_gbc.ipadx = 0;
m_gbc.ipady = 0;
m_line = 0;
// Value
fValue = new POSTextField("Value", pos.getKeyboard());
fValue.addActionListener(this);
fValue.setPreferredSize(new Dimension(300, 25));
createLine(fValue, "Value", true);
// Name
fName = new POSTextField("Name", pos.getKeyboard());
fName.addActionListener(this);
createLine(fName, "Name", false).setFontBold(true);
// Name2
fName2 = new POSTextField("Name2", pos.getKeyboard());
createLine(fName2, "Name2", false);
// Contact
fContact = new POSTextField("Contact", pos.getKeyboard());
createLine(fContact, "Contact", true).setFontBold(true);
// Email
fEMail = new POSTextField("EMail", pos.getKeyboard());
createLine(fEMail, "EMail", false);
// Location
boolean ro = isReadOnly;
if (!ro)
ro = !MRole.getDefault().canUpdate(Env.getAD_Client_ID(Env.getCtx()), Env.getAD_Org_ID(Env.getCtx()), MBPartnerLocation.Table_ID, 0, false);
if (!ro)
ro = !MRole.getDefault().canUpdate(Env.getAD_Client_ID(Env.getCtx()), Env.getAD_Org_ID(Env.getCtx()), MLocation.Table_ID, 0, false);
fAddress = new VLocation("C_Location_ID", false, ro, true, new MLocationLookup(Env.getCtx(), windowNo));
fAddress.setValue(null);
createLine(fAddress, "C_Location_ID", true).setFontBold(true);
// Phone
fPhone = new POSTextField("Phone", pos.getKeyboard());
createLine(fPhone, "Phone", true);
// Phone2
fPhone2 = new POSTextField("Phone2", pos.getKeyboard());
createLine(fPhone2, "Phone2", false);
//
fName.setBackground(AdempierePLAF.getFieldBackground_Mandatory());
fValue.setBackground(AdempierePLAF.getFieldBackground_Mandatory());
fAddress.setBackground(AdempierePLAF.getFieldBackground_Mandatory());
}
use of org.adempiere.pos.POSTextField in project adempiere by adempiere.
the class QueryBPartner method init.
/**
* Set up Panel
*/
protected void init() {
setTitle(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
// North
parameterPanel.setLayout(new MigLayout("fill", "", "[50][50][]"));
parameterPanel.setBorder(new TitledBorder(Msg.getMsg(ctx, "Query")));
CLabel labelValue = new CLabel(Msg.translate(ctx, "Value"));
parameterPanel.add(labelValue, " growy");
fieldValue = new POSTextField("", posPanel.getKeyboard());
labelValue.setLabelFor(fieldValue);
parameterPanel.add(fieldValue, "h 30, w 200");
fieldValue.addActionListener(this);
CLabel labelTaxID = new CLabel(Msg.translate(ctx, "TaxID"));
parameterPanel.add(labelTaxID, " growy");
fieldTaxID = new POSTextField("", posPanel.getKeyboard());
labelTaxID.setLabelFor(fieldTaxID);
parameterPanel.add(fieldTaxID, "h 30, w 200");
fieldTaxID.addActionListener(this);
//
CLabel labelContact = new CLabel(Msg.translate(ctx, "Contact"));
parameterPanel.add(labelContact, " growy");
fieldContact = new POSTextField("", posPanel.getKeyboard());
labelContact.setLabelFor(fieldContact);
parameterPanel.add(fieldContact, "h 30, w 200");
fieldContact.addActionListener(this);
//
CLabel labelPhone = new CLabel(Msg.translate(ctx, "Phone"));
parameterPanel.add(labelPhone, " growy");
fieldPhone = new POSTextField("", posPanel.getKeyboard());
labelPhone.setLabelFor(fieldPhone);
parameterPanel.add(fieldPhone, "h 30, w 200, wrap");
fieldPhone.addActionListener(this);
//
CLabel labelName = new CLabel(Msg.translate(ctx, "Name"));
parameterPanel.add(labelName, " growy");
fieldName = new POSTextField("", posPanel.getKeyboard());
labelName.setLabelFor(fieldName);
parameterPanel.add(fieldName, "h 30, w 200");
fieldName.addActionListener(this);
CLabel labelName2 = new CLabel(Msg.translate(ctx, "Name2"));
parameterPanel.add(labelName2, " growy");
fieldName2 = new POSTextField("", posPanel.getKeyboard());
labelName2.setLabelFor(fieldName2);
parameterPanel.add(fieldName2, "h 30, w 200");
fieldName2.addActionListener(this);
//
CLabel labelEmail = new CLabel(Msg.translate(ctx, "Email"));
parameterPanel.add(labelEmail, " growy");
fieldEmail = new POSTextField("", posPanel.getKeyboard());
labelEmail.setLabelFor(fieldEmail);
parameterPanel.add(fieldEmail, "h 30, w 200");
fieldEmail.addActionListener(this);
//
CLabel labelCity = new CLabel(Msg.translate(ctx, "City"));
parameterPanel.add(labelCity, " growy");
fieldCity = new POSTextField("", posPanel.getKeyboard());
labelCity.setLabelFor(fieldCity);
parameterPanel.add(fieldCity, "h 30, w 200");
fieldCity.addActionListener(this);
// Center
posTable.prepareTable(s_layout, sqlFrom, sqlWhere, false, "RV_BPartner");
//
posTable.growScrollbars();
SwingUtilities.invokeLater(new Runnable() {
public void run() {
fieldValue.requestFocus();
}
});
addNewAction();
}
use of org.adempiere.pos.POSTextField in project adempiere by adempiere.
the class QueryDocType method init.
/**
* Set up Panel
*/
protected void init() {
setTitle(Msg.translate(Env.getCtx(), "C_DocType_ID"));
// North
parameterPanel.setLayout(new MigLayout("fill", "", "[50][50][]"));
parameterPanel.setBorder(new TitledBorder(Msg.getMsg(ctx, "Query")));
//
CLabel lname = new CLabel(Msg.translate(ctx, "Name"));
parameterPanel.add(lname, " growy");
f_Name = new POSTextField("", posPanel.getKeyboard());
lname.setLabelFor(f_Name);
parameterPanel.add(f_Name, "h 30, w 200");
f_Name.addActionListener(this);
CLabel ldescription = new CLabel(Msg.translate(ctx, "Description"));
parameterPanel.add(ldescription, " growy");
f_Description = new POSTextField("", posPanel.getKeyboard());
lname.setLabelFor(f_Description);
parameterPanel.add(f_Description, "h 30, w 200");
f_Description.addActionListener(this);
// Center
posTable.prepareTable(s_layout, s_sqlFrom, s_sqlWhere, false, "C_DocType");
//
posTable.growScrollbars();
SwingUtilities.invokeLater(new Runnable() {
public void run() {
f_Name.requestFocus();
}
});
}
use of org.adempiere.pos.POSTextField in project adempiere by adempiere.
the class QueryOrderHistory method init.
/**
* Set up Panel
*/
@Override
protected void init() {
setTitle(Msg.translate(Env.getCtx(), "C_Order_ID"));
// North
parameterPanel.setLayout(new MigLayout("fill", "", "[50][50][]"));
parameterPanel.setBorder(new TitledBorder(Msg.getMsg(ctx, QUERY)));
CLabel labelDocument = new CLabel(Msg.translate(ctx, DOCUMENTNO));
parameterPanel.add(labelDocument, " growy");
fieldDocumentNo = new POSTextField("", posPanel.getKeyboard());
labelDocument.setLabelFor(fieldDocumentNo);
parameterPanel.add(fieldDocumentNo, "h 30, w 200");
fieldDocumentNo.addActionListener(this);
//
CLabel labelDateFrom = new CLabel(Msg.translate(ctx, DATEORDEREDFROM));
parameterPanel.add(labelDateFrom, "growy");
fieldDateFrom = new VDate();
fieldDateFrom.setValue(Env.getContextAsDate(Env.getCtx(), "#Date"));
labelDateFrom.setLabelFor(fieldDateFrom);
parameterPanel.add(fieldDateFrom, "h 30, w 200");
fieldDateFrom.addVetoableChangeListener(this);
fieldAllowDate = new CCheckBox(Msg.translate(ctx, DATE));
fieldAllowDate.setSelected(false);
fieldAllowDate.addActionListener(this);
parameterPanel.add(fieldAllowDate, "wrap");
//
posTable.prepareTable(columnInfos, "C_Order", "C_POS_ID = " + posPanel.getC_POS_ID(), false, "C_Order");
posTable.growScrollbars();
// BPartner
CLabel labelBPartner = new CLabel(Msg.translate(ctx, BPARTNERID));
parameterPanel.add(labelBPartner, "growy");
fieldBPartner = new POSTextField("", posPanel.getKeyboard());
labelBPartner.setLabelFor(fieldBPartner);
parameterPanel.add(fieldBPartner, "h 30, w 200");
fieldBPartner.addActionListener(this);
// Date To
CLabel labelDateTo = new CLabel(Msg.translate(ctx, DATEORDEREDTO));
parameterPanel.add(labelDateTo, "growy");
fieldDateTo = new VDate();
fieldDateTo.setValue(Env.getContextAsDate(Env.getCtx(), "#Date"));
labelDateTo.setLabelFor(fieldDateTo);
parameterPanel.add(fieldDateTo, "h 30, w 200");
fieldDateTo.addVetoableChangeListener(this);
fieldProcessed = new CCheckBox(Msg.translate(ctx, PROCESSED));
fieldProcessed.setSelected(false);
fieldProcessed.addActionListener(this);
parameterPanel.add(fieldProcessed, "");
SwingUtilities.invokeLater(new Runnable() {
public void run() {
fieldDocumentNo.requestFocus();
}
});
pack();
refresh();
}
Aggregations