Refactor - indentation - improve readability - translate comments - organize imports - fix warnings
This commit is contained in:
parent
d75cc47746
commit
d7648d34cf
|
|
@ -16,103 +16,109 @@
|
||||||
|
|
||||||
package org.eevolution.model;
|
package org.eevolution.model;
|
||||||
|
|
||||||
import java.lang.reflect.*;
|
import java.lang.reflect.Constructor;
|
||||||
import java.util.*;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.sql.*;
|
import java.sql.PreparedStatement;
|
||||||
import java.math.*;
|
import java.sql.ResultSet;
|
||||||
import java.util.logging.*;
|
import java.sql.SQLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
import org.compiere.util.DB;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
import org.compiere.util.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Victor Perez www.e-evolution.com
|
* @author Victor Perez www.e-evolution.com
|
||||||
*/
|
*/
|
||||||
public class QueryDB {
|
public class QueryDB {
|
||||||
|
|
||||||
private String classname;
|
|
||||||
private String trxName;
|
|
||||||
private static CLogger log = CLogger.getCLogger (QueryDB.class);
|
|
||||||
/** Creates a new instance of POQuery */
|
|
||||||
|
|
||||||
public QueryDB(String classname)
|
|
||||||
{
|
|
||||||
this.classname = classname;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static Object newInstance(String classname, int id, String trxName )
|
|
||||||
{
|
|
||||||
Object result = null;
|
|
||||||
Class args;
|
|
||||||
int begin = classname.indexOf("X_") + 2 ;
|
|
||||||
String table = classname.substring(begin);
|
|
||||||
Class[] intArgsClass = new Class[] {Properties.class , int.class, String.class};
|
|
||||||
//Integer height = new Integer(12);
|
|
||||||
Integer ID = new Integer(id);
|
|
||||||
Object[] intArgs = new Object[] {Env.getCtx(), ID,table};
|
|
||||||
Constructor intArgsConstructor;
|
|
||||||
|
|
||||||
try
|
private String classname;
|
||||||
{
|
private static CLogger log = CLogger.getCLogger (QueryDB.class);
|
||||||
|
/** Creates a new instance of POQuery */
|
||||||
args = Class.forName(classname);
|
|
||||||
intArgsConstructor =
|
|
||||||
args.getConstructor(intArgsClass);
|
|
||||||
result = createObject(intArgsConstructor, intArgs);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
catch (ClassNotFoundException e)
|
|
||||||
{
|
|
||||||
System.out.println(e);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
catch (NoSuchMethodException e)
|
|
||||||
{
|
|
||||||
System.out.println(e);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Object createObject(Constructor constructor,
|
public QueryDB(String classname)
|
||||||
Object[] arguments) {
|
{
|
||||||
|
this.classname = classname;
|
||||||
|
}
|
||||||
|
|
||||||
//System.out.println ("Constructor: " + constructor.toString());
|
|
||||||
Object object = null;
|
|
||||||
|
|
||||||
try {
|
|
||||||
object = constructor.newInstance(arguments);
|
public static Object newInstance(String classname, int id, String trxName )
|
||||||
//System.out.println ("Object: " + object.toString());
|
{
|
||||||
return object;
|
Object result = null;
|
||||||
} catch (InstantiationException e) {
|
Class args;
|
||||||
log.log(Level.SEVERE,"InstantiationException:" + e);
|
int begin = classname.indexOf("X_") + 2 ;
|
||||||
} catch (IllegalAccessException e) {
|
String table = classname.substring(begin);
|
||||||
log.log(Level.SEVERE,"IllegalAccessException:" + e);
|
Class[] intArgsClass = new Class[] {Properties.class , int.class, String.class};
|
||||||
} catch (IllegalArgumentException e) {
|
//Integer height = new Integer(12);
|
||||||
log.log(Level.SEVERE,"IllegalArgumentExceptio:" + e);
|
Integer ID = new Integer(id);
|
||||||
} catch (InvocationTargetException e) {
|
Object[] intArgs = new Object[] {Env.getCtx(), ID,table};
|
||||||
log.log(Level.SEVERE,"InvocationTargetException:" + e);
|
Constructor intArgsConstructor;
|
||||||
}
|
|
||||||
return object;
|
try
|
||||||
}
|
{
|
||||||
|
|
||||||
public List execute(String filter) {
|
args = Class.forName(classname);
|
||||||
|
intArgsConstructor =
|
||||||
//String tablename = POClass.getName();
|
args.getConstructor(intArgsClass);
|
||||||
//System.out.print(classname.indexOf("X_"));
|
result = createObject(intArgsConstructor, intArgs);
|
||||||
int begin = classname.indexOf("X_") + 2 ;
|
return result;
|
||||||
String table = classname.substring(begin);
|
}
|
||||||
StringBuffer sql = new StringBuffer("SELECT ").append(table).append("_ID FROM " + table);
|
catch (ClassNotFoundException e)
|
||||||
if (filter.equals(""))
|
{
|
||||||
System.out.println("not exist filter");
|
System.out.println(e);
|
||||||
else
|
return result;
|
||||||
sql.append(" WHERE ").append(filter);
|
}
|
||||||
|
catch (NoSuchMethodException e)
|
||||||
//System.out.println("Query " + sql.toString());
|
{
|
||||||
|
System.out.println(e);
|
||||||
List results = new ArrayList();
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Object createObject(Constructor constructor,
|
||||||
|
Object[] arguments) {
|
||||||
|
|
||||||
|
//System.out.println ("Constructor: " + constructor.toString());
|
||||||
|
Object object = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
object = constructor.newInstance(arguments);
|
||||||
|
//System.out.println ("Object: " + object.toString());
|
||||||
|
return object;
|
||||||
|
} catch (InstantiationException e) {
|
||||||
|
log.log(Level.SEVERE,"InstantiationException:" + e);
|
||||||
|
} catch (IllegalAccessException e) {
|
||||||
|
log.log(Level.SEVERE,"IllegalAccessException:" + e);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
log.log(Level.SEVERE,"IllegalArgumentExceptio:" + e);
|
||||||
|
} catch (InvocationTargetException e) {
|
||||||
|
log.log(Level.SEVERE,"InvocationTargetException:" + e);
|
||||||
|
}
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Object> execute(String filter) {
|
||||||
|
|
||||||
|
//String tablename = POClass.getName();
|
||||||
|
//System.out.print(classname.indexOf("X_"));
|
||||||
|
int begin = classname.indexOf("X_") + 2 ;
|
||||||
|
String table = classname.substring(begin);
|
||||||
|
StringBuffer sql = new StringBuffer("SELECT ").append(table).append("_ID FROM " + table);
|
||||||
|
if (filter.equals(""))
|
||||||
|
System.out.println("not exist filter");
|
||||||
|
else
|
||||||
|
sql.append(" WHERE ").append(filter);
|
||||||
|
|
||||||
|
//System.out.println("Query " + sql.toString());
|
||||||
|
|
||||||
|
List<Object> results = new ArrayList<Object>();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
PreparedStatement pstmt = DB.prepareStatement(sql.toString(), null);
|
PreparedStatement pstmt = DB.prepareStatement(sql.toString(), null);
|
||||||
|
|
@ -121,8 +127,8 @@ public class QueryDB {
|
||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
int id = rs.getInt(1);
|
int id = rs.getInt(1);
|
||||||
Object element = newInstance(classname , id, table);
|
Object element = newInstance(classname , id, table);
|
||||||
results.add(element);
|
results.add(element);
|
||||||
}
|
}
|
||||||
rs.close();
|
rs.close();
|
||||||
pstmt.close();
|
pstmt.close();
|
||||||
|
|
@ -131,27 +137,27 @@ public class QueryDB {
|
||||||
{
|
{
|
||||||
log.log(Level.SEVERE,"VCreateFrom.initIOS - Order\nSQL=" + sql.toString(), e);
|
log.log(Level.SEVERE,"VCreateFrom.initIOS - Order\nSQL=" + sql.toString(), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List execute() {
|
public List<Object> execute() {
|
||||||
|
|
||||||
//String tablename = POClass.getName();
|
//String tablename = POClass.getName();
|
||||||
//System.out.print(classname.indexOf("X_"));
|
//System.out.print(classname.indexOf("X_"));
|
||||||
int begin = classname.indexOf("X_") + 2 ;
|
int begin = classname.indexOf("X_") + 2 ;
|
||||||
String table = classname.substring(begin);
|
String table = classname.substring(begin);
|
||||||
StringBuffer sql = new StringBuffer("SELECT ").append(table).append("_ID FROM " + table);
|
StringBuffer sql = new StringBuffer("SELECT ").append(table).append("_ID FROM " + table);
|
||||||
//if (filter.equals(""))
|
//if (filter.equals(""))
|
||||||
//System.out.println("not exist filter");
|
//System.out.println("not exist filter");
|
||||||
//else
|
//else
|
||||||
//sql.append(" WHERE ").append(filter);
|
//sql.append(" WHERE ").append(filter);
|
||||||
|
|
||||||
//System.out.println("Query " + sql.toString());
|
//System.out.println("Query " + sql.toString());
|
||||||
|
|
||||||
List results = new ArrayList();
|
List<Object> results = new ArrayList<Object>();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
PreparedStatement pstmt = DB.prepareStatement(sql.toString(), null);
|
PreparedStatement pstmt = DB.prepareStatement(sql.toString(), null);
|
||||||
|
|
@ -160,8 +166,8 @@ public class QueryDB {
|
||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
int id = rs.getInt(1);
|
int id = rs.getInt(1);
|
||||||
Object element = newInstance(classname , id, table);
|
Object element = newInstance(classname , id, table);
|
||||||
results.add(element);
|
results.add(element);
|
||||||
}
|
}
|
||||||
rs.close();
|
rs.close();
|
||||||
pstmt.close();
|
pstmt.close();
|
||||||
|
|
@ -170,10 +176,8 @@ public class QueryDB {
|
||||||
{
|
{
|
||||||
log.log(Level.SEVERE,"VCreateFrom.initIOS - Order\nSQL=" + sql.toString(), e);
|
log.log(Level.SEVERE,"VCreateFrom.initIOS - Order\nSQL=" + sql.toString(), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
* under the terms version 2 of the GNU General Public License as published *
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
* by the Free Software Foundation. This program is distributed in the hope *
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
|
@ -30,10 +30,8 @@ import org.compiere.minigrid.MiniTable;
|
||||||
import org.compiere.model.MLookup;
|
import org.compiere.model.MLookup;
|
||||||
import org.compiere.model.MLookupFactory;
|
import org.compiere.model.MLookupFactory;
|
||||||
import org.compiere.model.MProduct;
|
import org.compiere.model.MProduct;
|
||||||
import org.compiere.model.MUOM;
|
|
||||||
import org.compiere.model.MColumn;
|
import org.compiere.model.MColumn;
|
||||||
import org.compiere.model.X_C_UOM;
|
import org.compiere.model.X_C_UOM;
|
||||||
import org.eevolution.model.MPPOrder;
|
|
||||||
import org.eevolution.model.X_PP_Product_BOM;
|
import org.eevolution.model.X_PP_Product_BOM;
|
||||||
import org.eevolution.model.X_PP_Product_BOMLine;
|
import org.eevolution.model.X_PP_Product_BOMLine;
|
||||||
import org.compiere.model.X_M_Product;
|
import org.compiere.model.X_M_Product;
|
||||||
|
|
@ -64,8 +62,10 @@ import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import javax.swing.JScrollPane;
|
import javax.swing.JScrollPane;
|
||||||
import javax.swing.JSplitPane;
|
import javax.swing.JSplitPane;
|
||||||
|
|
@ -78,7 +78,6 @@ import javax.swing.event.TreeSelectionEvent;
|
||||||
import javax.swing.event.TreeSelectionListener;
|
import javax.swing.event.TreeSelectionListener;
|
||||||
import javax.swing.table.DefaultTableModel;
|
import javax.swing.table.DefaultTableModel;
|
||||||
import javax.swing.tree.DefaultMutableTreeNode;
|
import javax.swing.tree.DefaultMutableTreeNode;
|
||||||
import java.util.logging.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tree Maintenance
|
* Tree Maintenance
|
||||||
|
|
@ -87,12 +86,12 @@ import java.util.logging.*;
|
||||||
* @version $Id: VTreeMaintenance.java,v 1.1 2004/03/20 04:35:51 jjanke Exp $
|
* @version $Id: VTreeMaintenance.java,v 1.1 2004/03/20 04:35:51 jjanke Exp $
|
||||||
*
|
*
|
||||||
* 4Layers - MODIFICATIONS --------------------------------------------------------
|
* 4Layers - MODIFICATIONS --------------------------------------------------------
|
||||||
* 2005/04/12 Vorious improvements to the standard form (Sergio Ramazzina)
|
* 2005/04/12 Various improvements to the standard form (Sergio Ramazzina)
|
||||||
* 4Layers -------------------------------------------------------------------- end
|
* 4Layers -------------------------------------------------------------------- end
|
||||||
*/
|
*/
|
||||||
public class VTreeBOM extends CPanel
|
public class VTreeBOM extends CPanel implements FormPanel, ActionListener,
|
||||||
implements FormPanel, ActionListener, ListSelectionListener, PropertyChangeListener , VetoableChangeListener, TreeSelectionListener , TableModelListener
|
ListSelectionListener, PropertyChangeListener, VetoableChangeListener,
|
||||||
{
|
TreeSelectionListener, TableModelListener {
|
||||||
/**
|
/**
|
||||||
* Tree Maintenance
|
* Tree Maintenance
|
||||||
*/
|
*/
|
||||||
|
|
@ -106,50 +105,49 @@ public class VTreeBOM extends CPanel
|
||||||
private FormFrame m_frame;
|
private FormFrame m_frame;
|
||||||
/** Active Tree */
|
/** Active Tree */
|
||||||
private JTree m_tree;
|
private JTree m_tree;
|
||||||
|
|
||||||
private static CLogger log = CLogger.getCLogger(VTreeBOM.class);
|
private static CLogger log = CLogger.getCLogger(VTreeBOM.class);
|
||||||
|
|
||||||
private BorderLayout mainLayout = new BorderLayout ();
|
private BorderLayout mainLayout = new BorderLayout ();
|
||||||
private CPanel northPanel = new CPanel ();
|
private CPanel northPanel = new CPanel ();
|
||||||
|
|
||||||
private FlowLayout northLayout = new FlowLayout ();
|
private FlowLayout northLayout = new FlowLayout ();
|
||||||
private CLabel labelProduct = new CLabel ();
|
private CLabel labelProduct = new CLabel ();
|
||||||
private VLookup fieldProduct;
|
private VLookup fieldProduct;
|
||||||
//private CButton bAddAll = new CButton (Env.getImageIcon("FastBack24.gif"));
|
//private CButton bAddAll = new CButton (Env.getImageIcon("FastBack24.gif"));
|
||||||
//private CButton bAdd = new CButton (Env.getImageIcon("StepBack24.gif"));
|
//private CButton bAdd = new CButton (Env.getImageIcon("StepBack24.gif"));
|
||||||
//private CButton bDelete = new CButton (Env.getImageIcon("StepForward24.gif"));
|
//private CButton bDelete = new CButton (Env.getImageIcon("StepForward24.gif"));
|
||||||
//private CButton bDeleteAll = new CButton (Env.getImageIcon("FastForward24.gif"));
|
//private CButton bDeleteAll = new CButton (Env.getImageIcon("FastForward24.gif"));
|
||||||
private CCheckBox implotion = new CCheckBox ();
|
private CCheckBox implosion = new CCheckBox ();
|
||||||
private CLabel treeInfo = new CLabel ();
|
private CLabel treeInfo = new CLabel ();
|
||||||
//
|
//
|
||||||
private JSplitPane splitPane = new JSplitPane ();
|
private JSplitPane splitPane = new JSplitPane ();
|
||||||
//private VTreePanel centerTree;
|
//private VTreePanel centerTree;
|
||||||
//private JList centerList = new JList ();
|
//private JList centerList = new JList ();
|
||||||
private JScrollPane dataPane = new JScrollPane();
|
private JScrollPane dataPane = new JScrollPane();
|
||||||
//private CLabel labelUOM = new CLabel();
|
//private CLabel labelUOM = new CLabel();
|
||||||
//private CTextField fieldUOM = new CTextField(10);
|
//private CTextField fieldUOM = new CTextField(10);
|
||||||
//private CLabel labelDocument = new CLabel();
|
//private CLabel labelDocument = new CLabel();
|
||||||
//private CTextField fieldDocument = new CTextField(10);
|
//private CTextField fieldDocument = new CTextField(10);
|
||||||
//private CLabel labelRevision = new CLabel();
|
//private CLabel labelRevision = new CLabel();
|
||||||
//private CTextField fieldRevision = new CTextField(8);
|
//private CTextField fieldRevision = new CTextField(8);
|
||||||
//private CLabel labelECN = new CLabel();
|
//private CLabel labelECN = new CLabel();
|
||||||
//private CTextField fieldECN = new CTextField(10);
|
//private CTextField fieldECN = new CTextField(10);
|
||||||
//private VDate dateFrom = new VDate ("DateFrom", false, false, true, DisplayType.Date, Msg.translate(Env.getCtx(), "DateFrom"));
|
//private VDate dateFrom = new VDate ("DateFrom", false, false, true, DisplayType.Date, Msg.translate(Env.getCtx(), "DateFrom"));
|
||||||
//private VDate dateTo = new VDate ("DateTo", false, false, true, DisplayType.Date, Msg.translate(Env.getCtx(), "DateTo"));
|
//private VDate dateTo = new VDate ("DateTo", false, false, true, DisplayType.Date, Msg.translate(Env.getCtx(), "DateTo"));
|
||||||
private CPanel southPanel = new CPanel();
|
private CPanel southPanel = new CPanel();
|
||||||
private BorderLayout southLayout = new BorderLayout();
|
private BorderLayout southLayout = new BorderLayout();
|
||||||
private ConfirmPanel confirmPanel = new ConfirmPanel(true);
|
private ConfirmPanel confirmPanel = new ConfirmPanel(true);
|
||||||
protected StatusBar statusBar = new StatusBar();
|
protected StatusBar statusBar = new StatusBar();
|
||||||
|
|
||||||
private MiniTable tableBOM = new MiniTable();
|
private MiniTable tableBOM = new MiniTable();
|
||||||
private Vector dataBOM = new Vector();
|
private Vector<Vector<Object>> dataBOM = new Vector<Vector<Object>>();
|
||||||
private Vector layout = new Vector();
|
private Vector<String> columnNames;
|
||||||
private Vector columnNames;
|
//private VDate fieldGuaranteeDate =
|
||||||
//private VDate fieldGuaranteeDate =
|
//4Layers - Set divider location variable
|
||||||
//4Layers - Set diveder location variable
|
private final int DIVIDER_LOCATION = 240;
|
||||||
private final int DIVIDER_LOCATION = 240;
|
// 4Layers - end
|
||||||
// 4Layers - end
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize Panel
|
* Initialize Panel
|
||||||
* @param WindowNo window
|
* @param WindowNo window
|
||||||
|
|
@ -164,9 +162,9 @@ public class VTreeBOM extends CPanel
|
||||||
{
|
{
|
||||||
preInit();
|
preInit();
|
||||||
jbInit ();
|
jbInit ();
|
||||||
|
|
||||||
frame.getContentPane().add(this, BorderLayout.CENTER);
|
frame.getContentPane().add(this, BorderLayout.CENTER);
|
||||||
// frame.getContentPane().add(statusBar, BorderLayout.SOUTH);
|
// frame.getContentPane().add(statusBar, BorderLayout.SOUTH);
|
||||||
//action_loadBOM();
|
//action_loadBOM();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
@ -174,7 +172,7 @@ public class VTreeBOM extends CPanel
|
||||||
log.log(Level.SEVERE,"VTreeMaintenance.init", ex);
|
log.log(Level.SEVERE,"VTreeMaintenance.init", ex);
|
||||||
}
|
}
|
||||||
} // init
|
} // init
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fill Tree Combo
|
* Fill Tree Combo
|
||||||
*/
|
*/
|
||||||
|
|
@ -197,11 +195,9 @@ public class VTreeBOM extends CPanel
|
||||||
m_tree = new JTree(parent);
|
m_tree = new JTree(parent);
|
||||||
splitPane.add (m_tree, JSplitPane.LEFT);
|
splitPane.add (m_tree, JSplitPane.LEFT);
|
||||||
|
|
||||||
|
|
||||||
} // preInit
|
} // preInit
|
||||||
|
|
||||||
|
/**
|
||||||
/**
|
|
||||||
* Static Init.
|
* Static Init.
|
||||||
* <pre>
|
* <pre>
|
||||||
* mainPanel
|
* mainPanel
|
||||||
|
|
@ -214,70 +210,66 @@ public class VTreeBOM extends CPanel
|
||||||
* </pre>
|
* </pre>
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private void loadTableBOM()
|
private void loadTableBOM()
|
||||||
{
|
{
|
||||||
// Header Info
|
// Header Info
|
||||||
columnNames = new Vector(18);
|
columnNames = new Vector<String>(18);
|
||||||
|
|
||||||
|
columnNames.add(Msg.translate(Env.getCtx(), "Select")); // 0
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "Select")); // 0
|
columnNames.add(Msg.translate(Env.getCtx(), "IsActive")); // 1
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "IsActive")); // 1
|
columnNames.add(Msg.translate(Env.getCtx(), "Line")); // 2
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "Line")); // 2
|
columnNames.add(Msg.translate(Env.getCtx(), "ValidFrom")); // 3
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "ValidFrom")); // 3
|
columnNames.add(Msg.translate(Env.getCtx(), "ValidTo")); // 4
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "ValidTo")); // 4
|
columnNames.add(Msg.translate(Env.getCtx(), "M_Product_ID")); // 5
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "M_Product_ID")); // 5
|
columnNames.add(Msg.translate(Env.getCtx(), "C_UOM_ID")); // 6
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "C_UOM_ID")); // 6
|
columnNames.add(Msg.translate(Env.getCtx(), "IsQtyPercentage")); // 7
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "IsQtyPercentage")); // 7
|
columnNames.add(Msg.translate(Env.getCtx(), "QtyBatch")); // 8
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "QtyBatch")); // 8
|
columnNames.add(Msg.translate(Env.getCtx(), "QtyBOM")); // 9
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "QtyBOM")); // 9
|
columnNames.add(Msg.translate(Env.getCtx(), "IsCritical")); // 10
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "IsCritical")); // 10
|
columnNames.add(Msg.translate(Env.getCtx(), "LeadTimeOffset")); // 11
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "LeadTimeOffset")); // 11
|
columnNames.add(Msg.translate(Env.getCtx(), "Assay")); // 12
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "Assay")); // 12
|
columnNames.add(Msg.translate(Env.getCtx(), "Scrap")); // 13
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "Scrap")); // 13
|
columnNames.add(Msg.translate(Env.getCtx(), "IssueMethod")); // 14
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "IssueMethod")); // 14
|
columnNames.add(Msg.translate(Env.getCtx(), "BackflushGroup")); // 15
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "BackflushGroup")); // 15
|
columnNames.add(Msg.translate(Env.getCtx(), "Forecast")); // 16
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "Forecast")); // 16
|
|
||||||
|
// Remove previous listeners
|
||||||
// Remove previous listeners
|
tableBOM.getModel().removeTableModelListener(this);
|
||||||
tableBOM.getModel().removeTableModelListener(this);
|
// Remove previous listeners
|
||||||
// Remove previous listeners
|
tableBOM.getModel().removeTableModelListener(this);
|
||||||
tableBOM.getModel().removeTableModelListener(this);
|
// Set Model
|
||||||
// Set Model
|
DefaultTableModel model = new DefaultTableModel(dataBOM, columnNames);
|
||||||
DefaultTableModel model = new DefaultTableModel(dataBOM, columnNames);
|
model.addTableModelListener(this);
|
||||||
model.addTableModelListener(this);
|
tableBOM.setModel(model);
|
||||||
tableBOM.setModel(model);
|
|
||||||
|
tableBOM.setColumnClass( 0, Boolean.class, false); // 0 Select
|
||||||
tableBOM.setColumnClass( 0, Boolean.class, false); // 0 Select
|
tableBOM.setColumnClass( 1, Boolean.class, false); // 1 IsActive
|
||||||
tableBOM.setColumnClass( 1, Boolean.class, false); // 1 IsActive
|
tableBOM.setColumnClass( 2, Integer.class,false); // 2 Line
|
||||||
tableBOM.setColumnClass( 2, Integer.class,false); // 2 Line
|
tableBOM.setColumnClass( 3, Timestamp.class,false); // 3 ValidFrom
|
||||||
tableBOM.setColumnClass( 3, Timestamp.class,false); // 3 ValidFrom
|
tableBOM.setColumnClass( 4, Timestamp.class,false); // 4 ValidTo
|
||||||
tableBOM.setColumnClass( 4, Timestamp.class,false); // 4 ValidTo
|
tableBOM.setColumnClass( 5, KeyNamePair.class,false); // 5 M_Product_ID
|
||||||
tableBOM.setColumnClass( 5, KeyNamePair.class,false); // 5 M_Product_ID
|
tableBOM.setColumnClass( 6, KeyNamePair.class,false); // 6 C_UOM_ID
|
||||||
tableBOM.setColumnClass( 6, KeyNamePair.class,false); // 6 C_UOM_ID
|
tableBOM.setColumnClass( 7, Boolean.class,false); // 7 QtyPorcentage
|
||||||
tableBOM.setColumnClass( 7, Boolean.class,false); // 7 QtyPorcentage
|
tableBOM.setColumnClass( 8, BigDecimal.class,false); // 8 BatchPercent
|
||||||
tableBOM.setColumnClass( 8, BigDecimal.class,false); // 8 BatchPercent
|
tableBOM.setColumnClass( 9, BigDecimal.class,false); // 9 QtyBOM
|
||||||
tableBOM.setColumnClass( 9, BigDecimal.class,false); // 9 QtyBOM
|
tableBOM.setColumnClass( 10, Boolean.class,false); // 10 IsCritical
|
||||||
tableBOM.setColumnClass( 10, Boolean.class,false); // 10 IsCritical
|
tableBOM.setColumnClass( 11, BigDecimal.class,false); // 11 LTOffSet
|
||||||
tableBOM.setColumnClass( 11, BigDecimal.class,false); // 11 LTOffSet
|
tableBOM.setColumnClass( 12, BigDecimal.class,false); // 12 Assay
|
||||||
tableBOM.setColumnClass( 12, BigDecimal.class,false); // 12 Assay
|
tableBOM.setColumnClass( 13, Integer.class,false); // 13 Scrap
|
||||||
tableBOM.setColumnClass( 13, Integer.class,false); // 13 Scrap
|
tableBOM.setColumnClass( 14, String.class,false); // 14 IssueMethod
|
||||||
tableBOM.setColumnClass( 14, String.class,false); // 14 IssueMethod
|
tableBOM.setColumnClass( 15, String.class,false); // 15 BackflushGroup
|
||||||
tableBOM.setColumnClass( 15, String.class,false); // 15 BackflushGroup
|
tableBOM.setColumnClass( 16, BigDecimal.class,false); // 16 Forecast
|
||||||
tableBOM.setColumnClass( 16, BigDecimal.class,false); // 16 Forecast
|
tableBOM.autoSize();
|
||||||
tableBOM.autoSize();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//tableBOM.prepareTable(layout, "", "", false, "");
|
//tableBOM.prepareTable(layout, "", "", false, "");
|
||||||
|
|
||||||
// Visual
|
// Visual
|
||||||
//CompiereColor.setBackground (this);
|
//CompiereColor.setBackground (this);
|
||||||
|
|
||||||
|
|
||||||
//tableBOM.getSelectionModel().addListSelectionListener(this);
|
//tableBOM.getSelectionModel().addListSelectionListener(this);
|
||||||
} // dynInit
|
} // dynInit
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Static init
|
* Static init
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
|
@ -285,19 +277,19 @@ public class VTreeBOM extends CPanel
|
||||||
private void jbInit ()
|
private void jbInit ()
|
||||||
{
|
{
|
||||||
this.setLayout (mainLayout);
|
this.setLayout (mainLayout);
|
||||||
|
|
||||||
// 4Layers - Set initial window dimension
|
// 4Layers - Set initial window dimension
|
||||||
this.setPreferredSize(new Dimension(640, 480));
|
this.setPreferredSize(new Dimension(640, 480));
|
||||||
|
|
||||||
//labelUOM.setText (Msg.translate(Env.getCtx(), "C_UOM_ID"));
|
//labelUOM.setText (Msg.translate(Env.getCtx(), "C_UOM_ID"));
|
||||||
//fieldUOM.setEditable(false);
|
//fieldUOM.setEditable(false);
|
||||||
//labelDocument.setText (Msg.translate(Env.getCtx(), "Document"));
|
//labelDocument.setText (Msg.translate(Env.getCtx(), "Document"));
|
||||||
//labelRevision.setText (Msg.translate(Env.getCtx(), "Revision"));
|
//labelRevision.setText (Msg.translate(Env.getCtx(), "Revision"));
|
||||||
//labelECN.setText (Msg.translate(Env.getCtx(), "ECN"));
|
//labelECN.setText (Msg.translate(Env.getCtx(), "ECN"));
|
||||||
|
|
||||||
labelProduct.setText (Msg.translate(Env.getCtx(), "M_Product_ID"));
|
labelProduct.setText (Msg.translate(Env.getCtx(), "M_Product_ID"));
|
||||||
//implotion.setEnabled (false);
|
//implosion.setEnabled (false);
|
||||||
implotion.setText (Msg.translate(Env.getCtx(), "Implosion"));
|
implosion.setText (Msg.translate(Env.getCtx(), "Implosion"));
|
||||||
//treeInfo.setText (" ");
|
//treeInfo.setText (" ");
|
||||||
//bAdd.setToolTipText("Add to Tree");
|
//bAdd.setToolTipText("Add to Tree");
|
||||||
//bAddAll.setToolTipText("Add ALL to Tree");
|
//bAddAll.setToolTipText("Add ALL to Tree");
|
||||||
|
|
@ -311,45 +303,40 @@ public class VTreeBOM extends CPanel
|
||||||
northLayout.setAlignment (FlowLayout.LEFT);
|
northLayout.setAlignment (FlowLayout.LEFT);
|
||||||
//
|
//
|
||||||
this.add (northPanel, BorderLayout.NORTH);
|
this.add (northPanel, BorderLayout.NORTH);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
northPanel.add (labelProduct, null);
|
northPanel.add (labelProduct, null);
|
||||||
northPanel.add (fieldProduct, null);
|
northPanel.add (fieldProduct, null);
|
||||||
northPanel.add (implotion, null);
|
northPanel.add (implosion, null);
|
||||||
//northPanel.add (cbAllNodes, null);
|
//northPanel.add (cbAllNodes, null);
|
||||||
northPanel.add (treeInfo, null);
|
northPanel.add (treeInfo, null);
|
||||||
|
|
||||||
//northPanel.add (labelUOM, null);
|
|
||||||
//northPanel.add (fieldUOM, null);
|
|
||||||
//northPanel.add (labelDocument, null);
|
|
||||||
//northPanel.add (fieldDocument, null);
|
|
||||||
//northPanel.add (labelRevision, null);
|
|
||||||
//northPanel.add (fieldRevision, null);
|
|
||||||
//northPanel.add (fieldECN, null);
|
|
||||||
|
|
||||||
|
//northPanel.add (labelUOM, null);
|
||||||
|
//northPanel.add (fieldUOM, null);
|
||||||
|
//northPanel.add (labelDocument, null);
|
||||||
|
//northPanel.add (fieldDocument, null);
|
||||||
|
//northPanel.add (labelRevision, null);
|
||||||
|
//northPanel.add (fieldRevision, null);
|
||||||
|
//northPanel.add (fieldECN, null);
|
||||||
|
|
||||||
//northPanel.add (bAddAll, null);
|
//northPanel.add (bAddAll, null);
|
||||||
//northPanel.add (bAdd, null);
|
//northPanel.add (bAdd, null);
|
||||||
//northPanel.add (bDelete, null);
|
//northPanel.add (bDelete, null);
|
||||||
//northPanel.add (bDeleteAll, null);
|
//northPanel.add (bDeleteAll, null);
|
||||||
//
|
//
|
||||||
|
|
||||||
this.add(southPanel, BorderLayout.SOUTH);
|
this.add(southPanel, BorderLayout.SOUTH);
|
||||||
southPanel.setLayout(southLayout);
|
southPanel.setLayout(southLayout);
|
||||||
confirmPanel.addActionListener(this);
|
confirmPanel.addActionListener(this);
|
||||||
southPanel.add(confirmPanel, BorderLayout.SOUTH);
|
southPanel.add(confirmPanel, BorderLayout.SOUTH);
|
||||||
//southPanel.add(statusBar, BorderLayout.SOUTH);
|
//southPanel.add(statusBar, BorderLayout.SOUTH);
|
||||||
this.add (splitPane, BorderLayout.CENTER);
|
this.add (splitPane, BorderLayout.CENTER);
|
||||||
|
|
||||||
// 4Layers - Set divider location
|
// 4Layers - Set divider location
|
||||||
splitPane.setDividerLocation(DIVIDER_LOCATION);
|
splitPane.setDividerLocation(DIVIDER_LOCATION);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//centerList.setSelectionMode (ListSelectionModel.SINGLE_SELECTION);
|
//centerList.setSelectionMode (ListSelectionModel.SINGLE_SELECTION);
|
||||||
//centerList.addListSelectionListener(this);
|
//centerList.addListSelectionListener(this);
|
||||||
|
|
||||||
} // jbInit
|
} // jbInit
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -361,8 +348,8 @@ public class VTreeBOM extends CPanel
|
||||||
m_frame.dispose();
|
m_frame.dispose();
|
||||||
m_frame = null;
|
m_frame = null;
|
||||||
} // dispose
|
} // dispose
|
||||||
|
|
||||||
public void vetoableChange (PropertyChangeEvent e)
|
public void vetoableChange (PropertyChangeEvent e)
|
||||||
{
|
{
|
||||||
String name = e.getPropertyName();
|
String name = e.getPropertyName();
|
||||||
Object value = e.getNewValue();
|
Object value = e.getNewValue();
|
||||||
|
|
@ -373,8 +360,8 @@ public class VTreeBOM extends CPanel
|
||||||
// BPartner
|
// BPartner
|
||||||
if (name.equals("M_Product_ID"))
|
if (name.equals("M_Product_ID"))
|
||||||
{
|
{
|
||||||
if (fieldProduct != null)
|
if (fieldProduct != null)
|
||||||
action_loadBOM();
|
action_loadBOM();
|
||||||
}
|
}
|
||||||
} // vetoableChange
|
} // vetoableChange
|
||||||
|
|
||||||
|
|
@ -384,24 +371,24 @@ public class VTreeBOM extends CPanel
|
||||||
*/
|
*/
|
||||||
public void actionPerformed (ActionEvent e)
|
public void actionPerformed (ActionEvent e)
|
||||||
{
|
{
|
||||||
//System.out.println("Evento " + e.getSource());
|
//System.out.println("Event " + e.getSource());
|
||||||
//System.out.println("Source Event" + e.getSource());
|
//System.out.println("Source Event" + e.getSource());
|
||||||
if (e.getSource().equals(fieldProduct))
|
if (e.getSource().equals(fieldProduct))
|
||||||
{
|
{
|
||||||
action_loadBOM();
|
action_loadBOM();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.getActionCommand().equals(ConfirmPanel.A_OK))
|
if (e.getActionCommand().equals(ConfirmPanel.A_OK))
|
||||||
{
|
{
|
||||||
action_loadBOM();
|
action_loadBOM();
|
||||||
}
|
}
|
||||||
// 4Layers - Close window when cancel is pressed
|
// 4Layers - Close window when cancel is pressed
|
||||||
if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL))
|
if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL))
|
||||||
{
|
{
|
||||||
dispose();
|
dispose();
|
||||||
}
|
}
|
||||||
// 4Layers - End
|
// 4Layers - End
|
||||||
|
|
||||||
/*else if (e.getSource() == bAddAll)
|
/*else if (e.getSource() == bAddAll)
|
||||||
action_treeAddAll();
|
action_treeAddAll();
|
||||||
else if (e.getSource() == bAdd)
|
else if (e.getSource() == bAdd)
|
||||||
|
|
@ -410,237 +397,227 @@ public class VTreeBOM extends CPanel
|
||||||
action_treeDelete((ListItem)centerList.getSelectedValue());
|
action_treeDelete((ListItem)centerList.getSelectedValue());
|
||||||
else if (e.getSource() == bDeleteAll)
|
else if (e.getSource() == bDeleteAll)
|
||||||
action_treeDeleteAll();*/
|
action_treeDeleteAll();*/
|
||||||
//super.actionPerformed(e);
|
//super.actionPerformed(e);
|
||||||
} // actionPerformed
|
} // actionPerformed
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action: Fill Tree with all nodes
|
* Action: Fill Tree with all nodes
|
||||||
*/
|
*/
|
||||||
private void action_loadBOM()
|
private void action_loadBOM()
|
||||||
{
|
{
|
||||||
|
|
||||||
Integer Product = (Integer)fieldProduct.getValue();
|
Integer Product = (Integer)fieldProduct.getValue();
|
||||||
if (Product == null)
|
if (Product == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
int M_Product_ID = Product.intValue();
|
||||||
int M_Product_ID = Product.intValue();
|
|
||||||
|
if (M_Product_ID == 0)
|
||||||
|
return;
|
||||||
|
//System.out.println("Product ID" + Product);
|
||||||
|
X_M_Product M_Product = new X_M_Product(Env.getCtx(), M_Product_ID,"M_Product");
|
||||||
|
X_C_UOM C_UOM = new X_C_UOM(Env.getCtx() , M_Product.getC_UOM_ID(), "C_UOM");
|
||||||
|
DefaultMutableTreeNode parent = new DefaultMutableTreeNode(Msg.translate(Env.getCtx(), "M_Product_ID") + Msg.translate(Env.getCtx(), "Value") + ": " + M_Product.getValue() + " " + Msg.translate(Env.getCtx(), "Name") + ": " +M_Product.getName() + " " + Msg.translate(Env.getCtx(), "C_UOM_ID") + ": " + C_UOM.getName());
|
||||||
|
|
||||||
|
dataBOM.clear();
|
||||||
|
|
||||||
|
if (implosion.isSelected())
|
||||||
|
{
|
||||||
|
QueryDB query = new QueryDB("org.eevolution.model.X_PP_Product_BOMLine");
|
||||||
|
String filter = "M_Product_ID=" + M_Product_ID;
|
||||||
|
List<Object> results = query.execute(filter);
|
||||||
|
Iterator<Object> select = results.iterator();
|
||||||
|
while (select.hasNext())
|
||||||
|
{
|
||||||
|
X_PP_Product_BOMLine bomline = (X_PP_Product_BOMLine) select.next();
|
||||||
|
parent.add(parent(bomline));
|
||||||
|
}
|
||||||
|
m_tree = new JTree(parent);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
QueryDB query = new QueryDB("org.eevolution.model.X_PP_Product_BOM");
|
||||||
|
String filter = " IsActive='Y' AND M_Product_ID =" + M_Product_ID;
|
||||||
|
List<Object> results = query.execute(filter);
|
||||||
|
Iterator<Object> select = results.iterator();
|
||||||
|
while (select.hasNext())
|
||||||
|
{
|
||||||
|
X_PP_Product_BOM bom = (X_PP_Product_BOM) select.next();
|
||||||
|
parent.add(parent(bom));
|
||||||
|
}
|
||||||
|
|
||||||
|
m_tree = new JTree(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_tree.addTreeSelectionListener(this);
|
||||||
|
//System.out.println("number of children:" + m_tree.getRowCount());
|
||||||
|
|
||||||
|
splitPane.add (m_tree, JSplitPane.LEFT);
|
||||||
|
|
||||||
|
//System.out.println("Table size " + dataBOM.size());
|
||||||
|
|
||||||
|
loadTableBOM();
|
||||||
|
splitPane.add (new JScrollPane(dataPane), JSplitPane.RIGHT);
|
||||||
|
// 4Layers - Set divider location
|
||||||
|
splitPane.setDividerLocation(DIVIDER_LOCATION);
|
||||||
|
// 4Layers - end
|
||||||
|
dataPane.getViewport().add(tableBOM , null);
|
||||||
|
|
||||||
if (M_Product_ID == 0)
|
|
||||||
return;
|
|
||||||
//System.out.println("Product ID" + Product);
|
|
||||||
X_M_Product M_Product = new X_M_Product(Env.getCtx(), M_Product_ID,"M_Product");
|
|
||||||
X_C_UOM C_UOM = new X_C_UOM(Env.getCtx() , M_Product.getC_UOM_ID(), "C_UOM");
|
|
||||||
DefaultMutableTreeNode parent = new DefaultMutableTreeNode(Msg.translate(Env.getCtx(), "M_Product_ID") + Msg.translate(Env.getCtx(), "Value") + ": " + M_Product.getValue() + " " + Msg.translate(Env.getCtx(), "Name") + ": " +M_Product.getName() + " " + Msg.translate(Env.getCtx(), "C_UOM_ID") + ": " + C_UOM.getName());
|
|
||||||
|
|
||||||
|
|
||||||
dataBOM.clear();
|
|
||||||
|
|
||||||
if (implotion.isSelected())
|
|
||||||
{
|
|
||||||
QueryDB query = new QueryDB("org.eevolution.model.X_PP_Product_BOMLine");
|
|
||||||
String filter = "M_Product_ID=" + M_Product_ID;
|
|
||||||
java.util.List results = query.execute(filter);
|
|
||||||
Iterator select = results.iterator();
|
|
||||||
while (select.hasNext())
|
|
||||||
{
|
|
||||||
X_PP_Product_BOMLine bomline = (X_PP_Product_BOMLine) select.next();
|
|
||||||
parent.add(parent(bomline));
|
|
||||||
}
|
|
||||||
m_tree = new JTree(parent);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
QueryDB query = new QueryDB("org.eevolution.model.X_PP_Product_BOM");
|
|
||||||
String filter = " IsActive='Y' AND M_Product_ID =" + M_Product_ID;
|
|
||||||
java.util.List results = query.execute(filter);
|
|
||||||
Iterator select = results.iterator();
|
|
||||||
while (select.hasNext())
|
|
||||||
{
|
|
||||||
X_PP_Product_BOM bom = (X_PP_Product_BOM) select.next();
|
|
||||||
parent.add(parent(bom));
|
|
||||||
}
|
|
||||||
|
|
||||||
m_tree = new JTree(parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_tree.addTreeSelectionListener(this);
|
|
||||||
//System.out.println("numero de hijos:" + m_tree.getRowCount());
|
|
||||||
|
|
||||||
splitPane.add (m_tree, JSplitPane.LEFT);
|
|
||||||
|
|
||||||
//System.out.println("Tama<EFBFBD>o de la tabla " + dataBOM.size());
|
|
||||||
|
|
||||||
loadTableBOM();
|
|
||||||
splitPane.add (new JScrollPane(dataPane), JSplitPane.RIGHT);
|
|
||||||
// 4Layers - Set divider location
|
|
||||||
splitPane.setDividerLocation(DIVIDER_LOCATION);
|
|
||||||
// 4Layers - end
|
|
||||||
dataPane.getViewport().add(tableBOM , null);
|
|
||||||
|
|
||||||
} // action_fillTree
|
} // action_fillTree
|
||||||
|
|
||||||
public DefaultMutableTreeNode parent(X_PP_Product_BOMLine bomline)
|
|
||||||
{
|
|
||||||
|
|
||||||
//System.out.println("-------------------------Padre:" + bom.getName());
|
public DefaultMutableTreeNode parent(X_PP_Product_BOMLine bomline)
|
||||||
X_M_Product M_Product = new X_M_Product(Env.getCtx(), bomline.getM_Product_ID(),"M_Product");
|
{
|
||||||
X_C_UOM C_UOM = new X_C_UOM(Env.getCtx() , M_Product.getC_UOM_ID(),"C_UOM");
|
|
||||||
|
|
||||||
X_PP_Product_BOM bomproduct = new X_PP_Product_BOM(Env.getCtx(),bomline.getPP_Product_BOM_ID(),"PP_Product_BOM");
|
|
||||||
DefaultMutableTreeNode parent = new DefaultMutableTreeNode(Msg.translate(Env.getCtx(), "M_Product_ID") + Msg.translate(Env.getCtx(), "key") + ": " + M_Product.getValue() + " " + Msg.translate(Env.getCtx(), "Name") + ": " +M_Product.getName() + " " + Msg.translate(Env.getCtx(), "C_UOM_ID") + ": " + C_UOM.getName());
|
|
||||||
|
|
||||||
|
|
||||||
Vector line = new Vector(17);
|
|
||||||
line.add( new Boolean(false)); // 0 Select
|
|
||||||
line.add( new Boolean(true)); // 1 IsActive
|
|
||||||
line.add( new Integer(bomline.getLine())); // 2 Line
|
|
||||||
line.add( (Timestamp) bomline.getValidFrom()); // 3 ValidDrom
|
|
||||||
line.add( (Timestamp) bomline.getValidTo()); // 4 ValidTo
|
|
||||||
KeyNamePair pp = new KeyNamePair(M_Product.getM_Product_ID(),M_Product.getName());
|
|
||||||
line.add(pp); // 5 M_Product_ID
|
|
||||||
KeyNamePair uom = new KeyNamePair(bomline.getC_UOM_ID(),"");
|
|
||||||
line.add(uom); // 6 C_UOM_ID
|
|
||||||
line.add(new Boolean(bomline.isQtyPercentage())); // 7 IsQtyPorcentage
|
|
||||||
line.add((BigDecimal) bomline.getQtyBatch()); // 8 BatchPercent
|
|
||||||
line.add((BigDecimal) ((bomline.getQtyBOM()!=null) ? bomline.getQtyBOM() : new BigDecimal(0))); // 9 QtyBOM
|
|
||||||
line.add(new Boolean(bomline.isCritical())); // 10 IsCritical
|
|
||||||
line.add( (Integer) bomline.getLeadTimeOffset()); // 11 LTOffSet
|
|
||||||
line.add( (BigDecimal) bomline.getAssay()); // 12 Assay
|
|
||||||
line.add( (BigDecimal) (bomline.getScrap())); // 13 Scrap
|
|
||||||
line.add( (String) bomline.getIssueMethod()); // 14 IssueMethod
|
|
||||||
line.add( (String) bomline.getBackflushGroup()); // 15 BackflushGroup
|
|
||||||
line.add( (BigDecimal) bomline.getForecast()); // 16 Forecast
|
|
||||||
dataBOM.add(line);
|
|
||||||
|
|
||||||
QueryDB query = new QueryDB("org.eevolution.model.X_PP_Product_BOM");
|
//System.out.println("-------------------------Parent:" + bom.getName());
|
||||||
String filter = "M_Product_ID = " + bomproduct.getM_Product_ID();
|
X_M_Product M_Product = new X_M_Product(Env.getCtx(), bomline.getM_Product_ID(),"M_Product");
|
||||||
java.util.List results = query.execute(filter);
|
X_C_UOM C_UOM = new X_C_UOM(Env.getCtx() , M_Product.getC_UOM_ID(),"C_UOM");
|
||||||
Iterator select = results.iterator();
|
|
||||||
while (select.hasNext())
|
X_PP_Product_BOM bomproduct = new X_PP_Product_BOM(Env.getCtx(),bomline.getPP_Product_BOM_ID(),"PP_Product_BOM");
|
||||||
{
|
DefaultMutableTreeNode parent = new DefaultMutableTreeNode(Msg.translate(Env.getCtx(), "M_Product_ID") + Msg.translate(Env.getCtx(), "key") + ": " + M_Product.getValue() + " " + Msg.translate(Env.getCtx(), "Name") + ": " +M_Product.getName() + " " + Msg.translate(Env.getCtx(), "C_UOM_ID") + ": " + C_UOM.getName());
|
||||||
X_PP_Product_BOM bom = (X_PP_Product_BOM) select.next();
|
|
||||||
X_M_Product component = new X_M_Product(Env.getCtx(), bom.getM_Product_ID(),"M_Product");
|
Vector<Object> line = new Vector<Object>(17);
|
||||||
return component(component);
|
line.add( new Boolean(false)); // 0 Select
|
||||||
}
|
line.add( new Boolean(true)); // 1 IsActive
|
||||||
return parent;
|
line.add( new Integer(bomline.getLine())); // 2 Line
|
||||||
}
|
line.add( (Timestamp) bomline.getValidFrom()); // 3 ValidDrom
|
||||||
|
line.add( (Timestamp) bomline.getValidTo()); // 4 ValidTo
|
||||||
public DefaultMutableTreeNode parent(X_PP_Product_BOM bom)
|
KeyNamePair pp = new KeyNamePair(M_Product.getM_Product_ID(),M_Product.getName());
|
||||||
{
|
line.add(pp); // 5 M_Product_ID
|
||||||
|
KeyNamePair uom = new KeyNamePair(bomline.getC_UOM_ID(),"");
|
||||||
|
line.add(uom); // 6 C_UOM_ID
|
||||||
|
line.add(new Boolean(bomline.isQtyPercentage())); // 7 IsQtyPorcentage
|
||||||
|
line.add((BigDecimal) bomline.getQtyBatch()); // 8 BatchPercent
|
||||||
|
line.add((BigDecimal) ((bomline.getQtyBOM()!=null) ? bomline.getQtyBOM() : new BigDecimal(0))); // 9 QtyBOM
|
||||||
|
line.add(new Boolean(bomline.isCritical())); // 10 IsCritical
|
||||||
|
line.add( (Integer) bomline.getLeadTimeOffset()); // 11 LTOffSet
|
||||||
|
line.add( (BigDecimal) bomline.getAssay()); // 12 Assay
|
||||||
|
line.add( (BigDecimal) (bomline.getScrap())); // 13 Scrap
|
||||||
|
line.add( (String) bomline.getIssueMethod()); // 14 IssueMethod
|
||||||
|
line.add( (String) bomline.getBackflushGroup()); // 15 BackflushGroup
|
||||||
|
line.add( (BigDecimal) bomline.getForecast()); // 16 Forecast
|
||||||
|
dataBOM.add(line);
|
||||||
|
|
||||||
|
QueryDB query = new QueryDB("org.eevolution.model.X_PP_Product_BOM");
|
||||||
|
String filter = "M_Product_ID = " + bomproduct.getM_Product_ID();
|
||||||
|
List<Object> results = query.execute(filter);
|
||||||
|
Iterator<Object> select = results.iterator();
|
||||||
|
while (select.hasNext())
|
||||||
|
{
|
||||||
|
X_PP_Product_BOM bom = (X_PP_Product_BOM) select.next();
|
||||||
|
X_M_Product component = new X_M_Product(Env.getCtx(), bom.getM_Product_ID(),"M_Product");
|
||||||
|
return component(component);
|
||||||
|
}
|
||||||
|
return parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DefaultMutableTreeNode parent(X_PP_Product_BOM bom)
|
||||||
|
{
|
||||||
|
|
||||||
|
// System.out.println("Parent:" + bom.getName());
|
||||||
|
// X_M_Product product = new X_M_Product(Env.getCtx(), bom.getM_Product_ID(),"M_Product");
|
||||||
|
|
||||||
|
//vparent.setValue(m_product_id);
|
||||||
|
String data = Msg.translate(Env.getCtx(), "PP_Product_BOM_ID") + " " + Msg.translate(Env.getCtx(), "Value") + ":"+ bom.getValue()+ " " + Msg.translate(Env.getCtx(), "Name") + ": " + bom.getName();
|
||||||
|
DefaultMutableTreeNode parent = new DefaultMutableTreeNode(data);
|
||||||
|
|
||||||
|
QueryDB query = new QueryDB("org.eevolution.model.X_PP_Product_BOMLine");
|
||||||
|
String filter = "PP_Product_BOM_ID=" + bom.getPP_Product_BOM_ID();
|
||||||
|
List<Object> results = query.execute(filter);
|
||||||
|
Iterator<Object> select = results.iterator();
|
||||||
|
while (select.hasNext())
|
||||||
|
{
|
||||||
|
X_PP_Product_BOMLine bomline = (X_PP_Product_BOMLine) select.next();
|
||||||
|
X_M_Product component = new X_M_Product(Env.getCtx(), bomline.getM_Product_ID(),"M_Product");
|
||||||
|
//System.out.println("Componente :" + component.getValue() + "[" + component.getName() + "]");
|
||||||
|
//component(component);
|
||||||
|
Vector<Object> line = new Vector<Object>(17);
|
||||||
|
line.add( new Boolean(false)); // 0 Select
|
||||||
|
line.add( new Boolean(true)); // 1 IsActive
|
||||||
|
line.add( new Integer(bomline.getLine())); // 2 Line
|
||||||
|
line.add( (Timestamp) bomline.getValidFrom()); // 3 ValidDrom
|
||||||
|
line.add( (Timestamp) bomline.getValidTo()); // 4 ValidTo
|
||||||
|
KeyNamePair pp = new KeyNamePair(component.getM_Product_ID(),component.getName());
|
||||||
|
line.add(pp); // 5 M_Product_ID
|
||||||
|
KeyNamePair uom = new KeyNamePair(bomline.getC_UOM_ID(),"");
|
||||||
|
line.add(uom); // 6 C_UOM_ID
|
||||||
|
line.add(new Boolean(bomline.isQtyPercentage())); // 7 IsQtyPercentage
|
||||||
|
line.add((BigDecimal) bomline.getQtyBatch()); // 8 BatchPercent
|
||||||
|
line.add((BigDecimal) bomline.getQtyBOM()); // 9 QtyBom
|
||||||
|
line.add(new Boolean(bomline.isCritical())); // 10 IsCritical
|
||||||
|
line.add( (Integer) bomline.getLeadTimeOffset()); // 11 LTOffSet
|
||||||
|
line.add( (BigDecimal) bomline.getAssay()); // 12 Assay
|
||||||
|
line.add( (BigDecimal) (bomline.getScrap())); // 13 Scrap
|
||||||
|
line.add( (String) bomline.getIssueMethod()); // 14 IssueMethod
|
||||||
|
line.add( (String) bomline.getBackflushGroup()); // 15 BackflushGroup
|
||||||
|
line.add( (BigDecimal) bomline.getForecast()); // 16 Forecast
|
||||||
|
//line.add(this.);
|
||||||
|
dataBOM.add(line);
|
||||||
|
parent.add(component(component));
|
||||||
|
|
||||||
|
}
|
||||||
|
return parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DefaultMutableTreeNode component(X_M_Product M_Product)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (implosion.isSelected())
|
||||||
|
{
|
||||||
|
//vparent.setValue(m_product_id);
|
||||||
|
//String data = Msg.translate(Env.getCtx(), "PP_ProductBOM_ID") + ":" + Msg.translate(Env.getCtx(), "Search Key") + ":"+ bom.getValue()+ " " + Msg.translate(Env.getCtx(), "Name") + ": " + bom.getName();
|
||||||
|
X_C_UOM C_UOM = new X_C_UOM(Env.getCtx(), M_Product.getC_UOM_ID(), "C_UOM");
|
||||||
|
DefaultMutableTreeNode parent = new DefaultMutableTreeNode(Msg.translate(Env.getCtx(), "M_Product_ID") + Msg.translate(Env.getCtx(), "Value") + ": " + M_Product.getValue() + " " + Msg.translate(Env.getCtx(), "Name") + ": " +M_Product.getName() + " " + Msg.translate(Env.getCtx(), "C_UOM_ID") + ": " + C_UOM.getName());
|
||||||
|
|
||||||
|
//System.out.print("Componet Product:" + M_Product.getName());
|
||||||
|
QueryDB query = new QueryDB("org.eevolution.model.X_PP_Product_BOMLine");
|
||||||
|
String filter = "M_Product_ID=" + M_Product.getM_Product_ID();
|
||||||
|
List<Object> results = query.execute(filter);
|
||||||
|
Iterator<Object> select = results.iterator();
|
||||||
|
while (select.hasNext())
|
||||||
|
{
|
||||||
|
X_PP_Product_BOMLine bomline = (X_PP_Product_BOMLine) select.next();
|
||||||
|
//System.out.print("--------------------------------------Componet BOM:" + bom.getName());
|
||||||
|
parent.add(parent(bomline));
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//System.out.print("--------------------------------------Component Product:" + M_Product.getName());
|
||||||
|
QueryDB query = new QueryDB("org.eevolution.model.X_PP_Product_BOM");
|
||||||
|
String filter = "Value='" + M_Product.getValue() + "'";
|
||||||
|
X_C_UOM C_UOM = new X_C_UOM(Env.getCtx() , M_Product.getC_UOM_ID(),"C_UOM");
|
||||||
|
List<Object> results = query.execute(filter);
|
||||||
|
Iterator<Object> select = results.iterator();
|
||||||
|
while (select.hasNext())
|
||||||
|
{
|
||||||
|
X_PP_Product_BOM bom = (X_PP_Product_BOM) select.next();
|
||||||
|
//System.out.print("--------------------------------------Component BOM:" + bom.getName());
|
||||||
|
return parent(bom);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new DefaultMutableTreeNode(Msg.translate(Env.getCtx(), "Value") + ": " + M_Product.getValue() + " " + Msg.translate(Env.getCtx(), "Name") + ": " +M_Product.getName() + " " + Msg.translate(Env.getCtx(), "C_UOM_ID") + ": " + C_UOM.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void valueChanged(TreeSelectionEvent event)
|
||||||
|
{
|
||||||
|
//currentSelectionField.setText("Current Selection: " + tree.getLastSelectedPathComponent().toString());
|
||||||
|
}
|
||||||
|
|
||||||
//System.out.println("Padre:" + bom.getName());
|
|
||||||
X_M_Product product = new X_M_Product(Env.getCtx(), bom.getM_Product_ID(),"M_Product");
|
|
||||||
|
|
||||||
//vparent.setValue(m_product_id);
|
|
||||||
String data = Msg.translate(Env.getCtx(), "PP_Product_BOM_ID") + " " + Msg.translate(Env.getCtx(), "Value") + ":"+ bom.getValue()+ " " + Msg.translate(Env.getCtx(), "Name") + ": " + bom.getName();
|
|
||||||
DefaultMutableTreeNode parent = new DefaultMutableTreeNode(data);
|
|
||||||
|
|
||||||
QueryDB query = new QueryDB("org.eevolution.model.X_PP_Product_BOMLine");
|
|
||||||
String filter = "PP_Product_BOM_ID=" + bom.getPP_Product_BOM_ID();
|
|
||||||
java.util.List results = query.execute(filter);
|
|
||||||
Iterator select = results.iterator();
|
|
||||||
while (select.hasNext())
|
|
||||||
{
|
|
||||||
X_PP_Product_BOMLine bomline = (X_PP_Product_BOMLine) select.next();
|
|
||||||
X_M_Product component = new X_M_Product(Env.getCtx(), bomline.getM_Product_ID(),"M_Product");
|
|
||||||
//System.out.println("Componente :" + component.getValue() + "[" + component.getName() + "]");
|
|
||||||
//component(component);
|
|
||||||
Vector line = new Vector(17);
|
|
||||||
line.add( new Boolean(false)); // 0 Select
|
|
||||||
line.add( new Boolean(true)); // 1 IsActive
|
|
||||||
line.add( new Integer(bomline.getLine())); // 2 Line
|
|
||||||
line.add( (Timestamp) bomline.getValidFrom()); // 3 ValidDrom
|
|
||||||
line.add( (Timestamp) bomline.getValidTo()); // 4 ValidTo
|
|
||||||
KeyNamePair pp = new KeyNamePair(component.getM_Product_ID(),component.getName());
|
|
||||||
line.add(pp); // 5 M_Product_ID
|
|
||||||
KeyNamePair uom = new KeyNamePair(bomline.getC_UOM_ID(),"");
|
|
||||||
line.add(uom); // 6 C_UOM_ID
|
|
||||||
line.add(new Boolean(bomline.isQtyPercentage())); // 7 IsQtyPercentage
|
|
||||||
line.add((BigDecimal) bomline.getQtyBatch()); // 8 BatchPercent
|
|
||||||
line.add((BigDecimal) bomline.getQtyBOM()); // 9 QtyBom
|
|
||||||
line.add(new Boolean(bomline.isCritical())); // 10 IsCritical
|
|
||||||
line.add( (Integer) bomline.getLeadTimeOffset()); // 11 LTOffSet
|
|
||||||
line.add( (BigDecimal) bomline.getAssay()); // 12 Assay
|
|
||||||
line.add( (BigDecimal) (bomline.getScrap())); // 13 Scrap
|
|
||||||
line.add( (String) bomline.getIssueMethod()); // 14 IssueMethod
|
|
||||||
line.add( (String) bomline.getBackflushGroup()); // 15 BackflushGroup
|
|
||||||
line.add( (BigDecimal) bomline.getForecast()); // 16 Forecast
|
|
||||||
//line.add(this.);
|
|
||||||
dataBOM.add(line);
|
|
||||||
parent.add(component(component));
|
|
||||||
|
|
||||||
}
|
|
||||||
return parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public DefaultMutableTreeNode component(X_M_Product M_Product)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (implotion.isSelected())
|
|
||||||
{
|
|
||||||
//vparent.setValue(m_product_id);
|
|
||||||
//String data = Msg.translate(Env.getCtx(), "PP_ProductBOM_ID") + ":" + Msg.translate(Env.getCtx(), "Search Key") + ":"+ bom.getValue()+ " " + Msg.translate(Env.getCtx(), "Name") + ": " + bom.getName();
|
|
||||||
X_C_UOM C_UOM = new X_C_UOM(Env.getCtx() , M_Product.getC_UOM_ID(),"C_UOM");
|
|
||||||
DefaultMutableTreeNode parent = new DefaultMutableTreeNode(Msg.translate(Env.getCtx(), "M_Product_ID") + Msg.translate(Env.getCtx(), "Value") + ": " + M_Product.getValue() + " " + Msg.translate(Env.getCtx(), "Name") + ": " +M_Product.getName() + " " + Msg.translate(Env.getCtx(), "C_UOM_ID") + ": " + C_UOM.getName());
|
|
||||||
|
|
||||||
//System.out.print("Componet Product:" + M_Product.getName());
|
|
||||||
QueryDB query = new QueryDB("org.eevolution.model.X_PP_Product_BOMLine");
|
|
||||||
String filter = "M_Product_ID=" + M_Product.getM_Product_ID();
|
|
||||||
java.util.List results = query.execute(filter);
|
|
||||||
Iterator select = results.iterator();
|
|
||||||
while (select.hasNext())
|
|
||||||
{
|
|
||||||
X_PP_Product_BOMLine bomline = (X_PP_Product_BOMLine) select.next();
|
|
||||||
//System.out.print("--------------------------------------Componet BOM:" + bom.getName());
|
|
||||||
parent.add(parent(bomline));
|
|
||||||
}
|
|
||||||
|
|
||||||
return parent;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//System.out.print("--------------------------------------Componet Product:" + M_Product.getName());
|
|
||||||
QueryDB query = new QueryDB("org.eevolution.model.X_PP_Product_BOM");
|
|
||||||
String filter = "Value='" + M_Product.getValue() + "'";
|
|
||||||
X_C_UOM C_UOM = new X_C_UOM(Env.getCtx() , M_Product.getC_UOM_ID(),"C_UOM");
|
|
||||||
java.util.List results = query.execute(filter);
|
|
||||||
Iterator select = results.iterator();
|
|
||||||
while (select.hasNext())
|
|
||||||
{
|
|
||||||
X_PP_Product_BOM bom = (X_PP_Product_BOM) select.next();
|
|
||||||
//System.out.print("--------------------------------------Componet BOM:" + bom.getName());
|
|
||||||
return parent(bom);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new DefaultMutableTreeNode(Msg.translate(Env.getCtx(), "Value") + ": " + M_Product.getValue() + " " + Msg.translate(Env.getCtx(), "Name") + ": " +M_Product.getName() + " " + Msg.translate(Env.getCtx(), "C_UOM_ID") + ": " + C_UOM.getName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void valueChanged(TreeSelectionEvent event)
|
|
||||||
{
|
|
||||||
//currentSelectionField.setText("Current Selection: " + tree.getLastSelectedPathComponent().toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List Selection Listener
|
* List Selection Listener
|
||||||
* @param e event
|
* @param e event
|
||||||
*/
|
*/
|
||||||
public void valueChanged (ListSelectionEvent e)
|
public void valueChanged (ListSelectionEvent e)
|
||||||
{
|
{
|
||||||
|
if (e.getValueIsAdjusting())
|
||||||
|
|
||||||
|
|
||||||
if (e.getValueIsAdjusting())
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
} // valueChanged
|
} // valueChanged
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* VTreePanel Changed
|
* VTreePanel Changed
|
||||||
* @param e event
|
* @param e event
|
||||||
|
|
@ -665,7 +642,7 @@ public class VTreeBOM extends CPanel
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action: Add Node to Tree
|
* Action: Add Node to Tree
|
||||||
*/
|
*/
|
||||||
private void action_treeAdd(ListItem item)
|
private void action_treeAdd(ListItem item)
|
||||||
{
|
{
|
||||||
log.info( "VTreeMaintenance.action_treeAdd " + item);
|
log.info( "VTreeMaintenance.action_treeAdd " + item);
|
||||||
|
|
@ -673,7 +650,7 @@ public class VTreeBOM extends CPanel
|
||||||
{
|
{
|
||||||
//centerTree.nodeChanged(true, item.id, item.name,
|
//centerTree.nodeChanged(true, item.id, item.name,
|
||||||
// item.description, item.isSummary, item.imageIndicator);
|
// item.description, item.isSummary, item.imageIndicator);
|
||||||
/* if (m_tree.isProduct())
|
/* if (m_tree.isProduct())
|
||||||
{
|
{
|
||||||
MTree_NodePR node = new MTree_NodePR (m_tree, item.id);
|
MTree_NodePR node = new MTree_NodePR (m_tree, item.id);
|
||||||
node.save();
|
node.save();
|
||||||
|
|
@ -695,7 +672,7 @@ public class VTreeBOM extends CPanel
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
} // action_treeAdd
|
} // action_treeAdd
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action: Delete Node from Tree
|
* Action: Delete Node from Tree
|
||||||
*/
|
*/
|
||||||
|
|
@ -732,11 +709,11 @@ public class VTreeBOM extends CPanel
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
} // action_treeDelete
|
} // action_treeDelete
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action: Add All Nodes to Tree
|
* Action: Add All Nodes to Tree
|
||||||
*/
|
*/
|
||||||
private void action_treeAddAll()
|
private void action_treeAddAll()
|
||||||
{
|
{
|
||||||
log.info( "VTreeMaintenance.action_treeAddAll");
|
log.info( "VTreeMaintenance.action_treeAddAll");
|
||||||
|
|
@ -749,10 +726,10 @@ public class VTreeBOM extends CPanel
|
||||||
action_treeAdd(item);
|
action_treeAdd(item);
|
||||||
}*/
|
}*/
|
||||||
} // action_treeAddAll
|
} // action_treeAddAll
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action: Delete All Nodes from Tree
|
* Action: Delete All Nodes from Tree
|
||||||
*/
|
*/
|
||||||
private void action_treeDeleteAll()
|
private void action_treeDeleteAll()
|
||||||
{
|
{
|
||||||
log.info( "VTreeMaintenance.action_treeDeleteAll");
|
log.info( "VTreeMaintenance.action_treeDeleteAll");
|
||||||
|
|
@ -765,13 +742,13 @@ public class VTreeBOM extends CPanel
|
||||||
action_treeDelete(item);
|
action_treeDelete(item);
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void tableChanged(TableModelEvent e) {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
public void tableChanged(TableModelEvent e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// action_treeDeleteAll
|
// action_treeDeleteAll
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* Tree Maintenance List Item
|
* Tree Maintenance List Item
|
||||||
*/
|
*/
|
||||||
|
|
@ -785,13 +762,13 @@ public class VTreeBOM extends CPanel
|
||||||
this.isSummary = isSummary;
|
this.isSummary = isSummary;
|
||||||
this.imageIndicator = imageIndicator;
|
this.imageIndicator = imageIndicator;
|
||||||
} // ListItem
|
} // ListItem
|
||||||
|
|
||||||
public int id;
|
public int id;
|
||||||
public String name;
|
public String name;
|
||||||
public String description;
|
public String description;
|
||||||
public boolean isSummary;
|
public boolean isSummary;
|
||||||
public String imageIndicator; // Menu - Action
|
public String imageIndicator; // Menu - Action
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To String
|
* To String
|
||||||
* @return String Representation
|
* @return String Representation
|
||||||
|
|
@ -803,7 +780,7 @@ public class VTreeBOM extends CPanel
|
||||||
retValue += " (" + description + ")";
|
retValue += " (" + description + ")";
|
||||||
return retValue;
|
return retValue;
|
||||||
} // toString
|
} // toString
|
||||||
|
|
||||||
} // ListItem
|
} // ListItem
|
||||||
|
|
||||||
} // VTreeMaintenance
|
} // VTreeMaintenance
|
||||||
Loading…
Reference in New Issue