Package javax.swing.tree

Examples of javax.swing.tree.DefaultTreeModel.removeNodeFromParent()


   
   
    public void deleteChild(GfrNodCtrAbs nodChild) throws Exception
    {
        DefaultTreeModel dtm = (DefaultTreeModel) super._tree.getModel();
        dtm.removeNodeFromParent(nodChild);
       
        nodChild.destroy();
        nodChild = null;
    }
   
View Full Code Here


               GfrNodCtrAbs nodCur = (GfrNodCtrAbs) nodParent.getChildAt(i);
               altChild.add(nodCur);
         }

         Object[] objs = (Object[]) altChild.toArray();
         dtm.removeNodeFromParent(nodChild);
         Arrays.sort(objs, new GfrComparatorNodes()); // ATTN possible memory leaks


         for (int i=0; i<objs.length; i++)
         {
View Full Code Here

        
         if (strIdCur.compareTo(strId) != 0)
            continue;
        
         DefaultTreeModel dtm = (DefaultTreeModel) super._tree.getModel();
         dtm.removeNodeFromParent(nodCur);
         nodCur.releaseTransient();
         nodCur.destroy();
         return true;
      }
     
View Full Code Here

         if (strIdCur.compareTo(strId) != 0)
            continue;

         DefaultTreeModel dtm = (DefaultTreeModel) super._tree.getModel();
         dtm.removeNodeFromParent(nodCur);
         nodCur.releaseTransient();
         nodCur.destroy();
         return true;
      }
View Full Code Here

    }

    private void removeNotificationFromTree(Notification notification) {
        DefaultTreeModel treeModel = (DefaultTreeModel) notificationTree.getModel();
        if (notification.getType() == Notification.Type.PREGNANCY_OUTCOME) {
            treeModel.removeNodeFromParent(
                    (MutableTreeNode) pregnancyOutcomeNode.getChildAt(pregnancyOutcomeNotificationList.indexOf(notification)));
            pregnancyOutcomeNotificationList.remove(notification);
            pregnancyOutcomeNode.setUserObject("Pregnancy outcome" + "(" + pregnancyOutcomeNotificationList.size() + ")");
            if (pregnancyOutcomeNotificationList.isEmpty()) {
                treeModel.removeNodeFromParent(pregnancyOutcomeNode);
View Full Code Here

            treeModel.removeNodeFromParent(
                    (MutableTreeNode) pregnancyOutcomeNode.getChildAt(pregnancyOutcomeNotificationList.indexOf(notification)));
            pregnancyOutcomeNotificationList.remove(notification);
            pregnancyOutcomeNode.setUserObject("Pregnancy outcome" + "(" + pregnancyOutcomeNotificationList.size() + ")");
            if (pregnancyOutcomeNotificationList.isEmpty()) {
                treeModel.removeNodeFromParent(pregnancyOutcomeNode);
            }
        } else if (notification.getType() == Notification.Type.PREGNANCY) {
            treeModel.removeNodeFromParent(
                    (MutableTreeNode) pregnancyNode.getChildAt(pregnancyNotificationList.indexOf(notification)));
            pregnancyNotificationList.remove(notification);
View Full Code Here

            pregnancyOutcomeNode.setUserObject("Pregnancy outcome" + "(" + pregnancyOutcomeNotificationList.size() + ")");
            if (pregnancyOutcomeNotificationList.isEmpty()) {
                treeModel.removeNodeFromParent(pregnancyOutcomeNode);
            }
        } else if (notification.getType() == Notification.Type.PREGNANCY) {
            treeModel.removeNodeFromParent(
                    (MutableTreeNode) pregnancyNode.getChildAt(pregnancyNotificationList.indexOf(notification)));
            pregnancyNotificationList.remove(notification);
            pregnancyNode.setUserObject("Pregnancy" + "(" + pregnancyNotificationList.size() + ")");
            if (pregnancyNotificationList.isEmpty()) {
                treeModel.removeNodeFromParent(pregnancyNode);
View Full Code Here

            treeModel.removeNodeFromParent(
                    (MutableTreeNode) pregnancyNode.getChildAt(pregnancyNotificationList.indexOf(notification)));
            pregnancyNotificationList.remove(notification);
            pregnancyNode.setUserObject("Pregnancy" + "(" + pregnancyNotificationList.size() + ")");
            if (pregnancyNotificationList.isEmpty()) {
                treeModel.removeNodeFromParent(pregnancyNode);
            }
        } else if (notification.getType() == Notification.Type.DEATH) {
            treeModel.removeNodeFromParent(
                    (MutableTreeNode) deathNode.getChildAt(deathNotificationList.indexOf(notification)));
            deathNotificationList.remove(notification);
View Full Code Here

            pregnancyNode.setUserObject("Pregnancy" + "(" + pregnancyNotificationList.size() + ")");
            if (pregnancyNotificationList.isEmpty()) {
                treeModel.removeNodeFromParent(pregnancyNode);
            }
        } else if (notification.getType() == Notification.Type.DEATH) {
            treeModel.removeNodeFromParent(
                    (MutableTreeNode) deathNode.getChildAt(deathNotificationList.indexOf(notification)));
            deathNotificationList.remove(notification);
            deathNode.setUserObject("Death" + "(" + deathNotificationList.size() + ")");
            if (deathNotificationList.isEmpty()) {
                treeModel.removeNodeFromParent(deathNode);
View Full Code Here

            treeModel.removeNodeFromParent(
                    (MutableTreeNode) deathNode.getChildAt(deathNotificationList.indexOf(notification)));
            deathNotificationList.remove(notification);
            deathNode.setUserObject("Death" + "(" + deathNotificationList.size() + ")");
            if (deathNotificationList.isEmpty()) {
                treeModel.removeNodeFromParent(deathNode);
            }
        } else if (notification.getType() == Notification.Type.MIGRATION) {
            treeModel.removeNodeFromParent(
                    (MutableTreeNode) migrationNode.getChildAt(migrationNotificationList.indexOf(notification)));
            migrationNotificationList.remove(notification);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.