Преглед на файлове

Merge branch 'master' of https://koljastrohm-games.com:3000/GraphDrawer/NodeShuffler

Kolja Strohm преди 6 години
родител
ревизия
b9093690b2
променени са 4 файла, в които са добавени 279 реда и са изтрити 2 реда
  1. 4 1
      doc/chapter/4progress.tex
  2. 1 0
      doc/chapter/appendix.tex
  3. 273 0
      error_after_combine.json
  4. 1 1
      src/view/EdgeView.java

+ 4 - 1
doc/chapter/4progress.tex

@@ -23,15 +23,18 @@ The following features are either planned (\planned), under construction (\progr
         \item[\done] Drawing a colored circle to show the class assignments.
         \item[\done] Drawing the edges just as plain straight lines.
         \item[\done] Drawing the conflicted edges in a different color.
+        \item[\done] Drawing dummy nodes differently from other nodes.
         \item[\done] Drawing the four extremal layouts and the combined layout separately.
         \item[\planned] Drawing the edges of the block graph (yet another color, low priority).
         \item[\done] Showing pseudocode and the position where the algorithm currently is.
+        \item[\planned] Add a legend to explain the shapes and colors.
         \begin{itemize}
             \item[\done] Clicking on the pseudocode to set a breakpoint at (not \reserved{goto}) a specific location.
         \end{itemize}
     \end{itemize}
     \item[\done] Running the algorithm step by step manually.
-    \item[\done] Running the algorithm step by step with configurable delay.
+    \item[\done] Running the algorithm step by step with configurable delay (\enquote{automatic execution}).
+    \item[\planned] Running the algorithm only on the unfolded parts of the source code (\enquote{step overrun}).
     \item[\done] Using debugger-like commands such as \enquote{step into}, \enquote{step over}, \enquote{step out}.
     \item[\done] Adding buttons and other graphical elements to support the user interface (low priority, see figure~\ref{fig:sketch}).
     Currently there is only keyboard input (cf.\ section~\ref{sec:userInterface}).

+ 1 - 0
doc/chapter/appendix.tex

@@ -19,6 +19,7 @@
         Extremal layout & Defines in which order the layers are traversed and if a node is aligned with its upper or lower median. & Leftmost lower \\
         \rowcolor{gray!25}
         Automatic execution & The state of the \code{AnimationController} where it repeatedly sends step commands with a certain delay & See section~\ref{sec:userInterface} \\
+        step overrun & The state of the \code{AnimationController} where it repeatedly sends step commands, but only inserts a delay after steps whose line of pseudocode is currently unfolded in the pseudocode view. & See section~\ref{sec:userInterface} \\
         \\\\
 	\end{longtable}
 	\caption{Glossary for the most difficult terms as we use them.}

+ 273 - 0
error_after_combine.json

@@ -0,0 +1,273 @@
+{
+  "layers": [
+    [
+      {
+        "layers": [],
+        "edges": [],
+        "name": "0"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "1"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "2"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "3"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "4"
+      }
+    ],
+    [
+      {
+        "layers": [],
+        "edges": [],
+        "name": "5"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "6"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "7"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "8"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "9"
+      }
+    ],
+    [
+      {
+        "layers": [],
+        "edges": [],
+        "name": "10"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "11"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "12"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "13"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "14"
+      }
+    ],
+    [
+      {
+        "layers": [],
+        "edges": [],
+        "name": "15"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "16"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "17"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "18"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "19"
+      }
+    ],
+    [
+      {
+        "layers": [],
+        "edges": [],
+        "name": "20"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "21"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "22"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "23"
+      },
+      {
+        "layers": [],
+        "edges": [],
+        "name": "24"
+      }
+    ]
+  ],
+  "edges": [
+    {
+      "source": "2",
+      "target": "6"
+    },
+    {
+      "source": "1",
+      "target": "6"
+    },
+    {
+      "source": "3",
+      "target": "7"
+    },
+    {
+      "source": "4",
+      "target": "7"
+    },
+    {
+      "source": "2",
+      "target": "9"
+    },
+    {
+      "source": "3",
+      "target": "9"
+    },
+    {
+      "source": "4",
+      "target": "9"
+    },
+    {
+      "source": "2",
+      "target": "5"
+    },
+    {
+      "source": "0",
+      "target": "5"
+    },
+    {
+      "source": "4",
+      "target": "8"
+    },
+    {
+      "source": "9",
+      "target": "13"
+    },
+    {
+      "source": "8",
+      "target": "13"
+    },
+    {
+      "source": "5",
+      "target": "10"
+    },
+    {
+      "source": "7",
+      "target": "12"
+    },
+    {
+      "source": "6",
+      "target": "11"
+    },
+    {
+      "source": "8",
+      "target": "11"
+    },
+    {
+      "source": "13",
+      "target": "17"
+    },
+    {
+      "source": "12",
+      "target": "17"
+    },
+    {
+      "source": "10",
+      "target": "16"
+    },
+    {
+      "source": "12",
+      "target": "16"
+    },
+    {
+      "source": "11",
+      "target": "16"
+    },
+    {
+      "source": "14",
+      "target": "18"
+    },
+    {
+      "source": "11",
+      "target": "18"
+    },
+    {
+      "source": "11",
+      "target": "15"
+    },
+    {
+      "source": "18",
+      "target": "24"
+    },
+    {
+      "source": "19",
+      "target": "24"
+    },
+    {
+      "source": "17",
+      "target": "22"
+    },
+    {
+      "source": "16",
+      "target": "20"
+    },
+    {
+      "source": "15",
+      "target": "20"
+    },
+    {
+      "source": "17",
+      "target": "23"
+    },
+    {
+      "source": "16",
+      "target": "23"
+    },
+    {
+      "source": "18",
+      "target": "23"
+    },
+    {
+      "source": "16",
+      "target": "21"
+    }
+  ]
+}

+ 1 - 1
src/view/EdgeView.java

@@ -88,7 +88,7 @@ public class EdgeView extends JPanel {
     {
         ((Graphics2D)g).setStroke(new BasicStroke(1));
         //System.out.println( "Clipping: x:" + g.getClip().getBounds().getX() + " y:" + g.getClip().getBounds().getY() + " w:" + g.getClip().getBounds().getWidth() + " h:" + g.getClip().getBounds().getHeight() );
-        g.setColor( Color.GREEN );
+        g.setColor( Color.LIGHT_GRAY );
         if( model.isConflicted( layout ) )
             g.setColor( Color.RED );
         ArrayList<Point> bps = model.getLinePoints( layout );