use of org.compiere.model.MLocationLookup in project adempiere by adempiere.
the class WPOSBPartner method initBPartner.
/**
* Dynamic Init
*/
private void initBPartner() {
// Value
fValue.addEventListener(this);
fValue.setWidth("97%");
fValue.setStyle(WPOS.FONTSIZESMALL);
createLine(fValue, "Value", true);
// Name
fName.addEventListener(this);
fName.setWidth("97%");
fName.setStyle(WPOS.FONTSIZESMALL);
createLine(fName, "Name", false);
// Name2
fName2.addEventListener(this);
fName2.setWidth("97%");
fName2.setStyle(WPOS.FONTSIZESMALL);
createLine(fName2, "Name2", false);
// Contact
fContact.addEventListener(this);
fContact.setWidth("97%");
fContact.setStyle(WPOS.FONTSIZESMALL);
createLine(fContact, "Contact", true);
// Email
fEMail.addEventListener(this);
fEMail.setWidth("97%");
fEMail.setStyle(WPOS.FONTSIZESMALL);
createLine(fEMail, "EMail", false);
// Location
boolean ro = m_readOnly;
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 WLocationEditor("C_Location_ID", false, ro, true, new MLocationLookup(Env.getCtx(), m_WindowNo));
fAddress.addValueChangeListener(this);
fAddress.setValue(null);
createLine(fAddress.getComponent(), "C_Location_ID", true);
// Phone
fPhone.addEventListener(this);
fPhone.setWidth("97%");
fPhone.setStyle(WPOS.FONTSIZESMALL);
createLine(fPhone, "Phone", true);
// Phone2
fPhone2.addEventListener(this);
fPhone2.setWidth("97%");
fPhone2.setStyle(WPOS.FONTSIZESMALL);
createLine(fPhone2, "Phone2", false);
}
use of org.compiere.model.MLocationLookup in project adempiere by adempiere.
the class VBPartner method initBPartner.
// jbInit
/**
* Dynamic Init
*/
private void initBPartner() {
// Get Data
m_greeting = fillGreeting();
// 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 VString("Value", true, false, true, 30, 60, "", null);
fValue.addActionListener(this);
createLine(fValue, "Value", true);
// Greeting Business Partner
fGreetingBP = new JComboBox(m_greeting);
createLine(fGreetingBP, "Greeting", false);
// Name
fName = new VString("Name", true, false, true, 30, 60, "", null);
fName.addActionListener(this);
createLine(fName, "Name", false).setFontBold(true);
// Name2
fName2 = new VString("Name2", false, false, true, 30, 60, "", null);
createLine(fName2, "Name2", false);
// TaxId
fTaxId = new VString("TaxID", false, false, true, 30, 60, "", null);
createLine(fTaxId, "TaxID", false);
// Contact
fContact = new VString("Contact", false, false, true, 30, 60, "", null);
createLine(fContact, "Contact", true).setFontBold(true);
// Greeting Contact
fGreetingC = new JComboBox(m_greeting);
createLine(fGreetingC, "Greeting", false);
// Title
fTitle = new VString("Title", false, false, true, 30, 60, "", null);
createLine(fTitle, "Title", false);
// Email
fEMail = new VString("EMail", false, false, true, 30, 40, "", null);
createLine(fEMail, "EMail", false);
// Location
boolean ro = m_readOnly;
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(), m_WindowNo));
fAddress.setValue(null);
createLine(fAddress, "C_Location_ID", true).setFontBold(true);
// Phone
fPhone = new VString("Phone", false, false, true, 30, 40, "", null);
createLine(fPhone, "Phone", true);
// Phone2
fPhone2 = new VString("Phone2", false, false, true, 30, 40, "", null);
createLine(fPhone2, "Phone2", false);
// Fax
fFax = new VString("Fax", false, false, true, 30, 40, "", null);
createLine(fFax, "Fax", false);
//
fName.setBackground(AdempierePLAF.getFieldBackground_Mandatory());
fAddress.setBackground(AdempierePLAF.getFieldBackground_Mandatory());
}
use of org.compiere.model.MLocationLookup 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.compiere.model.MLocationLookup in project adempiere by adempiere.
the class WBPartner method initBPartner.
/**
* Dynamic Init
*/
private void initBPartner() {
// Get Data
m_greeting = fillGreeting();
// Value
fValue.addEventListener(Events.ON_CHANGE, this);
createLine(fValue, "Value", true);
// Greeting Business Partner
fGreetingBP.setMold("select");
fGreetingBP.setRows(0);
for (int i = 0; i < m_greeting.length; i++) fGreetingBP.appendItem(m_greeting[i].toString(), m_greeting[i]);
createLine(fGreetingBP, "Greeting", false);
// Name
fName.addEventListener(Events.ON_CLICK, this);
createLine(fName, "Name", false);
// Name2
createLine(fName2, "Name2", false);
// TaxId
createLine(fTaxId, "TaxID", false);
// Contact
createLine(fContact, "Contact", true);
// Greeting Contact
fGreetingC.setMold("select");
fGreetingC.setRows(0);
for (int i = 0; i < m_greeting.length; i++) fGreetingC.appendItem(m_greeting[i].toString(), m_greeting[i]);
createLine(fGreetingC, "Greeting", false);
// Title
createLine(fTitle, "Title", false);
// Email
createLine(fEMail, "EMail", false);
// Location
boolean ro = m_readOnly;
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 WLocationEditor("C_Location_ID", false, ro, true, new MLocationLookup(Env.getCtx(), m_WindowNo));
fAddress.addValueChangeListener(this);
fAddress.setValue(null);
createLine(fAddress.getComponent(), "C_Location_ID", true);
// Phone
createLine(fPhone, "Phone", true);
// Phone2
createLine(fPhone2, "Phone2", false);
// Fax
createLine(fFax, "Fax", false);
}
Aggregations