use of org.compiere.grid.ed.VNumber in project adempiere by adempiere.
the class VCollectDetail method loadStandardPanel.
/**
* Load Standard Fields for Collect
* @return void
*/
private void loadStandardPanel() {
standardPanel = new CPanel(layout);
// For Tender Type
// C_Payment_v.TenderType
int columnId = 8416;
MLookup lookup = MLookupFactory.get(Env.getCtx(), 0, 0, columnId, DisplayType.List);
fieldTenderType = new VLookup("TenderType", true, false, true, lookup);
((VComboBox) fieldTenderType.getCombo()).setRenderer(new POSLookupListCellRenderer(font));
fieldTenderType.setPreferredSize(new Dimension(FIELD_WIDTH, FIELD_HEIGHT));
((VComboBox) fieldTenderType.getCombo()).setFont(font);
fieldTenderType.addVetoableChangeListener(this);
// For Amount
fieldPayAmt = new VNumber("PayAmt", true, false, true, DisplayType.Amount, "");
fieldPayAmt.setPreferredSize(new Dimension(FIELD_WIDTH, FIELD_HEIGHT));
fieldPayAmt.setFont(font);
fieldPayAmt.setValue(Env.ZERO);
fieldPayAmt.addVetoableChangeListener(this);
fieldPayAmt.addKeyListener(this);
// Button
AppsAction action = new AppsAction("Minus", KeyStroke.getKeyStroke(KeyEvent.VK_F2, Event.F2), false);
action.setDelegate(this);
buttonMinus = (CButton) action.getButton();
buttonMinus.setPreferredSize(new Dimension(FIELD_HEIGHT, FIELD_HEIGHT));
buttonMinus.setFocusable(false);
// Add Tender Type
standardPanel.add(fieldTenderType, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NORTH, new Insets(2, 0, 2, 2), 0, 0));
standardPanel.add(fieldPayAmt, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NORTH, new Insets(2, 0, 2, 2), 0, 0));
}
Aggregations