use of org.compiere.apps.ALayout in project adempiere by adempiere.
the class InfoInvoice 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);
fIsPaid.setSelected(false);
fIsPaid.addActionListener(this);
fIsSOTrx.setSelected(!"N".equals(Env.getContext(Env.getCtx(), p_WindowNo, "IsSOTrx")));
fIsSOTrx.addActionListener(this);
//
// C_Invoice.C_BPartner_ID
fBPartner_ID = new VLookup("C_BPartner_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MInvoice.Table_Name, MInvoice.COLUMNNAME_C_BPartner_ID), DisplayType.Search));
lBPartner_ID.setLabelFor(fBPartner_ID);
fBPartner_ID.setBackground(AdempierePLAF.getInfoBackground());
fBPartner_ID.addActionListener(this);
// C_Invoice.C_Order_ID
fOrder_ID = new VLookup("C_Order_ID", false, false, true, MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, MColumn.getColumn_ID(MInvoice.Table_Name, MInvoice.COLUMNNAME_C_Order_ID), DisplayType.Search));
lOrder_ID.setLabelFor(fOrder_ID);
fOrder_ID.setBackground(AdempierePLAF.getInfoBackground());
fOrder_ID.addActionListener(this);
//
lDateFrom.setLabelFor(fDateFrom);
fDateFrom.setBackground(AdempierePLAF.getInfoBackground());
fDateFrom.setToolTipText(Msg.translate(Env.getCtx(), "DateFrom"));
lDateTo.setLabelFor(fDateTo);
fDateTo.setBackground(AdempierePLAF.getInfoBackground());
fDateTo.setToolTipText(Msg.translate(Env.getCtx(), "DateTo"));
lAmtFrom.setLabelFor(fAmtFrom);
fAmtFrom.setBackground(AdempierePLAF.getInfoBackground());
fAmtFrom.setToolTipText(Msg.translate(Env.getCtx(), "AmtFrom"));
lAmtTo.setLabelFor(fAmtTo);
fAmtTo.setBackground(AdempierePLAF.getInfoBackground());
fAmtTo.setToolTipText(Msg.translate(Env.getCtx(), "AmtTo"));
//
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(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);
p_criteriaGrid.add(fIsPaid, new ALayoutConstraint(1, 5));
// 3rd Row
p_criteriaGrid.add(lOrder_ID, new ALayoutConstraint(2, 0));
p_criteriaGrid.add(fOrder_ID, null);
p_criteriaGrid.add(lAmtFrom, null);
p_criteriaGrid.add(amtPanel, null);
m_sqlSchedule = scheduleTbl.prepareTable(s_subLayout, s_subFrom, s_subWhere, false, "i");
scheduleTbl.setRowSelectionAllowed(true);
scheduleTbl.setMultiSelection(false);
scheduleTbl.addMouseListener(this);
scheduleTbl.setShowTotals(true);
scheduleTbl.autoSize();
tablePanel.setPreferredSize(new Dimension(INFO_WIDTH, SCREEN_HEIGHT > 600 ? 255 : 110));
tablePanel.setLayout(new BorderLayout());
tablePanel.add(new JScrollPane(scheduleTbl), BorderLayout.CENTER);
// Add the details to the p_detailPanel
p_detailTaskPane.setTitle(Msg.translate(Env.getCtx(), "C_InvoicePaySchedule_ID"));
p_detailTaskPane.add(tablePanel, BorderLayout.CENTER);
p_detailTaskPane.setVisible(true);
}
use of org.compiere.apps.ALayout in project adempiere by adempiere.
the class Info method jbInit.
/**
* Static Init
* @throws Exception
*/
protected void jbInit() throws Exception {
this.getContentPane().add(parameterPanel, BorderLayout.NORTH);
this.getContentPane().add(scrollPane, BorderLayout.CENTER);
this.getContentPane().add(southPanel, BorderLayout.SOUTH);
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
//
AppsAction aa = new AppsAction(ConfirmPanel.A_RESET, null, "reset");
bReset = (CButton) aa.getButton();
bReset.setMargin(ConfirmPanel.s_insets);
bReset.setSize(bReset.getHeight(), bReset.getHeight());
Dimension bSize = bReset.getSize();
bSize.height = bReset.getHeight();
bSize.width = bReset.getHeight();
// Make it square
bReset.setMaximumSize(bSize);
bReset.addActionListener(this);
//
buttonPanel = new CPanel(new FlowLayout(FlowLayout.LEFT));
buttonPanel.add(bReset, FlowLayout.LEFT);
//
// p_criteriaGrid is filled by the subordinate class
p_criteriaGrid.setLayout(new ALayout());
//
parameterPanel.setLayout(new BorderLayout());
parameterPanel.add(buttonPanel, BorderLayout.WEST);
parameterPanel.add(p_criteriaGrid, BorderLayout.CENTER);
//
// Setup the detail panel if used
p_detailTaskPane.setVisible(false);
p_detailTaskPane.setCollapsed(true);
p_detailTaskPane.setLayout(new BorderLayout());
p_detailTaskPane.setUI(new AdempiereTaskPaneUI());
p_detailTaskPane.getContentPane().setBackground(new ColorUIResource(251, 248, 241));
p_detailTaskPane.getContentPane().setForeground(new ColorUIResource(251, 0, 0));
addonPanel.setLayout(new BorderLayout());
// Allow auto resizing of the panel
addonPanel.add(p_detailTaskPane, BorderLayout.CENTER);
southPanel.setLayout(southLayout);
southPanel.add(addonPanel, BorderLayout.NORTH);
southPanel.add(confirmPanel, BorderLayout.CENTER);
southPanel.add(statusBar, BorderLayout.SOUTH);
scrollPane.getViewport().add(p_table, null);
//
confirmPanel.addActionListener(this);
confirmPanel.getResetButton().setVisible(hasReset());
confirmPanel.getCustomizeButton().setVisible(hasCustomize());
confirmPanel.getHistoryButton().setVisible(hasHistory());
confirmPanel.getZoomButton().setVisible(hasZoom());
// Only show the OK button if we intend to save
confirmPanel.setOKVisible(p_saveResults);
//
JButton print = ConfirmPanel.createPrintButton(true);
print.addActionListener(this);
confirmPanel.addButton(print);
//
checkAutoQuery.setText(Msg.getMsg(Env.getCtx(), "AutoRefresh"));
checkAutoQuery.setToolTipText(Msg.getMsg(Env.getCtx(), "AutoRefresh"));
checkAutoQuery.setName("AutoQuery");
checkAutoQuery.setSelected(MSysConfig.getValue(SYSCONFIG_INFO_AUTO_QUERY, "Y", Env.getAD_Client_ID(Env.getCtx())).equals("Y"));
checkAutoQuery.addActionListener(this);
// Index 0 is OK-Cancel on the right
CPanel leftButtons = (CPanel) confirmPanel.getComponent(1);
// Add the check box on the very left before the refresh icon
leftButtons.add(checkAutoQuery, 0);
//
popup.add(zoomMenu);
zoomMenu.setText(Msg.getMsg(Env.getCtx(), "Zoom"));
zoomMenu.setIcon(new ImageIcon(org.compiere.Adempiere.class.getResource("images/Zoom16.gif")));
zoomMenu.addActionListener(this);
//
popup.add(calcMenu);
calcMenu.setText(Msg.getMsg(Env.getCtx(), "Calculator"));
calcMenu.setIcon(new ImageIcon(org.compiere.Adempiere.class.getResource("images/Calculator16.gif")));
calcMenu.addActionListener(this);
//
// Table Selection (Invoked before setting column class so that row selection is enabled)
p_table.setKeyColumnIndex(-1);
p_table.setCellSelectionEnabled(false);
p_table.setColumnSelectionAllowed(false);
p_table.setRowSelectionAllowed(true);
// Override the Enter key input and action map
if (p_saveResults) {
p_table.getInputMap().put(KeyStroke.getKeyStroke("ENTER"), "doDispose");
} else {
p_table.getInputMap().put(KeyStroke.getKeyStroke("ENTER"), "doNothing");
}
p_table.getActionMap().put("doDispose", doDispose);
// To enable buttons
((ListSelectionModel) p_table.getSelectionModel()).addListSelectionListener(this);
p_table.addMouseListener(this);
// Listen to changes in the table
p_table.addPropertyChangeListener("p_table_update", this);
((ListSelectionModel) p_table.getSelectionModel()).addListSelectionListener(this);
//
// Set default location where focus will go. See property change listener.
m_parentPanel = p_criteriaGrid;
//
enableButtons();
}
use of org.compiere.apps.ALayout in project adempiere by adempiere.
the class VProductConfigurationBOM 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_bomLineIDList.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;
m_tree = new CheckboxTree(this.m_RadioButtonTreeCellRenderer.action_loadBOM(m_product, true));
m_tree.getCheckingModel().setCheckingMode(it.cnr.imaa.essi.lablib.gui.checkboxtree.TreeCheckingModel.CheckingMode.SIMPLE);
m_tree.getCheckingModel().clearChecking();
m_tree.setCellRenderer(this.m_RadioButtonTreeCellRenderer);
m_tree.setScrollsOnExpand(true);
JScrollPane treeView = new JScrollPane(m_tree);
this.add(treeView);
} else {
DefaultMutableTreeNode nodeHolder = new DefaultMutableTreeNode(Msg.translate(Env.getCtx(), "No Product Chosen"));
m_tree = new CheckboxTree(nodeHolder);
JScrollPane treeView = new JScrollPane(m_tree);
this.add(treeView);
}
this.setBorder(new TitledBorder(title));
}
use of org.compiere.apps.ALayout in project lar_361 by comitsrl.
the class VPAttributeDialog method reloadWindow.
// actionPerformed
/**
* Allow show/edit the attribute set instance recently selected
* @author Emiliano Pereyra
*/
private void reloadWindow() {
this.getContentPane().remove(centerPanel);
centerLayout = new ALayout(5, 5, true);
centerPanel = new CPanel();
m_editors = new ArrayList<CEditor>();
m_row = 0;
try {
jbInit();
} catch (Exception ex) {
log.log(Level.SEVERE, "VPAttributeDialog", ex);
}
initAttributes();
cbNewEdit.setSelected(true);
cmd_newEdit();
pack();
}
use of org.compiere.apps.ALayout in project lar_361 by comitsrl.
the class InfoOnDrawerChecks method statInit.
/**
* Static Setup - add fields to parameterPanel
* @throws Exception if Lookups cannot be created
*/
private void statInit() throws Exception {
lDocumentNo.setLabelFor(fDocumentNo);
fDocumentNo.setBackground(AdempierePLAF.getInfoBackground());
fDocumentNo.addActionListener(this);
// Begin Marcos Zúñiga
lRoutingNo.setLabelFor(fRoutingNo);
fRoutingNo.setBackground(AdempierePLAF.getInfoBackground());
fRoutingNo.addActionListener(this);
lCheckNo.setLabelFor(fCheckNo);
fCheckNo.setBackground(AdempierePLAF.getInfoBackground());
fCheckNo.addActionListener(this);
// End Marcos Zúñiga
fIsReceipt.setSelected(!"N".equals(Env.getContext(Env.getCtx(), p_WindowNo, "IsSOTrx")));
fIsReceipt.addActionListener(this);
// Begin Marcos Zúñiga
lA_Name.setLabelFor(fA_Name);
fA_Name.setBackground(AdempierePLAF.getInfoBackground());
fA_Name.addActionListener(this);
// End Marcos Zúñiga
lDateFrom.setLabelFor(fDateFrom);
fDateFrom.setBackground(AdempierePLAF.getInfoBackground());
fDateFrom.setToolTipText(Msg.translate(Env.getCtx(), "DateFrom"));
lDateTo.setLabelFor(fDateTo);
fDateTo.setBackground(AdempierePLAF.getInfoBackground());
fDateTo.setToolTipText(Msg.translate(Env.getCtx(), "DateTo"));
lAmtFrom.setLabelFor(fAmtFrom);
fAmtFrom.setBackground(AdempierePLAF.getInfoBackground());
fAmtFrom.setToolTipText(Msg.translate(Env.getCtx(), "AmtFrom"));
lAmtTo.setLabelFor(fAmtTo);
fAmtTo.setBackground(AdempierePLAF.getInfoBackground());
fAmtTo.setToolTipText(Msg.translate(Env.getCtx(), "AmtTo"));
//
parameterPanel.setLayout(new ALayout());
// First Row
parameterPanel.add(lDocumentNo, new ALayoutConstraint(0, 0));
parameterPanel.add(fDocumentNo, null);
// Marcos Zúñiga
parameterPanel.add(lA_Name, null);
// Marcos Zúñiga
parameterPanel.add(fA_Name, null);
parameterPanel.add(fIsReceipt, new ALayoutConstraint(0, 5));
// 2nd Row
// Marcos Zúñiga
parameterPanel.add(lRoutingNo, new ALayoutConstraint(1, 0));
// Marcos Zúñiga
parameterPanel.add(fRoutingNo, null);
parameterPanel.add(lDateFrom, new ALayoutConstraint(1, 2));
parameterPanel.add(fDateFrom, null);
parameterPanel.add(lDateTo, null);
parameterPanel.add(fDateTo, null);
// 3rd Row
// Marcos Zúñiga
parameterPanel.add(lCheckNo, new ALayoutConstraint(2, 0));
// Marcos Zúñiga
parameterPanel.add(fCheckNo, null);
parameterPanel.add(lAmtFrom, new ALayoutConstraint(2, 2));
parameterPanel.add(fAmtFrom, null);
parameterPanel.add(lAmtTo, null);
parameterPanel.add(fAmtTo, null);
// parameterPanel.add(lOrg_ID, null);
// parameterPanel.add(fOrg_ID, null);
fIsReceipt.setEnabled(false);
}
Aggregations