X-Git-Url: https://git.piment-noir.org/?p=Persons_Comparator.git;a=blobdiff_plain;f=src%2FRegionView.java;h=c5921d6a881b6ac4a59297a2463c4bcf7fbced1a;hp=42941ac2d6f27247f749a309994f98fdd3854172;hb=64418ffb240e30ec22560aafd85b07792ac71c80;hpb=b340a28fcacc7c2d230897ec810b88718b954f42 diff --git a/src/RegionView.java b/src/RegionView.java index 42941ac..c5921d6 100644 --- a/src/RegionView.java +++ b/src/RegionView.java @@ -56,7 +56,7 @@ public class RegionView extends JPanel { add(new JScrollPane(tree)); } - public static DefaultMutableTreeNode sortTree(DefaultMutableTreeNode root) { + private void sortTree(DefaultMutableTreeNode root) { { for (int i = 0; i < root.getChildCount() - 1; i++) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) root.getChildAt(i); @@ -72,10 +72,9 @@ public class RegionView extends JPanel { } } if (node.getChildCount() > 0) { - sortTree(node); + this.sortTree(node); } } - return root; } } @@ -83,11 +82,11 @@ public class RegionView extends JPanel { return tree; } - public void setRegionObj(Region regionObj) { - this.regionObj = regionObj; - } - public Region getRegionObj() { return regionObj; } + + public void setRegionObj(Region regionObj) { + this.regionObj = regionObj; + } }