Class TreeBOM<T>

java.lang.Object
org.compiere.apps.form.TreeBOM<T>
Type Parameters:
T - Tree Node type
Direct Known Subclasses:
WTreeBOM

public class TreeBOM<T> extends Object
Form to view BOM tree.
  • Field Details

    • log

      public static final CLogger log
    • dataBOM

      protected Vector<Vector<Object>> dataBOM
      Child components of current selected product
    • m_selectedId

      protected int m_selectedId
      M_Product_ID of selected tree node
  • Constructor Details

    • TreeBOM

      public TreeBOM()
  • Method Details

    • getCtx

      public Properties getCtx()
    • productSummary

      public String productSummary(MProduct product, boolean isLeaf)
      Get Product Summary
      Parameters:
      product - Product
      isLeaf - is Leaf
      Returns:
      Product Summary (Value_Name[UOM])
    • productSummary

      public String productSummary(MPPProductBOM bom)
      Get BOM Summary
      Parameters:
      bom - Product BOM
      Returns:
      BOM Summary (Value_Name)
    • setColumnClass

      public void setColumnClass(IMiniTable table)
      Set class type for table
      Parameters:
      table -
      See Also:
    • getColumnNames

      public Vector<String> getColumnNames()
      Get column names for dataBOM
      Returns:
      column names
    • newProductLine

      protected Vector<Object> newProductLine(MProduct product, int lineNo, BigDecimal qty)
      New product line
      Parameters:
      product -
      lineNo -
      Returns:
      product line
    • loadBOM

      public void loadBOM(MProduct product, T parent, Function<TreeBOM.NewNodeArguments<T>,T> createNewNodeFunction, boolean implosion, boolean reload)
      Load BOM
      Parameters:
      product -
      parent - parent node
      createNewNodeFunction -
      implosion -
      reload -
    • addParent

      protected void addParent(MPPProductBOMLine bomline, T parent, Function<TreeBOM.NewNodeArguments<T>,T> createNewNodeFunction, boolean reload)
      Add BOM line that is using selected product as component
      Parameters:
      bomline -
      parent - parent tree node
      createNewNodeFunction -
      reload -
    • addChild

      protected void addChild(MPPProductBOMLine bomline, T parent, Function<TreeBOM.NewNodeArguments<T>,T> createNewNodeFunction, boolean reload)
      Add child BOM line of selected product
      Parameters:
      bomline -
      parent - parent tree node
      createNewNodeFunction -
      reload -
    • getDataBOM

      public List<Vector<Object>> getDataBOM()
      Get immutable BOM lines of current selected product
      Returns:
      bom lines