use of org.compiere.apps.ALayoutConstraint in project adempiere by adempiere.
the class InfoPayment method statInit.
/**
* Static Setup - add fields to parameterPanel
*/
private void statInit() {
lDocumentNo.setLabelFor(fDocumentNo);
fDocumentNo.setBackground(AdempierePLAF.getInfoBackground());
fDocumentNo.addActionListener(this);
fcheckReceipt.setSelected(true);
fcheckReceipt.setActionCommand("OnlyReceipt");
fcheckReceipt.addActionListener(this);
fcheckPayment.setSelected(false);
fcheckPayment.setActionCommand("OnlyPayment");
fcheckPayment.addActionListener(this);
//
fBankAccount_ID = new VLookup("C_BankAccount_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MPayment.Table_Name, MPayment.COLUMNNAME_C_BankAccount_ID), DisplayType.TableDir));
lBankAccount_ID.setLabelFor(fBankAccount_ID);
fBankAccount_ID.setBackground(AdempierePLAF.getInfoBackground());
fBankAccount_ID.addActionListener(this);
fBPartner_ID = new VLookup("C_BPartner_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MPayment.Table_Name, MPayment.COLUMNNAME_C_BPartner_ID), DisplayType.Search));
lBPartner_ID.setLabelFor(fBPartner_ID);
fBPartner_ID.setBackground(AdempierePLAF.getInfoBackground());
fBPartner_ID.addActionListener(this);
//
lDateFrom.setLabelFor(fDateFrom);
fDateFrom.setBackground(AdempierePLAF.getInfoBackground());
fDateFrom.setToolTipText(Msg.translate(Env.getCtx(), "DateFrom"));
fDateFrom.addActionListener(this);
lDateTo.setLabelFor(fDateTo);
fDateTo.setBackground(AdempierePLAF.getInfoBackground());
fDateTo.setToolTipText(Msg.translate(Env.getCtx(), "DateTo"));
fDateTo.addActionListener(this);
lAmtFrom.setLabelFor(fAmtFrom);
fAmtFrom.setBackground(AdempierePLAF.getInfoBackground());
fAmtFrom.setToolTipText(Msg.translate(Env.getCtx(), "AmtFrom"));
// Not sure why this is necessary? The border is not visible otherwise.
fAmtFrom.setBorder(fDateFrom.getBorder());
fAmtFrom.addActionListener(this);
lAmtTo.setLabelFor(fAmtTo);
fAmtTo.setBackground(AdempierePLAF.getInfoBackground());
fAmtTo.setToolTipText(Msg.translate(Env.getCtx(), "AmtTo"));
// Not sure why this is necessary? The border is not visible otherwise.
fAmtTo.setBorder(fDateFrom.getBorder());
fAmtTo.addActionListener(this);
//
CPanel amtPanel = new CPanel();
CPanel datePanel = new CPanel();
amtPanel.setLayout(new ALayout(0, 0, true));
amtPanel.add(fAmtFrom, new ALayoutConstraint(0, 0));
amtPanel.add(lAmtTo, null);
amtPanel.add(fAmtTo, null);
datePanel.setLayout(new ALayout(0, 0, true));
datePanel.add(fDateFrom, new ALayoutConstraint(0, 0));
datePanel.add(lDateTo, null);
datePanel.add(fDateTo, null);
//
// First Row
p_criteriaGrid.add(lDocumentNo, new ALayoutConstraint(0, 0));
p_criteriaGrid.add(fDocumentNo, null);
p_criteriaGrid.add(lBPartner_ID, null);
p_criteriaGrid.add(fBPartner_ID, null);
p_criteriaGrid.add(fcheckReceipt, new ALayoutConstraint(0, 5));
// 2nd Row
p_criteriaGrid.add(lBankAccount_ID, new ALayoutConstraint(1, 0));
p_criteriaGrid.add(fBankAccount_ID);
p_criteriaGrid.add(lDateFrom, null);
p_criteriaGrid.add(datePanel, null);
p_criteriaGrid.add(fcheckPayment, new ALayoutConstraint(1, 5));
// 3rd Row
p_criteriaGrid.add(lAmtFrom, new ALayoutConstraint(2, 2));
p_criteriaGrid.add(amtPanel, null);
}
use of org.compiere.apps.ALayoutConstraint in project adempiere by adempiere.
the class InfoOrder method statInit.
/**
* Static Setup - add fields to parameterPanel
*/
private void statInit() {
lDocumentNo.setLabelFor(fDocumentNo);
fDocumentNo.setBackground(AdempierePLAF.getInfoBackground());
fDocumentNo.addActionListener(this);
lDescription.setLabelFor(fDescription);
fDescription.setBackground(AdempierePLAF.getInfoBackground());
fDescription.addActionListener(this);
lPOReference.setLabelFor(fPOReference);
fPOReference.setBackground(AdempierePLAF.getInfoBackground());
fPOReference.addActionListener(this);
fIsSOTrx.setSelected(!"N".equals(Env.getContext(Env.getCtx(), p_WindowNo, "IsSOTrx")));
fIsSOTrx.addActionListener(this);
fIsDelivered.setSelected(false);
fIsDelivered.addActionListener(this);
//
fBPartner_ID = new VLookup("C_BPartner_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MOrder.Table_Name, MOrder.COLUMNNAME_C_BPartner_ID), DisplayType.Search));
lBPartner_ID.setLabelFor(fBPartner_ID);
fBPartner_ID.setBackground(AdempierePLAF.getInfoBackground());
fBPartner_ID.addActionListener(this);
//
lDateFrom.setLabelFor(fDateFrom);
fDateFrom.setBackground(AdempierePLAF.getInfoBackground());
fDateFrom.setToolTipText(Msg.translate(Env.getCtx(), "DateFrom"));
fDateFrom.addActionListener(this);
lDateTo.setLabelFor(fDateTo);
fDateTo.setBackground(AdempierePLAF.getInfoBackground());
fDateTo.setToolTipText(Msg.translate(Env.getCtx(), "DateTo"));
fDateTo.addActionListener(this);
lAmtFrom.setLabelFor(fAmtFrom);
fAmtFrom.setBackground(AdempierePLAF.getInfoBackground());
fAmtFrom.setToolTipText(Msg.translate(Env.getCtx(), "AmtFrom"));
fAmtFrom.addActionListener(this);
// Not sure why this is necessary? The border is not visible otherwise.
fAmtFrom.setBorder(fDateFrom.getBorder());
lAmtTo.setLabelFor(fAmtTo);
fAmtTo.setBackground(AdempierePLAF.getInfoBackground());
fAmtTo.setToolTipText(Msg.translate(Env.getCtx(), "AmtTo"));
fAmtTo.addActionListener(this);
// Not sure why this is necessary? The border is not visible otherwise.
fAmtTo.setBorder(fDateFrom.getBorder());
//
CPanel amtPanel = new CPanel();
CPanel datePanel = new CPanel();
amtPanel.setLayout(new ALayout(0, 0, true));
amtPanel.add(fAmtFrom, new ALayoutConstraint(0, 0));
amtPanel.add(lAmtTo, null);
amtPanel.add(fAmtTo, null);
datePanel.setLayout(new ALayout(0, 0, true));
datePanel.add(fDateFrom, new ALayoutConstraint(0, 0));
datePanel.add(lDateTo, null);
datePanel.add(fDateTo, null);
// First Row
p_criteriaGrid.add(lDocumentNo, new ALayoutConstraint(0, 0));
p_criteriaGrid.add(fDocumentNo, null);
p_criteriaGrid.add(lDescription, null);
p_criteriaGrid.add(fDescription, null);
p_criteriaGrid.add(fIsSOTrx, new ALayoutConstraint(0, 4));
// 2nd Row
p_criteriaGrid.add(lBPartner_ID, new ALayoutConstraint(1, 0));
p_criteriaGrid.add(fBPartner_ID, null);
p_criteriaGrid.add(lDateFrom, null);
p_criteriaGrid.add(datePanel, null);
p_criteriaGrid.add(fIsDelivered, new ALayoutConstraint(1, 4));
// 3rd Row
p_criteriaGrid.add(lPOReference, new ALayoutConstraint(2, 0));
p_criteriaGrid.add(fPOReference, null);
p_criteriaGrid.add(lAmtFrom, null);
p_criteriaGrid.add(amtPanel, null);
}
use of org.compiere.apps.ALayoutConstraint in project adempiere by adempiere.
the class KeyStoreDialog method jbInit.
/**
* Static Layout
*/
private void jbInit() {
CPanel panel = new CPanel(new ALayout());
panel.add(lCN, new ALayoutConstraint(0, 0));
panel.add(fCN, null);
panel.add(lOU, new ALayoutConstraint(1, 0));
panel.add(fOU, null);
panel.add(lO, new ALayoutConstraint(2, 0));
panel.add(fO, null);
panel.add(lL, new ALayoutConstraint(3, 0));
panel.add(fL, null);
panel.add(lS, new ALayoutConstraint(4, 0));
panel.add(fS, null);
panel.add(lC, new ALayoutConstraint(5, 0));
panel.add(fC, null);
panel.setPreferredSize(new Dimension(400, 150));
//
getContentPane().setLayout(new BorderLayout());
getContentPane().add(panel, BorderLayout.CENTER);
//
CPanel confirmPanel = new CPanel(new FlowLayout(FlowLayout.RIGHT));
confirmPanel.add(bCancel);
confirmPanel.add(bOK);
getContentPane().add(confirmPanel, BorderLayout.SOUTH);
//
bCancel.addActionListener(this);
bOK.addActionListener(this);
}
use of org.compiere.apps.ALayoutConstraint in project adempiere by adempiere.
the class InfoBPartner method statInit.
/**
* Static Setup - add fields to parameterPanel
*/
private void statInit() {
labelValue.setText(Msg.getMsg(Env.getCtx(), "Value"));
fieldValue.setBackground(AdempierePLAF.getInfoBackground());
fieldValue.addActionListener(this);
labelName.setText(Msg.getMsg(Env.getCtx(), "Name"));
fieldName.setBackground(AdempierePLAF.getInfoBackground());
fieldName.addActionListener(this);
labelContact.setText(Msg.getMsg(Env.getCtx(), "Contact"));
fieldContact.setBackground(AdempierePLAF.getInfoBackground());
fieldContact.addActionListener(this);
labelEMail.setText(Msg.getMsg(Env.getCtx(), "EMail"));
fieldEMail.setBackground(AdempierePLAF.getInfoBackground());
fieldEMail.addActionListener(this);
labelPostal.setText(Msg.getMsg(Env.getCtx(), "Postal"));
fieldPostal.setBackground(AdempierePLAF.getInfoBackground());
fieldPostal.addActionListener(this);
labelPhone.setText(Msg.translate(Env.getCtx(), "Phone"));
fieldPhone.setBackground(AdempierePLAF.getInfoBackground());
fieldPhone.addActionListener(this);
checkAND.setText(Msg.getMsg(Env.getCtx(), "SearchAND"));
checkAND.setToolTipText(Msg.getMsg(Env.getCtx(), "SearchANDInfo"));
checkAND.setSelected(true);
checkAND.addActionListener(this);
if (m_isSOTrx)
checkCustomer.setText(Msg.getMsg(Env.getCtx(), "OnlyCustomers"));
else
checkCustomer.setText(Msg.getMsg(Env.getCtx(), "OnlyVendors"));
checkCustomer.setSelected(m_isSOMatch);
checkCustomer.addActionListener(this);
//
p_criteriaGrid.add(labelValue, new ALayoutConstraint(0, 0));
p_criteriaGrid.add(fieldValue, null);
p_criteriaGrid.add(labelContact, null);
p_criteriaGrid.add(fieldContact, null);
p_criteriaGrid.add(labelPhone, null);
p_criteriaGrid.add(fieldPhone, null);
p_criteriaGrid.add(checkCustomer, null);
//
p_criteriaGrid.add(labelName, new ALayoutConstraint(1, 0));
p_criteriaGrid.add(fieldName, null);
p_criteriaGrid.add(labelEMail, null);
p_criteriaGrid.add(fieldEMail, null);
p_criteriaGrid.add(labelPostal, null);
p_criteriaGrid.add(fieldPostal, null);
p_criteriaGrid.add(checkAND, null);
// Contact Tab
ColumnInfo[] s_layoutContact = new ColumnInfo[] { new ColumnInfo(" ", "AD_User_ID", IDColumn.class), new ColumnInfo(Msg.translate(Env.getCtx(), "C_Greeting_ID"), "(SELECT g.Greeting from C_Greeting g WHERE g.C_Greeting_ID = AD_User.C_Greeting_ID)", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Name"), "Name", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Title"), "Title", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "C_Location_ID"), "(SELECT a.Name from C_BPartner_Location a WHERE AD_User.C_BPartner_Location_ID=a.C_BPartner_Location_ID)", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone"), "Phone", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone2"), "Phone2", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Fax"), "Fax", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "EMail"), "EMail", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "LastContact"), "LastContact", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "LastResult"), "LastResult", String.class) };
// From Clause
String s_sqlFrom = "AD_User";
// Where Clause
String s_sqlWhere = "C_BPartner_ID = ? and IsActive = 'Y'";
m_sqlContact = contactTbl.prepareTable(s_layoutContact, s_sqlFrom, s_sqlWhere, false, "AD_User");
contactTbl.setPreferredSize(new Dimension(INFO_WIDTH, SCREEN_HEIGHT > 600 ? 255 : 110));
contactTbl.setRowSelectionAllowed(true);
contactTbl.setMultiSelection(false);
contactTbl.addMouseListener(this);
contactTbl.setShowTotals(false);
contactTbl.autoSize();
contactTbl.setBackground(new ColorUIResource(251, 248, 241));
contactTbl.setForeground(new ColorUIResource(251, 0, 0));
// Location Tab
ColumnInfo[] s_layoutAddress = new ColumnInfo[] { new ColumnInfo(" ", "l.C_BPartner_Location_ID", IDColumn.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Name"), "l.Name", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone"), "l.Phone", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone2"), "l.Phone2", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Fax"), "l.Fax", String.class), // Replaced with parsed value
new ColumnInfo(Msg.translate(Env.getCtx(), "Address"), "a.Address1", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsShipTo"), "l.IsShipTo", Boolean.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsBillTo"), "l.IsBillTo", Boolean.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsRemitTo"), "l.IsRemitTo", Boolean.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsPayFrom"), "l.IsPayFrom", Boolean.class) };
ADDRESS_INDEX = 5;
/** From Clause */
String s_locationFrom = "C_BPartner_Location l" + " LEFT OUTER JOIN C_Location a ON (l.C_Location_ID=a.C_Location_ID)";
/** Where Clause */
String s_locationWhere = "l.C_BPartner_ID = ? and l.IsActive = 'Y'";
m_sqlAddress = addressTbl.prepareTable(s_layoutAddress, s_locationFrom, s_locationWhere, false, "l");
addressTbl.setPreferredSize(new Dimension(INFO_WIDTH, SCREEN_HEIGHT > 600 ? 255 : 110));
addressTbl.setRowSelectionAllowed(true);
addressTbl.setMultiSelection(false);
addressTbl.addMouseListener(this);
addressTbl.setShowTotals(false);
addressTbl.autoSize();
addressTbl.setBackground(new ColorUIResource(251, 248, 241));
addressTbl.setForeground(new ColorUIResource(251, 0, 0));
jTab.addTab(Msg.translate(Env.getCtx(), "Contact"), new JScrollPane(contactTbl));
jTab.addTab(Msg.translate(Env.getCtx(), "Location"), new JScrollPane(addressTbl));
jTab.setPreferredSize(new Dimension(INFO_WIDTH, SCREEN_HEIGHT > 600 ? 250 : 105));
tablePanel.setPreferredSize(new Dimension(INFO_WIDTH, SCREEN_HEIGHT > 600 ? 255 : 110));
tablePanel.setLayout(new BorderLayout());
tablePanel.add(jTab, BorderLayout.CENTER);
// Details Panel
p_detailTaskPane.setTitle(Msg.translate(Env.getCtx(), "ContactAndAddress"));
p_detailTaskPane.add(tablePanel, BorderLayout.CENTER);
p_detailTaskPane.setVisible(true);
}
use of org.compiere.apps.ALayoutConstraint in project adempiere by adempiere.
the class InfoCashLine method statInit.
/**
* Static Setup - add fields to parameterPanel
*/
private void statInit() {
// 5241 - C_Cash.C_Cash_ID
fCash_ID = new VLookup("C_Cash_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, p_TabNo, MColumn.getColumn_ID(MCash.Table_Name, MCash.COLUMNNAME_C_Cash_ID), DisplayType.Search));
lCash_ID.setLabelFor(fCash_ID);
fCash_ID.setBackground(AdempierePLAF.getInfoBackground());
fCash_ID.addActionListener(this);
;
// 5249 - C_Cash.C_CashBook_ID
fCashBook_ID = new VLookup("C_CashBook_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MCash.Table_Name, MCash.COLUMNNAME_C_CashBook_ID), DisplayType.TableDir));
lCashBook_ID.setLabelFor(fCashBook_ID);
fCashBook_ID.setBackground(AdempierePLAF.getInfoBackground());
fCashBook_ID.addActionListener(this);
// 5354 - C_CashLine.C_Invoice_ID
fInvoice_ID = new VLookup("C_Invoice_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MCashLine.Table_Name, MCashLine.COLUMNNAME_C_Invoice_ID), DisplayType.Search));
lInvoice_ID.setLabelFor(fInvoice_ID);
fInvoice_ID.setBackground(AdempierePLAF.getInfoBackground());
fInvoice_ID.addActionListener(this);
// 54090 - C_CashLine.C_Payment_ID
fPayment_ID = new VLookup("C_Payment_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MCashLine.Table_Name, MCashLine.COLUMNNAME_C_Payment_ID), DisplayType.Search));
lPayment_ID.setLabelFor(fPayment_ID);
fPayment_ID.setBackground(AdempierePLAF.getInfoBackground());
fPayment_ID.addActionListener(this);
// 5295 - C_CashLine.C_BankAccount_ID
fBankAccount_ID = new VLookup("C_BankAccount_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MCashLine.Table_Name, MCashLine.COLUMNNAME_C_BankAccount_ID), DisplayType.TableDir));
lBankAccount_ID.setLabelFor(fBankAccount_ID);
fBankAccount_ID.setBackground(AdempierePLAF.getInfoBackground());
fBankAccount_ID.addActionListener(this);
// 5296 - C_CashLine.C_Charge_ID
fCharge_ID = new VLookup(MCashLine.COLUMNNAME_C_Charge_ID, false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MCashLine.Table_Name, MCashLine.COLUMNNAME_C_Charge_ID), DisplayType.TableDir));
fCharge_ID.setBackground(AdempierePLAF.getInfoBackground());
fCharge_ID.addActionListener(this);
//
lDateFrom.setLabelFor(fDateFrom);
fDateFrom.setBackground(AdempierePLAF.getInfoBackground());
fDateFrom.setToolTipText(Msg.translate(Env.getCtx(), "DateFrom"));
fDateFrom.addActionListener(this);
lDateTo.setLabelFor(fDateTo);
fDateTo.setBackground(AdempierePLAF.getInfoBackground());
fDateTo.setToolTipText(Msg.translate(Env.getCtx(), "DateTo"));
fDateTo.addActionListener(this);
lAmtFrom.setLabelFor(fAmtFrom);
fAmtFrom.setBackground(AdempierePLAF.getInfoBackground());
fAmtFrom.setToolTipText(Msg.translate(Env.getCtx(), "AmtFrom"));
fAmtFrom.addActionListener(this);
lAmtTo.setLabelFor(fAmtTo);
fAmtTo.setBackground(AdempierePLAF.getInfoBackground());
fAmtTo.setToolTipText(Msg.translate(Env.getCtx(), "AmtTo"));
fAmtTo.addActionListener(this);
//
cbAbsolute.setText(Msg.translate(Env.getCtx(), "AbsoluteAmt"));
cbAbsolute.setName("AbsoluteAmt");
cbAbsolute.setToolTipText(Msg.getMsg(Env.getCtx(), "AbsoluteAmt"));
cbAbsolute.setSelected(false);
cbAbsolute.addActionListener(this);
//
CPanel amtPanel = new CPanel();
CPanel datePanel = new CPanel();
amtPanel.setLayout(new ALayout(0, 0, true));
amtPanel.add(fAmtFrom, new ALayoutConstraint(0, 0));
amtPanel.add(lAmtTo, null);
amtPanel.add(fAmtTo, null);
datePanel.setLayout(new ALayout(0, 0, true));
datePanel.add(fDateFrom, new ALayoutConstraint(0, 0));
datePanel.add(lDateTo, null);
datePanel.add(fDateTo, null);
// First Row
p_criteriaGrid.setLayout(new ALayout());
p_criteriaGrid.add(lCashBook_ID, new ALayoutConstraint(0, 0));
p_criteriaGrid.add(fCashBook_ID, null);
p_criteriaGrid.add(lCash_ID, null);
p_criteriaGrid.add(fCash_ID, null);
// 2nd Row
p_criteriaGrid.add(lInvoice_ID, new ALayoutConstraint(1, 0));
p_criteriaGrid.add(fInvoice_ID, null);
p_criteriaGrid.add(lPayment_ID, null);
p_criteriaGrid.add(fPayment_ID, null);
// 3rd Row
p_criteriaGrid.add(lBankAccount_ID, new ALayoutConstraint(2, 0));
p_criteriaGrid.add(fBankAccount_ID, null);
p_criteriaGrid.add(lDateFrom, null);
p_criteriaGrid.add(datePanel, null);
// 4th Row
p_criteriaGrid.add(lCharge_ID, new ALayoutConstraint(3, 0));
p_criteriaGrid.add(fCharge_ID, null);
p_criteriaGrid.add(lAmtFrom, null);
p_criteriaGrid.add(amtPanel, null);
p_criteriaGrid.add(cbAbsolute, new ALayoutConstraint(3, 5));
}
Aggregations