Rearrange code.
[Persons_Comparator.git] / src / RegionView.java
index 42941ac2d6f27247f749a309994f98fdd3854172..c5921d6a881b6ac4a59297a2463c4bcf7fbced1a 100644 (file)
@@ -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;
+    }
 }