Search in sources :

Example 1 with VLocation

use of org.compiere.grid.ed.VLocation 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());
}
Also used : POSTextField(org.adempiere.pos.POSTextField) MLocationLookup(org.compiere.model.MLocationLookup) Dimension(java.awt.Dimension) VLocation(org.compiere.grid.ed.VLocation)

Aggregations

Dimension (java.awt.Dimension)1 POSTextField (org.adempiere.pos.POSTextField)1 VLocation (org.compiere.grid.ed.VLocation)1 MLocationLookup (org.compiere.model.MLocationLookup)1