use of org.compiere.apps.ConfirmPanel in project lar_361 by comitsrl.
the class POSKeyboard method init.
/**
* Initialize
* @param startText
* @param POSKeyLayout_ID
*/
public void init(int POSKeyLayout_ID) {
CPanel panel = new CPanel();
getContentPane().add(panel);
// Content
panel.setLayout(new MigLayout("fill"));
if (keylayout.getPOSKeyLayoutType().equals(MPOSKeyLayout.POSKEYLAYOUTTYPE_Numberpad))
text.setHorizontalAlignment(JTextField.TRAILING);
panel.add(text, "north, growx, h 30!, wrap, gap 10 10 10 10");
PosKeyPanel keys = new PosKeyPanel(POSKeyLayout_ID, this);
panel.add(keys, "center, growx, growy");
ConfirmPanel confirm = new ConfirmPanel(true, false, true, false, false, false, false);
confirm.addActionListener(this);
Dimension buttonDim = new Dimension(50, 50);
confirm.getResetButton().setPreferredSize(buttonDim);
confirm.getOKButton().setPreferredSize(buttonDim);
confirm.getCancelButton().setPreferredSize(buttonDim);
panel.add(confirm, "south");
pack();
setLocationByPlatform(true);
text.requestFocusInWindow();
}
use of org.compiere.apps.ConfirmPanel in project adempiere by adempiere.
the class VCRPDetail method jbInit.
private void jbInit() {
dateFrom = new VDate("DateFrom", true, false, true, DisplayType.Date, "DateFrom");
dateTo = new VDate("DateTo", true, false, true, DisplayType.Date, "DateTo");
CPanel northPanel = new CPanel();
northPanel.setLayout(new java.awt.GridBagLayout());
northPanel.add(new CLabel(Msg.translate(Env.getCtx(), "S_Resource_ID")), new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(resource, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(new CLabel(Msg.translate(Env.getCtx(), "DateFrom")), new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(dateFrom, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(new CLabel(Msg.translate(Env.getCtx(), "DateTo")), new GridBagConstraints(4, 1, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(dateTo, new GridBagConstraints(5, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
ConfirmPanel confirmPanel = new ConfirmPanel(true);
confirmPanel.addActionListener(new ActionHandler());
contentPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
contentPanel.setPreferredSize(new Dimension(800, 600));
m_form.getWindow().getContentPane().add(northPanel, BorderLayout.NORTH);
m_form.getWindow().getContentPane().add(contentPanel, BorderLayout.CENTER);
m_form.getWindow().getContentPane().add(confirmPanel, BorderLayout.SOUTH);
}
use of org.compiere.apps.ConfirmPanel in project adempiere by adempiere.
the class POSKeyboard method init.
/**
* Initialize
* @param startText
* @param POSKeyLayout_ID
*/
public void init(int POSKeyLayout_ID) {
CPanel panel = new CPanel();
getContentPane().add(panel);
// Content
panel.setLayout(new MigLayout("fill"));
if (m_Keylayout.getPOSKeyLayoutType() != null && m_Keylayout.getPOSKeyLayoutType().equals(MPOSKeyLayout.POSKEYLAYOUTTYPE_Numberpad))
m_Text.setHorizontalAlignment(JTextField.TRAILING);
// Add Listener
m_Text.addKeyListener(this);
m_Text.addFocusListener(this);
m_Text.setFocusable(true);
//
panel.add(m_Text, "north, growx, h 30!, wrap, gap 10 10 10 10");
//
POSKeyPanel keys = new POSKeyPanel(POSKeyLayout_ID, this);
keys.setFocusable(false);
//
panel.add(keys, "center, growx, growy");
ConfirmPanel confirm = new ConfirmPanel(true, false, true, false, false, false, false);
confirm.addActionListener(this);
Dimension buttonDim = new Dimension(50, 50);
confirm.getResetButton().setPreferredSize(buttonDim);
confirm.getOKButton().setPreferredSize(buttonDim);
confirm.getCancelButton().setPreferredSize(buttonDim);
panel.add(confirm, "south");
pack();
}
use of org.compiere.apps.ConfirmPanel in project adempiere by adempiere.
the class VAllocation method jbInit.
/**
* Static Init
* @throws Exception
*/
private void jbInit() throws Exception {
CompiereColor.setBackground(panel);
// Add
confirmPanel = new ConfirmPanel(true);
confirmPanel.addActionListener(this);
//
// Should be performed before the class is set.
paymentTable.setMultiSelection(true);
// Should be performed before the class is set.
invoiceTable.setMultiSelection(true);
invoiceTable.setSurrendersFocusOnKeystroke(true);
//
mainPanel.setLayout(mainLayout);
dateLabel.setText(Msg.getMsg(Env.getCtx(), "Date"));
dateLabel.setToolTipText(Msg.getMsg(Env.getCtx(), "AllocDate", false));
autoWriteOff.setSelected(false);
autoWriteOff.setText(Msg.getMsg(Env.getCtx(), "AutoWriteOff", true));
autoWriteOff.setToolTipText(Msg.getMsg(Env.getCtx(), "AutoWriteOff", false));
//
parameterPanel.setLayout(parameterLayout);
allocationPanel.setLayout(allocationLayout);
bpartnerLabel.setText(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
paymentLabel.setRequestFocusEnabled(false);
paymentLabel.setText(" " + Msg.translate(Env.getCtx(), "C_Payment_ID"));
invoiceLabel.setRequestFocusEnabled(false);
invoiceLabel.setText(" " + Msg.translate(Env.getCtx(), "C_Invoice_ID"));
paymentPanel.setLayout(paymentLayout);
invoicePanel.setLayout(invoiceLayout);
invoiceInfo.setHorizontalAlignment(SwingConstants.RIGHT);
invoiceInfo.setHorizontalTextPosition(SwingConstants.RIGHT);
invoiceInfo.setText(".");
paymentInfo.setHorizontalAlignment(SwingConstants.RIGHT);
paymentInfo.setHorizontalTextPosition(SwingConstants.RIGHT);
paymentInfo.setText(".");
chargeLabel.setText(Msg.translate(Env.getCtx(), "C_Charge_ID"));
chargeLabel.setToolTipText(Msg.getMsg(Env.getCtx(), "ChargeDifference", false));
descriptionLabel.setText(Msg.getMsg(Env.getCtx(), "Description"));
descriptionField.setColumns(20);
differenceLabel.setText(Msg.getMsg(Env.getCtx(), "Difference"));
differenceField.setBackground(AdempierePLAF.getFieldBackground_Inactive());
differenceField.setEditable(false);
differenceField.setText("0");
differenceField.setColumns(8);
differenceField.setHorizontalAlignment(SwingConstants.RIGHT);
currencyLabel.setText(Msg.translate(Env.getCtx(), "C_Currency_ID"));
multiCurrency.setText(Msg.getMsg(Env.getCtx(), "MultiCurrency"));
multiCurrency.addActionListener(this);
allocCurrencyLabel.setText(".");
invoiceScrollPane.setPreferredSize(new Dimension(200, 200));
paymentScrollPane.setPreferredSize(new Dimension(200, 200));
mainPanel.add(parameterPanel, BorderLayout.NORTH);
//org filter
organizationLabel.setText(Msg.translate(Env.getCtx(), "AD_Org_ID"));
// APAR
aparLabel.setText(Msg.translate(Env.getCtx(), "APAR"));
//
parameterPanel.add(organizationLabel, new GridBagConstraints(4, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
parameterPanel.add(organizationPick, new GridBagConstraints(5, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
parameterPanel.add(aparLabel, new GridBagConstraints(4, 1, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
parameterPanel.add(aparPick, new GridBagConstraints(5, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
parameterPanel.add(bpartnerLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
parameterPanel.add(bpartnerSearch, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0));
parameterPanel.add(dateLabel, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
parameterPanel.add(dateField, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0));
parameterPanel.add(currencyLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
parameterPanel.add(currencyPick, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0));
parameterPanel.add(multiCurrency, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0));
parameterPanel.add(autoWriteOff, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
mainPanel.add(allocationPanel, BorderLayout.SOUTH);
allocationPanel.add(differenceLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 0), 0, 0));
allocationPanel.add(differenceField, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0));
allocationPanel.add(chargeLabel, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
allocationPanel.add(chargePick, new GridBagConstraints(4, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
allocationPanel.add(descriptionLabel, new GridBagConstraints(5, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0));
allocationPanel.add(descriptionField, new GridBagConstraints(6, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0));
allocationPanel.add(allocCurrencyLabel, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
allocationPanel.add(confirmPanel, new GridBagConstraints(10, 0, 1, 1, 1, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0));
paymentPanel.add(paymentLabel, BorderLayout.NORTH);
paymentPanel.add(paymentInfo, BorderLayout.SOUTH);
paymentPanel.add(paymentScrollPane, BorderLayout.CENTER);
paymentScrollPane.getViewport().add(paymentTable, null);
invoicePanel.add(invoiceLabel, BorderLayout.NORTH);
invoicePanel.add(invoiceInfo, BorderLayout.SOUTH);
invoicePanel.add(invoiceScrollPane, BorderLayout.CENTER);
invoiceScrollPane.getViewport().add(invoiceTable, null);
//
mainPanel.add(infoPanel, BorderLayout.CENTER);
infoPanel.setOrientation(JSplitPane.VERTICAL_SPLIT);
infoPanel.setBorder(BorderFactory.createEtchedBorder());
infoPanel.setTopComponent(paymentPanel);
infoPanel.setBottomComponent(invoicePanel);
infoPanel.add(paymentPanel, JSplitPane.TOP);
infoPanel.add(invoicePanel, JSplitPane.BOTTOM);
infoPanel.setContinuousLayout(true);
infoPanel.setPreferredSize(new Dimension(800, 250));
infoPanel.setDividerLocation(110);
}
Aggregations