use of org.compiere.grid.ed.VLookup in project adempiere by adempiere.
the class InfoInOut 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);
//
fBPartner_ID = new VLookup("C_BPartner_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MInOut.Table_Name, MInOut.COLUMNNAME_C_BPartner_ID), DisplayType.Search));
lBPartner_ID.setLabelFor(fBPartner_ID);
fBPartner_ID.setBackground(AdempierePLAF.getInfoBackground());
fBPartner_ID.addActionListener(this);
//
fShipper_ID = new VLookup("M_Shipper_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MInOut.Table_Name, MInOut.COLUMNNAME_M_Shipper_ID), DisplayType.TableDir));
lShipper_ID.setLabelFor(fShipper_ID);
fShipper_ID.setBackground(AdempierePLAF.getInfoBackground());
fShipper_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);
//
CPanel datePanel = new CPanel();
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(fIsSOTrx, new ALayoutConstraint(0, 5));
// 2nd Row
p_criteriaGrid.add(lDescription, new ALayoutConstraint(1, 0));
p_criteriaGrid.add(fDescription, null);
p_criteriaGrid.add(lDateFrom, null);
p_criteriaGrid.add(datePanel, null);
// 3rd Row
p_criteriaGrid.add(lPOReference, new ALayoutConstraint(2, 0));
p_criteriaGrid.add(fPOReference, null);
p_criteriaGrid.add(lShipper_ID, null);
p_criteriaGrid.add(fShipper_ID, null);
}
use of org.compiere.grid.ed.VLookup in project adempiere by adempiere.
the class InfoAssignment method statInit.
//private CButton bNew = new CButton();
/**
* Static Setup - add fields to parameterPanel.
* <pre>
* ResourceType Resource DateTimeFrom DateTimeTo New
* </pre>
*/
private void statInit() {
fieldResourceType = new VLookup("S_ResourceType_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MResourceType.Table_Name, MResourceType.COLUMNNAME_S_ResourceType_ID), DisplayType.TableDir));
fieldResourceType.addActionListener(this);
fieldResource = new VLookup("S_Resource_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MResource.Table_Name, MResource.COLUMNNAME_S_Resource_ID), DisplayType.TableDir));
fieldResource.addActionListener(this);
//
fieldFrom.addActionListener(this);
fieldTo.addActionListener(this);
//
p_criteriaGrid.setLayout(new ALayout());
p_criteriaGrid.add(labelResourceType, new ALayoutConstraint(0, 0));
p_criteriaGrid.add(fieldResourceType, null);
p_criteriaGrid.add(labelResource, null);
p_criteriaGrid.add(fieldResource, null);
//
p_criteriaGrid.add(labelFrom, new ALayoutConstraint(1, 0));
p_criteriaGrid.add(fieldFrom, null);
p_criteriaGrid.add(labelTo, null);
p_criteriaGrid.add(fieldTo, null);
//parameterPanel.add(bNew, null);
}
use of org.compiere.grid.ed.VLookup in project adempiere by adempiere.
the class VCreateFromRMAUI method initBPartner.
// vetoableChange
/**************************************************************************
* Load BPartner Field
* @param forInvoice true if Invoices are to be created, false receipts
* @throws Exception if Lookups cannot be initialized
*/
protected void initBPartner(boolean forInvoice) throws Exception {
// load BPartner
// C_Invoice.C_BPartner_ID
int AD_Column_ID = 3499;
MLookup lookup = MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, AD_Column_ID, DisplayType.Search);
bPartnerField = new VLookup("C_BPartner_ID", true, false, true, lookup);
//
int C_BPartner_ID = getC_BPartner_ID();
bPartnerField.setValue(new Integer(C_BPartner_ID));
}
use of org.compiere.grid.ed.VLookup in project adempiere by adempiere.
the class Graph method loadData.
private void loadData() {
list = builder.loadData();
JFreeChart chart = builder.createChart(builder.getMGoal().getChartType());
if (chartPanel != null)
remove(chartPanel);
chartPanel = new ChartPanel(chart);
chartPanel.setSize(getSize());
chartPanel.addChartMouseListener(this);
add(chartPanel, BorderLayout.CENTER);
if (m_userSelection) {
int AD_Reference_Value_ID = DB.getSQLValue(null, "SELECT AD_Reference_ID FROM AD_Reference WHERE Name = ?", "PA_Goal ChartType");
MLookupInfo info = MLookupFactory.getLookup_List(Env.getLanguage(Env.getCtx()), AD_Reference_Value_ID);
MLookup mLookup = new MLookup(info, 0);
VLookup lookup = new VLookup("ChartType", false, false, true, mLookup);
lookup.addVetoableChangeListener(new VetoableChangeListener() {
public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException {
Object value = evt.getNewValue();
if (value == null)
return;
JFreeChart chart = null;
chart = builder.createChart(value.toString());
if (chart != null) {
if (chartPanel != null)
remove(chartPanel);
chartPanel = new ChartPanel(chart);
chartPanel.setSize(getSize());
chartPanel.addChartMouseListener(Graph.this);
add(chartPanel, BorderLayout.CENTER);
getParent().validate();
}
}
});
add(lookup, BorderLayout.NORTH);
}
this.setMinimumSize(paneldimension);
}
use of org.compiere.grid.ed.VLookup in project adempiere by adempiere.
the class VInvoiceGenFromShipment method dynInit.
/**
* Fill Picks.
* Column_ID from C_Order
* @throws Exception if Lookups cannot be initialized
*/
public void dynInit() throws Exception {
MLookup orgL = MLookupFactory.get(Env.getCtx(), m_WindowNo, 0, 2163, DisplayType.TableDir);
fOrg = new VLookup("AD_Org_ID", false, false, true, orgL);
// lOrg.setText(Msg.translate(Env.getCtx(), "AD_Org_ID"));
fOrg.addVetoableChangeListener(this);
MLookup docActionL = MLookupFactory.get(Env.getCtx(), m_WindowNo, 3494, /* C_Invoice.DocStatus */
DisplayType.List, Env.getLanguage(Env.getCtx()), "DocAction", 135, /* _Document Action */
false, "AD_Ref_List.Value IN ('CO','PR')");
docAction = new VLookup("DocAction", true, false, true, docActionL);
// lDcoACtion.setText((Msg.translate(Env.getCtx(), "DocAction")););
docAction.addVetoableChangeListener(this);
//@Trifon - Pre-select "Prepare"
docAction.setValue("PR");
//
MLookup bpL = MLookupFactory.get(Env.getCtx(), m_WindowNo, 0, 2762, DisplayType.Search);
fBPartner = new VLookup("C_BPartner_ID", false, false, true, bpL);
// lBPartner.setText(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
fBPartner.addVetoableChangeListener(this);
//Document Type: Shipment/Vendor RMA
lDocType.setText(Msg.translate(Env.getCtx(), "C_DocType_ID"));
cmbDocType.addItem(new KeyNamePair(MInOut.Table_ID, Msg.translate(Env.getCtx(), "M_InOut_ID")));
//cmbDocType.addItem(new KeyNamePair(MRMA.Table_ID, Msg.translate(Env.getCtx(), "CustomerRMA")));
cmbDocType.addActionListener(this);
//@@
panel.getStatusBar().setStatusLine(Msg.getMsg(Env.getCtx(), "InvGenerateSel"));
}
Aggregations