Package org.openswing.swing.tree.java

Examples of org.openswing.swing.tree.java.OpenSwingTreeNode


              )/2));

                if (num==1)
                  vo.setCopyNode(true);
            }
            newDragNode = new OpenSwingTreeNode(vo);
          }


          // call server side...
          Response res = ClientUtils.getData(
View Full Code Here


            vo.setEnabledHIE03("Y");
            vo.setLevelHIE03(rset.getBigDecimal(3));
            vo.setProgressiveHIE03(rset.getBigDecimal(1));
            vo.setProgressiveHie03HIE03(rset.getBigDecimal(2));
            vo.setProgressiveHie04HIE03(new BigDecimal(2));
            currentNode = new OpenSwingTreeNode(vo);
            model = new DefaultTreeModel(currentNode);
          }
          else {
            vo = new HierarchyLevelVO();
            vo.setDescriptionSYS10(rset.getString(4));
            vo.setEnabledHIE03("Y");
            vo.setLevelHIE03(rset.getBigDecimal(3));
            vo.setProgressiveHIE03(rset.getBigDecimal(1));
            vo.setProgressiveHie03HIE03(rset.getBigDecimal(2));
            vo.setProgressiveHie04HIE03(new BigDecimal(2));
            currentNode = new OpenSwingTreeNode(vo);

            parentNode = (DefaultMutableTreeNode)currentLevelNodes.get(new Integer(rset.getInt(2)));
            parentNode.add(currentNode);
          }
View Full Code Here

            vo.setProgressiveHIE03(rset.getBigDecimal(1));
            vo.setProgressiveHie03HIE03(rset.getBigDecimal(2));
            vo.setProgressiveHie04HIE03(progressiveHIE04);
            vo.setDescriptionSYS10(rset.getString(4));
            vo.setProgressiveHie03HIE04(rset.getBigDecimal(5));
            currentNode = new OpenSwingTreeNode(vo);
            model = new DefaultTreeModel(currentNode);
          }
          else {
            vo = new HierarchyLevelVO();
            vo.setEnabledHIE03("Y");
            vo.setLevelHIE03(rset.getBigDecimal(3));
            vo.setProgressiveHIE03(rset.getBigDecimal(1));
            vo.setProgressiveHie03HIE03(rset.getBigDecimal(2));
            vo.setProgressiveHie04HIE03(progressiveHIE04);
            vo.setDescriptionSYS10(rset.getString(4));
            vo.setProgressiveHie03HIE04(rset.getBigDecimal(5));
            currentNode = new OpenSwingTreeNode(vo);

            parentNode = (DefaultMutableTreeNode)currentLevelNodes.get(new Integer(rset.getInt(2)));
            parentNode.add(currentNode);
          }
