use of org.compiere.apps.ALayout in project adempiere by adempiere.
the class VBOMDrop method createMainPanel.
// getInvoices
/**************************************************************************
* Create Main Panel.
* Called when changing Product
*/
private void createMainPanel() {
log.config(": " + m_product);
this.removeAll();
this.setPreferredSize(null);
this.invalidate();
this.setBorder(null);
//
m_selectionList.clear();
m_productList.clear();
m_qtyList.clear();
m_buttonGroups.clear();
//
this.setLayout(new ALayout());
String title = Msg.getMsg(Env.getCtx(), "SelectProduct");
if (m_product != null && m_product.get_ID() > 0) {
title = m_product.getName();
if (m_product.getDescription() != null && m_product.getDescription().length() > 0)
this.setToolTipText(m_product.getDescription());
m_bomLine = 0;
addBOMLines(m_product, m_qty);
}
this.setBorder(new TitledBorder(title));
}
use of org.compiere.apps.ALayout in project adempiere by adempiere.
the class VMRPDetailed method statInit.
/**
* Static Setup - add fields to parameterPanel
* @throws Exception if Lookups cannot be initialized
*/
private void statInit() throws Exception {
// Resource Lookup
// Base Language
Language language = Language.getLoginLanguage();
MLookup resourceL = MLookupFactory.get(getCtx(), p_WindowNo, MColumn.getColumn_ID(MResource.Table_Name, MResource.COLUMNNAME_S_Resource_ID), DisplayType.TableDir, language, MResource.COLUMNNAME_S_Resource_ID, 0, false, MResource.Table_Name + "." + MResource.COLUMNNAME_ManufacturingResourceType + "= '" + MResource.MANUFACTURINGRESOURCETYPE_Plant + "'");
fResource_ID = new VLookup(MPPMRP.COLUMNNAME_S_Resource_ID, false, false, true, resourceL) {
private static final long serialVersionUID = 1L;
public void setValue(Object arg0) {
super.setValue(arg0);
}
;
};
lResource_ID.setLabelFor(fResource_ID);
fResource_ID.setBackground(AdempierePLAF.getInfoBackground());
// Planner Lookup
fPlanner_ID = new VLookup(MPPMRP.COLUMNNAME_Planner_ID, false, false, true, MLookupFactory.get(getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MPPProductPlanning.Table_Name, MPPMRP.COLUMNNAME_Planner_ID), DisplayType.Table)) {
private static final long serialVersionUID = 1L;
public void setValue(Object arg0) {
super.setValue(arg0);
}
;
};
lPlanner_ID.setLabelFor(fPlanner_ID);
fPlanner_ID.setBackground(AdempierePLAF.getInfoBackground());
// Wahrehouse Lookup
fWarehouse_ID = new VLookup(MPPMRP.COLUMNNAME_M_Warehouse_ID, true, false, true, MLookupFactory.get(getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MWarehouse.Table_Name, MPPMRP.COLUMNNAME_M_Warehouse_ID), DisplayType.TableDir)) {
private static final long serialVersionUID = 1L;
public void setValue(Object arg0) {
super.setValue(arg0);
}
;
};
lWarehouse_ID.setLabelFor(fWarehouse_ID);
fWarehouse_ID.setBackground(AdempierePLAF.getInfoBackground());
fMaster.setSelected(false);
fMaster.setReadWrite(false);
fMRPReq.setSelected(false);
fMRPReq.setReadWrite(false);
fCreatePlan.setSelected(false);
fCreatePlan.setReadWrite(false);
lUOM.setText(Msg.translate(getCtx(), MUOM.COLUMNNAME_C_UOM_ID));
fUOM.setBackground(AdempierePLAF.getInfoBackground());
fUOM.setReadWrite(false);
lType.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_Order_Policy));
fType.setBackground(AdempierePLAF.getInfoBackground());
fType.setReadWrite(false);
lOrderPeriod.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_Order_Period));
fOrderPeriod.setBackground(AdempierePLAF.getInfoBackground());
fOrderPeriod.setReadWrite(false);
lTimefence.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_TimeFence));
fTimefence.setBackground(AdempierePLAF.getInfoBackground());
fTimefence.setReadWrite(false);
lLeadtime.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_DeliveryTime_Promised));
fLeadtime.setBackground(AdempierePLAF.getInfoBackground());
fLeadtime.setReadWrite(false);
lMinOrd.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_Order_Min));
fMinOrd.setBackground(AdempierePLAF.getInfoBackground());
fMinOrd.setReadWrite(false);
lMaxOrd.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_Order_Max));
fMaxOrd.setBackground(AdempierePLAF.getInfoBackground());
fMaxOrd.setReadWrite(false);
lOrdMult.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_Order_Pack));
fOrdMult.setBackground(AdempierePLAF.getInfoBackground());
fOrdMult.setReadWrite(false);
lOrderQty.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_Order_Qty));
fOrderQty.setBackground(AdempierePLAF.getInfoBackground());
fOrderQty.setReadWrite(false);
lYield.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_Yield));
fYield.setBackground(AdempierePLAF.getInfoBackground());
fYield.setReadWrite(false);
lOnhand.setText(Msg.translate(getCtx(), MStorage.COLUMNNAME_QtyOnHand));
fOnhand.setBackground(AdempierePLAF.getInfoBackground());
fOnhand.setReadWrite(false);
lSafetyStock.setText(Msg.translate(getCtx(), MPPProductPlanning.COLUMNNAME_SafetyStock));
fSafetyStock.setBackground(AdempierePLAF.getInfoBackground());
fSafetyStock.setReadWrite(false);
lReserved.setText(Msg.translate(getCtx(), MStorage.COLUMNNAME_QtyReserved));
fReserved.setBackground(AdempierePLAF.getInfoBackground());
fReserved.setReadWrite(false);
lAvailable.setText(Msg.translate(getCtx(), "QtyAvailable"));
fAvailable.setBackground(AdempierePLAF.getInfoBackground());
fAvailable.setReadWrite(false);
lOrdered.setText(Msg.translate(getCtx(), MPPOrder.COLUMNNAME_QtyOrdered));
fOrdered.setBackground(AdempierePLAF.getInfoBackground());
fOrdered.setReadWrite(false);
// Product Lookup
fProduct_ID = new VLookup(MPPMRP.COLUMNNAME_M_Product_ID, true, false, true, MLookupFactory.get(getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MProduct.Table_Name, MPPMRP.COLUMNNAME_M_Product_ID), DisplayType.Search)) {
private static final long serialVersionUID = 1L;
public void setValue(Object arg0) {
super.setValue(arg0);
fAttrSetInstance_ID.setValue(new Integer(0));
}
;
};
fAttrSetInstance_ID = new CButton() {
private static final long serialVersionUID = 1L;
private Object value;
public Object getValue() {
return value;
}
;
public void setText(String text) {
if (text == null) {
text = "---";
}
if (text.length() > 23) {
text = text.substring(0, 20) + "...";
}
super.setText(text);
}
;
public void setValue(Object arg0) {
value = arg0;
int i = (arg0 instanceof Integer) ? ((Integer) arg0).intValue() : 0;
if (i == 0) {
setText(null);
}
}
;
};
fAttrSetInstance_ID.setValue(new Integer(0));
fAttrSetInstance_ID.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
selectAttributeSetInstance();
}
});
lProduct_ID.setLabelFor(fProduct_ID);
fProduct_ID.setBackground(AdempierePLAF.getInfoBackground());
//
lDateFrom.setLabelFor(fDateFrom);
fDateFrom.setBackground(AdempierePLAF.getInfoBackground());
fDateFrom.setToolTipText(Msg.translate(getCtx(), MLot.COLUMNNAME_DateFrom));
lDateTo.setLabelFor(fDateTo);
fDateTo.setBackground(AdempierePLAF.getInfoBackground());
fDateTo.setToolTipText(Msg.translate(getCtx(), MLot.COLUMNNAME_DateTo));
fSupplyType = new VLookup(MPPMRP.COLUMNNAME_TypeMRP, false, false, true, MLookupFactory.get(getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MPPMRP.Table_Name, MPPMRP.COLUMNNAME_TypeMRP), DisplayType.List));
lSupplyType.setLabelFor(fSupplyType);
fSupplyType.setBackground(AdempierePLAF.getInfoBackground());
//
parameterPanel.setLayout(new ALayout());
// 1st Row
parameterPanel.add(lProduct_ID, new ALayoutConstraint(0, 0));
parameterPanel.add(fProduct_ID, new ALayoutConstraint(0, 1));
parameterPanel.add(lUOM, new ALayoutConstraint(0, 2));
parameterPanel.add(fUOM, new ALayoutConstraint(0, 3));
parameterPanel.add(lType, new ALayoutConstraint(0, 4));
parameterPanel.add(fType, new ALayoutConstraint(0, 5));
// 2nd Row
parameterPanel.add(lAttrSetInstance_ID, new ALayoutConstraint(1, 0));
parameterPanel.add(fAttrSetInstance_ID, new ALayoutConstraint(1, 1));
parameterPanel.add(lOnhand, new ALayoutConstraint(1, 2));
parameterPanel.add(fOnhand, new ALayoutConstraint(1, 3));
parameterPanel.add(lOrderPeriod, new ALayoutConstraint(1, 4));
parameterPanel.add(fOrderPeriod, new ALayoutConstraint(1, 5));
// 3rd Row
parameterPanel.add(lPlanner_ID, new ALayoutConstraint(2, 0));
parameterPanel.add(fPlanner_ID, new ALayoutConstraint(2, 1));
parameterPanel.add(lSafetyStock, new ALayoutConstraint(2, 2));
parameterPanel.add(fSafetyStock, new ALayoutConstraint(2, 3));
parameterPanel.add(lMinOrd, new ALayoutConstraint(2, 4));
parameterPanel.add(fMinOrd, new ALayoutConstraint(2, 5));
// 4th Row
parameterPanel.add(lWarehouse_ID, new ALayoutConstraint(3, 0));
parameterPanel.add(fWarehouse_ID, new ALayoutConstraint(3, 1));
parameterPanel.add(lReserved, new ALayoutConstraint(3, 2));
parameterPanel.add(fReserved, new ALayoutConstraint(3, 3));
parameterPanel.add(lMaxOrd, new ALayoutConstraint(3, 4));
parameterPanel.add(fMaxOrd, new ALayoutConstraint(3, 5));
// 5th Row
parameterPanel.add(lResource_ID, new ALayoutConstraint(4, 0));
parameterPanel.add(fResource_ID, new ALayoutConstraint(4, 1));
parameterPanel.add(lAvailable, new ALayoutConstraint(4, 2));
parameterPanel.add(fAvailable, new ALayoutConstraint(4, 3));
parameterPanel.add(lOrdMult, new ALayoutConstraint(4, 4));
parameterPanel.add(fOrdMult, new ALayoutConstraint(4, 5));
// 6th Row
parameterPanel.add(lDateFrom, new ALayoutConstraint(5, 0));
parameterPanel.add(fDateFrom, new ALayoutConstraint(5, 1));
parameterPanel.add(lOrdered, new ALayoutConstraint(5, 2));
parameterPanel.add(fOrdered, new ALayoutConstraint(5, 3));
parameterPanel.add(lOrderQty, new ALayoutConstraint(5, 4));
parameterPanel.add(fOrderQty, new ALayoutConstraint(5, 5));
// 7th Row
parameterPanel.add(lDateTo, new ALayoutConstraint(6, 0));
parameterPanel.add(fDateTo, new ALayoutConstraint(6, 1));
parameterPanel.add(lTimefence, new ALayoutConstraint(6, 4));
parameterPanel.add(fTimefence, new ALayoutConstraint(6, 5));
// 8th Row
parameterPanel.add(fMaster, new ALayoutConstraint(7, 1));
parameterPanel.add(fCreatePlan, new ALayoutConstraint(7, 3));
parameterPanel.add(lLeadtime, new ALayoutConstraint(7, 4));
parameterPanel.add(fLeadtime, new ALayoutConstraint(7, 5));
// 9th Row
parameterPanel.add(fMRPReq, new ALayoutConstraint(8, 3));
parameterPanel.add(lYield, new ALayoutConstraint(8, 4));
parameterPanel.add(fYield, new ALayoutConstraint(8, 5));
}
use of org.compiere.apps.ALayout in project adempiere by adempiere.
the class VBrowserSearch method initComponents.
/**
* Initialize components
*/
@Override
public void initComponents() {
if (mainPanel != null)
return;
//
mainLayout = new BorderLayout();
centerPanel = new CPanel();
mainPanel = new CPanel();
m_separators = new ArrayList<CLabel>();
//
mainPanel.setLayout(mainLayout);
mainPanel.add(centerPanel, BorderLayout.CENTER);
//
centerLayout = new ALayout();
centerPanel.setLayout(centerLayout);
}
use of org.compiere.apps.ALayout 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.ALayout 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);
}
Aggregations