I. Dix 7 vuotta sitten
vanhempi
commit
fa08d7823f
1 muutettua tiedostoa jossa 10 lisäystä ja 6 poistoa
  1. 10 6
      src/ui/view/GUI.java

+ 10 - 6
src/ui/view/GUI.java

@@ -85,6 +85,7 @@ public class GUI implements CategoryListener {
      **/
     private final JSplitPane splitHolonElPro = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
     private final JSplitPane splitGraphHolonEl = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
+    private final int distanceBetweenElementsAndGraph = 350;
     // Model for single or multi selection
     private final JPanel scrollElements = new JPanel();
     private final JScrollPane tableHolonElementScrollPane = new JScrollPane();
@@ -1768,12 +1769,15 @@ public class GUI implements CategoryListener {
 
         splitPane1.setResizeWeight(0.9);
 
-        splitHolonElPro.setDividerLocation(400);
+        splitHolonElPro.setDividerLocation(700);
+        // containing the graph and the elements-list
         splitHolonElPro.setTopComponent(splitGraphHolonEl);
+        // containing the object's properties
         splitHolonElPro.setBottomComponent(scrollProperties);
-        splitGraphHolonEl.setDividerLocation(150);
-        splitGraphHolonEl.setTopComponent(scrollGraph);
-        splitGraphHolonEl.setBottomComponent(scrollElements);
+
+        splitGraphHolonEl.setDividerLocation(distanceBetweenElementsAndGraph);
+        splitGraphHolonEl.setTopComponent(scrollElements);
+        splitGraphHolonEl.setBottomComponent(scrollGraph);
         canvasSP.setViewportView(canvas);
         algorithmMenu.setBackground(new Color(240, 240, 240));
 
@@ -1840,8 +1844,8 @@ public class GUI implements CategoryListener {
 
     private void showScrollGraph() {
         scrollGraph.setVisible(true);
-        splitGraphHolonEl.setTopComponent(scrollGraph);
-        splitGraphHolonEl.setDividerLocation(150);
+        splitGraphHolonEl.setBottomComponent(scrollGraph);
+        splitGraphHolonEl.setDividerLocation(distanceBetweenElementsAndGraph);
     }
 
     private void hideScrollGraph() {