View Full Code Here

                  try {
                    CompanyHierarchyLevelVO newVO = (CompanyHierarchyLevelVO)((CompanyHierarchyLevelVO)selNode.getUserObject()).clone();
                    newVO.setProgressiveHie01HIE01(newVO.getProgressiveHIE01());
                    newVO.setLevelHIE01(newVO.getLevelHIE01().add(new BigDecimal(1)));
                    newVO.setDescriptionSYS10(value);
                    DefaultMutableTreeNode newNode = new OpenSwingTreeNode(newVO);
                    Response response = ClientUtils.getData("companyInsertLevel",newVO);
                    if (!response.isError()) {
                      newNode.setUserObject(((VOResponse)response).getVo());
                      selNode.add(newNode);
                      repaintTree();
                   }
                   else
                     JOptionPane.showMessageDialog(
View Full Code Here

            vo.setProgressiveHIE01(rset.getBigDecimal(1));
            vo.setProgressiveHie01HIE01(rset.getBigDecimal(2));
            vo.setProgressiveHie02HIE01(progressiveHIE02);
            vo.setDescriptionSYS10(rset.getString(4));
            vo.setProgressiveHie01HIE02(rset.getBigDecimal(5));
            currentNode = new OpenSwingTreeNode(vo);
            model = new DefaultTreeModel(currentNode);
          }
          else {
            vo = new CompanyHierarchyLevelVO();
            vo.setCompanySys01HIE01(companyCodeSys01);
            vo.setEnabledHIE01("Y");
            vo.setLevelHIE01(rset.getBigDecimal(3));
            vo.setProgressiveHIE01(rset.getBigDecimal(1));
            vo.setProgressiveHie01HIE01(rset.getBigDecimal(2));
            vo.setProgressiveHie02HIE01(progressiveHIE02);
            vo.setDescriptionSYS10(rset.getString(4));
            vo.setProgressiveHie01HIE02(rset.getBigDecimal(5));
            currentNode = new OpenSwingTreeNode(vo);

            parentNode = (DefaultMutableTreeNode)currentLevelNodes.get(new Integer(rset.getInt(2)));
            parentNode.add(currentNode);
          }
View Full Code Here

            newLevelNodes = new Hashtable();
          }

          if (currentLevel==0) {
            // prepare a tree model with the root node...
            currentNode = new OpenSwingTreeNode();
            model = new DefaultTreeModel(currentNode);
          }
          else {
            currentNode = new ApplicationFunction(rset.getString(4),null);
View Full Code Here

      MaterialVO compVO = new MaterialVO();
      compVO.setCompanyCodeSys01ITM03(pk.getCompanyCodeSys01ITM01());
      compVO.setDescriptionSYS10("");
      compVO.setItemCodeItm01ITM03(pk.getItemCodeITM01());
      compVO.setQtyITM03(new BigDecimal(1));
      DefaultMutableTreeNode node = new OpenSwingTreeNode(compVO);
      DefaultTreeModel model = new DefaultTreeModel(node);

      String sql2 = "'" + pk.getItemCodeITM01() + "'";
      ArrayList nodes = new ArrayList();
      ArrayList nodes2 = new ArrayList(); // current nodes...
      Hashtable auxnodes = new Hashtable();
      nodes.add(node);

      // read from ITM03 table...
      Response res = null;
      java.util.List rows = null;
      java.util.List auxlist = null;
      DefaultMutableTreeNode auxnode,auxnode2 = null;
      String currentItemCode = null;

      do {
        res = QueryUtil.getQuery(
            conn,
            new UserSessionParameters(username),
            sql1+sql2+sql3,
            values,
            attribute2dbField,
            MaterialVO.class,
            "Y",
            "N",
            null,
            new GridParams(),
            true
        );
        if (!res.isError()) {
          rows = ((VOListResponse)res).getRows();
          auxnodes.clear();
          nodes2 = new ArrayList();
          sql2 = "";

          // group items per item code parent...
          for(int i=0;i<rows.size();i++) {
            compVO = (MaterialVO)rows.get(i);
            sql2 += "'"+compVO.getItemCodeItm01ITM03()+"',";
            auxnode = new OpenSwingTreeNode(compVO);
            auxlist = (ArrayList)auxnodes.get(compVO.getParentItemCodeItm01ITM03());
            if (auxlist==null) {
              auxlist = new ArrayList();
              auxnodes.put(compVO.getParentItemCodeItm01ITM03(),auxlist);
            }
View Full Code Here

      MaterialVO rootVO = new MaterialVO();
      rootVO.setCompanyCodeSys01ITM03(pk.getCompanyCodeSys01ITM01());
      rootVO.setDescriptionSYS10("");
      rootVO.setParentItemCodeItm01ITM03("");
      rootVO.setItemCodeItm01ITM03("");
      DefaultMutableTreeNode root = new OpenSwingTreeNode(rootVO);
      DefaultTreeModel model = new DefaultTreeModel(root);

      String sql2 = "'" + pk.getItemCodeITM01() + "'";

      // read from ITM03 table...
      Response res = null;
      java.util.List rows = null;
      DefaultMutableTreeNode auxnode,auxnode2;
      MaterialVO auxVO = null;
      Hashtable nodes = new Hashtable(); // collections of <item component code,related node>
      Hashtable auxnodes = new Hashtable(); // collections of <item component code,related node>
      Enumeration en = null;

      do {
        res = QueryUtil.getQuery(
            conn,
            new UserSessionParameters(username),
            sql1+sql2+sql3,
            values,
            attribute2dbField,
            MaterialVO.class,
            "Y",
            "N",
            null,
            new GridParams(),
            true
        );
        if (!res.isError()) {
          rows = ((VOListResponse)res).getRows();

          sql2 = "";

          for(int i=0;i<rows.size();i++) {
            auxVO = (MaterialVO)rows.get(i);
            sql2 += "'"+auxVO.getParentItemCodeItm01ITM03()+"',";
            auxnode = new OpenSwingTreeNode(auxVO);
            auxnode2 = (DefaultMutableTreeNode)nodes.get(auxVO.getItemCodeItm01ITM03());
            if (auxnode2!=null)
              auxnode.add(auxnode2);
            nodes.remove(auxVO.getItemCodeItm01ITM03());
            auxnodes.put(auxVO.getParentItemCodeItm01ITM03(),auxnode);
          }

          en = nodes.keys();
          while(en.hasMoreElements()) {
            root.add((DefaultMutableTreeNode)nodes.get(en.nextElement()));
          }

          nodes = auxnodes;
          if (sql2.length()>0)
            sql2 = sql2.substring(0,sql2.length()-1);
View Full Code Here

TOP

Related Classes of org.openswing.swing.tree.java.OpenSwingTreeNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.