1.1 --- a/isac-java/src/java/isac/gui/mawen/editor/AstComponent.scala Wed Jun 28 21:49:52 2017 +0200
1.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/AstComponent.scala Thu Jun 29 14:03:43 2017 +0200
1.3 @@ -14,6 +14,10 @@
1.4 import isac.gui.mawen.editor.Box.DrawBox
1.5
1.6
1.7 +/**
1.8 + * The Java Swing component for a formula
1.9 + * represented by an <code>Ast</code>
1.10 + */
1.11 class AstComponent(var ast: Ast) extends JComponent with AstContainer with MouseListener with MouseMotionListener {
1.12
1.13 addMouseListener(this)
2.1 --- a/isac-java/src/java/isac/gui/mawen/editor/AstContainer.scala Wed Jun 28 21:49:52 2017 +0200
2.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/AstContainer.scala Thu Jun 29 14:03:43 2017 +0200
2.3 @@ -2,6 +2,9 @@
2.4
2.5 import isac.gui.mawen.syntax.Ast.Ast
2.6
2.7 +/**
2.8 + * Stores the root for usage as argument in functions.
2.9 + */
2.10 trait AstContainer {
2.11 def getAst() : Ast
2.12 def setAst(ast: Ast)
3.1 --- a/isac-java/src/java/isac/gui/mawen/editor/AstInfoUtil.scala Wed Jun 28 21:49:52 2017 +0200
3.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/AstInfoUtil.scala Thu Jun 29 14:03:43 2017 +0200
3.3 @@ -5,6 +5,9 @@
3.4
3.5 import isac.gui.mawen.syntax.AstException
3.6
3.7 +/**
3.8 + * Utilities to retrieve details from an <code>Ast</code>
3.9 + */
3.10 object AstInfoUtil {
3.11
3.12 def ignoreBox(ast: Ast) : Ast = ast match {
4.1 --- a/isac-java/src/java/isac/gui/mawen/editor/Box.scala Wed Jun 28 21:49:52 2017 +0200
4.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/Box.scala Thu Jun 29 14:03:43 2017 +0200
4.3 @@ -5,6 +5,10 @@
4.4 import isac.gui.mawen.syntax.Ast
4.5 import isac.gui.mawen.syntax.Ast._
4.6
4.7 +/**
4.8 + * Holds all data required to draw the <code>Ast</code>.
4.9 + * The "Empty*Box"es initalise respective data before calculation.
4.10 + */
4.11 object Box {
4.12
4.13 sealed abstract class Box(val ast: Ast)
5.1 --- a/isac-java/src/java/isac/gui/mawen/editor/BoxUtil.scala Wed Jun 28 21:49:52 2017 +0200
5.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/BoxUtil.scala Thu Jun 29 14:03:43 2017 +0200
5.3 @@ -11,6 +11,11 @@
5.4 import isac.gui.mawen.editor.Box._
5.5 import isac.gui.mawen.editor.Box
5.6
5.7 +/**
5.8 + * <code>paint</code>s a <code>Box</code> according to
5.9 + * a <code>Box.name</code>, which refers to
5.10 + * specific layouts defined in <code>CalcUtil</code>.
5.11 + */
5.12 object BoxUtil {
5.13
5.14
6.1 --- a/isac-java/src/java/isac/gui/mawen/editor/CalcUtil.scala Wed Jun 28 21:49:52 2017 +0200
6.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/CalcUtil.scala Thu Jun 29 14:03:43 2017 +0200
6.3 @@ -14,6 +14,11 @@
6.4 import isac.gui.mawen.syntax.XSyntax
6.5 import isac.gui.mawen.editor.Box._
6.6
6.7 +/**
6.8 + * Calculate a <code>Box</code> for each leaf
6.9 + * of an <code>Ast</code> and assemble them bottom up according to
6.10 + * layouts for specific structures of sub-asts.
6.11 + */
6.12 object CalcUtil {
6.13
6.14 val emptyFunc = (box: Box) => {}
7.1 --- a/isac-java/src/java/isac/gui/mawen/editor/EditingUtil.scala Wed Jun 28 21:49:52 2017 +0200
7.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/EditingUtil.scala Thu Jun 29 14:03:43 2017 +0200
7.3 @@ -4,6 +4,11 @@
7.4 import isac.gui.mawen.syntax.Ast
7.5 import java.awt.event.KeyEvent
7.6
7.7 +/**
7.8 + * Edit a formulas listening to key events
7.9 + * according to a state-transition-system
7.10 + * described in mmahringer Fig.TODO.TODOWN.
7.11 + */
7.12 object EditingUtil {
7.13
7.14 def parse(c: AstContainer, inputCode: Int) : Unit = {
8.1 --- a/isac-java/src/java/isac/gui/mawen/editor/EditorListener.java Wed Jun 28 21:49:52 2017 +0200
8.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/EditorListener.java Thu Jun 29 14:03:43 2017 +0200
8.3 @@ -2,6 +2,9 @@
8.4
8.5 import java.util.EventListener;
8.6
8.7 +/**
8.8 + * Standard listener implementation for the editor.
8.9 + */
8.10 public interface EditorListener extends EventListener {
8.11 void notifyLocalCheck();
8.12 void notifyIsaCheck();
9.1 --- a/isac-java/src/java/isac/gui/mawen/editor/EditorPanel.java Wed Jun 28 21:49:52 2017 +0200
9.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/EditorPanel.java Thu Jun 29 14:03:43 2017 +0200
9.3 @@ -14,6 +14,10 @@
9.4
9.5
9.6
9.7 +/**
9.8 + * Manages the editor for one formula represented by an <code>Ast</code>
9.9 + * in the <code>Worksheet</code>.
9.10 + */
9.11 public class EditorPanel extends JPanel implements IEditor {
9.12
9.13 private static final long serialVersionUID = 1L;
10.1 --- a/isac-java/src/java/isac/gui/mawen/editor/EventUtil.scala Wed Jun 28 21:49:52 2017 +0200
10.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/EventUtil.scala Thu Jun 29 14:03:43 2017 +0200
10.3 @@ -12,6 +12,9 @@
10.4 import java.awt.event.MouseEvent
10.5 import isac.gui.mawen.editor.Box._
10.6
10.7 +/**
10.8 + * Event handler for <code>AstComponent</code>
10.9 + */
10.10 object EventUtil {
10.11
10.12 var foreachBoxFunction : (Graphics, DrawBox) => Unit = null
11.1 --- a/isac-java/src/java/isac/gui/mawen/editor/Settings.scala Wed Jun 28 21:49:52 2017 +0200
11.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/Settings.scala Thu Jun 29 14:03:43 2017 +0200
11.3 @@ -5,6 +5,9 @@
11.4 import isac.util.WindowApplicationPaths
11.5 import scala.io.Source
11.6
11.7 +/**
11.8 + * Call preset properties for editor and store LaTeX settings.
11.9 + */
11.10 object Settings {
11.11
11.12 var (isdraggingAllowed:Boolean, isZoomAllowed:Boolean, zoom:Float,translateX:Int,translateY:Int) =
12.1 --- a/isac-java/src/java/isac/gui/mawen/editor/TransformAstUtil.scala Wed Jun 28 21:49:52 2017 +0200
12.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/TransformAstUtil.scala Thu Jun 29 14:03:43 2017 +0200
12.3 @@ -3,6 +3,11 @@
12.4 import isac.gui.mawen.syntax.Ast._
12.5 import isac.gui.mawen.syntax.AstException
12.6
12.7 +/**
12.8 + * Handle transformation on the <code>Ast</code> structure
12.9 + * triggered by input of operators (i.e. +, /, etc) and
12.10 + * by input of parentheses.
12.11 + */
12.12 object TransformAstUtil {
12.13
12.14
13.1 --- a/isac-java/src/java/isac/gui/treetable/EditorFactory.java Wed Jun 28 21:49:52 2017 +0200
13.2 +++ b/isac-java/src/java/isac/gui/treetable/EditorFactory.java Thu Jun 29 14:03:43 2017 +0200
13.3 @@ -7,6 +7,9 @@
13.4 import isac.interfaces.IEditor;
13.5 import isac.util.WindowApplicationPaths;
13.6
13.7 +/**
13.8 + * Given a property file decide to use which kind of editor.
13.9 + */
13.10 public class EditorFactory {
13.11 private static boolean IsEditorVisible;
13.12 static {