Search in sources :

Example 11 with ColumnInfo

use of org.compiere.minigrid.ColumnInfo in project adempiere by adempiere.

the class VMatch method dynInit.

//  jbInit
/**
	 *  Dynamic Init.
	 *  Table Layout, Visual, Listener
	 */
private void dynInit() {
    ColumnInfo[] layout = new ColumnInfo[] { new ColumnInfo(" ", ".", IDColumn.class, false, false, ""), //  1
    new ColumnInfo(Msg.translate(Env.getCtx(), "DocumentNo"), ".", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Date"), ".", Timestamp.class), //  3
    new ColumnInfo(Msg.translate(Env.getCtx(), "C_BPartner_ID"), ".", KeyNamePair.class, "."), new ColumnInfo(Msg.translate(Env.getCtx(), "Line"), ".", KeyNamePair.class, "."), //  5
    new ColumnInfo(Msg.translate(Env.getCtx(), "M_Product_ID"), ".", KeyNamePair.class, "."), new ColumnInfo(Msg.translate(Env.getCtx(), "Qty"), ".", Double.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Matched"), ".", Double.class), //JAVIER
    new ColumnInfo(Msg.translate(Env.getCtx(), "AD_Org_ID"), ".", KeyNamePair.class, ".") };
    xMatchedTable.prepareTable(layout, "", "", false, "");
    xMatchedToTable.prepareTable(layout, "", "", true, "");
    //  Visual
    CompiereColor.setBackground(panel);
    //  Listener
    matchFrom.addActionListener(this);
    matchTo.addActionListener(this);
    bSearch.addActionListener(this);
    xMatchedTable.getSelectionModel().addListSelectionListener(this);
    xMatchedToTable.getModel().addTableModelListener(this);
    bProcess.addActionListener(this);
    sameBPartner.addActionListener(this);
    sameProduct.addActionListener(this);
    sameQty.addActionListener(this);
    //  Init
    matchTo.setModel(new DefaultComboBoxModel(cmd_matchFrom((String) matchFrom.getSelectedItem())));
    //  Set Title
    xMatchedBorder.setTitle((String) matchFrom.getSelectedItem());
    xMatchedScrollPane.repaint();
    //  Reset Table
    xMatchedTable.setRowCount(0);
    cmd_matchTo();
    statusBar.setStatusLine("");
    statusBar.setStatusDB(0);
}
Also used : ColumnInfo(org.compiere.minigrid.ColumnInfo) DefaultComboBoxModel(javax.swing.DefaultComboBoxModel)

Aggregations

ColumnInfo (org.compiere.minigrid.ColumnInfo)11 SQLException (java.sql.SQLException)5 Dimension (java.awt.Dimension)3 Properties (java.util.Properties)3 Event (org.zkoss.zk.ui.event.Event)3 BorderLayout (java.awt.BorderLayout)2 JScrollPane (javax.swing.JScrollPane)2 Row (org.adempiere.webui.component.Row)2 Rows (org.adempiere.webui.component.Rows)2 Tab (org.adempiere.webui.component.Tab)2 Tabpanel (org.adempiere.webui.component.Tabpanel)2 Tabpanels (org.adempiere.webui.component.Tabpanels)2 Tabs (org.adempiere.webui.component.Tabs)2 ALayoutConstraint (org.compiere.apps.ALayoutConstraint)2 VLookup (org.compiere.grid.ed.VLookup)2 IDColumn (org.compiere.minigrid.IDColumn)2 MLookup (org.compiere.model.MLookup)2 Borderlayout (org.zkoss.zul.Borderlayout)2 Center (org.zkoss.zul.Center)2 North (org.zkoss.zul.North)2