1.1 --- a/isac-java/src/java/isac/gui/mawen/editor/AstComponent.scala Mon Sep 18 19:50:34 2017 +0200
1.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/AstComponent.scala Thu Oct 05 09:14:22 2017 +0200
1.3 @@ -72,7 +72,7 @@
1.4 BoxUtil.draw(box , g)
1.5 setSize((box.width * Settings.zoom).round + 50 + Settings.translateX, Math.max((box.height * Settings.zoom).round, 50) + Settings.translateY)
1.6 setPreferredSize(getSize)
1.7 - EventUtil.foreachBoxFunction = null
1.8 +
1.9 g.drawRect(marker.x, marker.y, marker.width, marker.height)
1.10 }
1.11
1.12 @@ -116,7 +116,7 @@
1.13 EventUtil.foreachBoxFunction = EventUtil.doInBox(e.getPoint,
1.14 (g, box) => {
1.15 ast = TransformAstUtil.Update(ast, box.ast, TransformAstUtil.AstToCursor)
1.16 -
1.17 + EventUtil.foreachBoxFunction = null;
1.18 repaint()
1.19 }
1.20 );
1.21 @@ -146,8 +146,10 @@
1.22 }
1.23 }
1.24 def mouseMoved(e: MouseEvent ) {
1.25 - //EventUtil.drawBoxAt(e.getPoint())
1.26 - repaint()
1.27 + if (Settings.drawBoxesOnMouseMove) {
1.28 + EventUtil.drawBoxAt(e.getPoint())
1.29 + }
1.30 + repaint()
1.31 }
1.32 // \--- enforced by trait MouseMotionListener --------------------------------/
1.33
2.1 --- a/isac-java/src/java/isac/gui/mawen/editor/BoxUtil.scala Mon Sep 18 19:50:34 2017 +0200
2.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/BoxUtil.scala Thu Oct 05 09:14:22 2017 +0200
2.3 @@ -27,7 +27,7 @@
2.4 drawFrame(box, g)
2.5 box.children.foreach( draw(_, g) )
2.6 }
2.7 - case str if XSyntax.ast_isa(str) == "/" => drawFraction(g, box)
2.8 + case str if XSyntax.isa_ast(str) == "/" => drawFraction(g, box)
2.9 case _ => {
2.10 drawBoxContent(g, box)
2.11 box.children.foreach( draw(_, g) )
2.12 @@ -38,7 +38,7 @@
2.13 drawFrame(box, g)
2.14 }
2.15 def drawCursor(g: Graphics, box : DrawBox) = System.currentTimeMillis() match {
2.16 - case n if (n / 250) % 1 == 0 => box.ast match {
2.17 + case n if (n / 250) % 2 == 0 => box.ast match {
2.18 case Appl(List(Constant("CURSOR"), a)) => {
2.19 g.setColor(Color.RED)
2.20 g.asInstanceOf[Graphics2D].drawLine(box.x, box.y, box.x + box.width , box.y)
3.1 --- a/isac-java/src/java/isac/gui/mawen/editor/Settings.scala Mon Sep 18 19:50:34 2017 +0200
3.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/Settings.scala Thu Oct 05 09:14:22 2017 +0200
3.3 @@ -18,7 +18,7 @@
3.4 object Settings {
3.5
3.6 var g: Graphics = null
3.7 -
3.8 + var drawBoxesOnMouseMove = true;
3.9 var (isdraggingAllowed:Boolean, isZoomAllowed:Boolean, zoom:Float,translateX:Int,translateY:Int) =
3.10 try {
3.11 val prop = new Properties()