1.1 --- a/isac-java/src/java/isac/gui/mawen/editor/AstComponent.scala Thu Sep 07 10:49:55 2017 +0200
1.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/AstComponent.scala Tue Sep 12 09:30:34 2017 +0200
1.3 @@ -175,18 +175,3 @@
1.4 }
1.5
1.6 }
1.7 -
1.8 -
1.9 -
1.10 -
1.11 -
1.12 -
1.13 -
1.14 -
1.15 -
1.16 -
1.17 -
1.18 -
1.19 -
1.20 -
1.21 -
2.1 --- a/isac-java/src/java/isac/gui/mawen/editor/BoxUtil.scala Thu Sep 07 10:49:55 2017 +0200
2.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/BoxUtil.scala Tue Sep 12 09:30:34 2017 +0200
2.3 @@ -88,12 +88,19 @@
2.4 drawBox(box, g)
2.5 }
2.6 case None => {
2.7 + println(box.name)
2.8 // Ident
2.9 - if (box.name.forall(c => EditingUtil.isNumber(c) || EditingUtil.isIdentifier(c)) ) {
2.10 + if (box.name.forall(c => EditingUtil.isNumber(c)) ) {
2.11 + val font_var = new Font("AR PL KaitiM Big5", Font.PLAIN, CalcUtil.fontsizeOf(box.level))
2.12 + g.setFont(font_var)
2.13 + } else if (box.name.forall(c => EditingUtil.isNumber(c) || EditingUtil.isIdentifier(c)) ) {
2.14 val font_var = new Font("CMMI12", Font.PLAIN, CalcUtil.fontsizeOf(box.level))
2.15 g.setFont(font_var)
2.16 + }else if (box.name.forall(c => EditingUtil.isDelim(c))){
2.17 + val font_var = new Font("CMCSC8", Font.PLAIN, CalcUtil.fontsizeOf(box.level))
2.18 + g.setFont(font_var)
2.19 }else {
2.20 - val font_var = new Font("CMCSC8", Font.PLAIN, CalcUtil.fontsizeOf(box.level))
2.21 + val font_var = new Font("PTF55F", Font.PLAIN, CalcUtil.fontsizeOf(box.level))
2.22 g.setFont(font_var)
2.23 }
2.24 g.drawString(box.name, box.x0, box.y0)
3.1 --- a/isac-java/src/java/isac/gui/mawen/editor/CalcUtil.scala Thu Sep 07 10:49:55 2017 +0200
3.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/CalcUtil.scala Tue Sep 12 09:30:34 2017 +0200
3.3 @@ -266,7 +266,7 @@
3.4 val boxes = param.map(x => assembleBoxesRec( new EmptyBox(level, x0, y0, x),emptyFunc))
3.5
3.6 val horizontalSpace = Settings.getStringBoundOf(",x", level, x0, y0)
3.7 - val horizontalCloseBracketSpace = Settings.getStringBoundOf(")", level, x0, y0)
3.8 + val horizontalCloseBracketSpace = Settings.getStringBoundOf("i)", level, x0, y0)
3.9 val constant = Settings.getStringBoundOf(XSyntax.isa_ast(str), level, x0, y0)
3.10 val constantSpace = Settings.getStringBoundOf("(i", level, x0, y0)
3.11
4.1 --- a/isac-java/src/java/isac/gui/mawen/editor/EditorPanel.java Thu Sep 07 10:49:55 2017 +0200
4.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/EditorPanel.java Tue Sep 12 09:30:34 2017 +0200
4.3 @@ -20,7 +20,7 @@
4.4 /*err*/public EditorPanel(Ast.Ast ast) {
4.5 listeners = new ArrayList<EditorListener>();
4.6 LayoutManager overlay = new OverlayLayout(this);
4.7 - this.setBackground(Color.GREEN);
4.8 + this.setBackground(Color.WHITE);
4.9 setLayout(overlay);
4.10 component = CalcUtil.assembleComponent(ast);
4.11 EditorListenerHandler.addListenerHandler((IEditor)this, (AstContainer)component);
4.12 @@ -75,8 +75,4 @@
4.13 /*err*/System.out.println(isac.gui.mawen.syntax.Ast$.MODULE$.math_string_of(getFormula()));
4.14 /*err*/return Ast.math_string_of(getFormula() );
4.15 }
4.16 -
4.17 -
4.18 -
4.19 -
4.20 }
5.1 --- a/isac-java/src/java/isac/gui/mawen/editor/EventUtil.scala Thu Sep 07 10:49:55 2017 +0200
5.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/EventUtil.scala Tue Sep 12 09:30:34 2017 +0200
5.3 @@ -124,7 +124,7 @@
5.4 || (event.getKeyChar >= 'A' && event.getKeyChar <= 'Z')
5.5 || List('+', '-', '*', '/', '(', '=').contains(event.getKeyChar)) {
5.6 EditingUtil.parse(c, event.getKeyChar.toInt)
5.7 - EditorListenerHandler.fireNotifysBraille(c, AstInfoUtil.FindBox(c.getAst()))
5.8 + //EditorListenerHandler.fireNotifysBraille(c, AstInfoUtil.FindBox(c.getAst()))
5.9 } else if (
5.10 event.getKeyCode == KeyEvent.VK_ENTER ||
5.11 event.getKeyCode == KeyEvent.VK_DELETE ||
6.1 --- a/isac-java/src/java/isac/gui/mawen/editor/Settings.scala Thu Sep 07 10:49:55 2017 +0200
6.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/Settings.scala Tue Sep 12 09:30:34 2017 +0200
6.3 @@ -66,6 +66,7 @@
6.4 def fillStringbounds(ast: Ast, g: Graphics2D) {
6.5 fillStringboundsRec(Variable(",x"), g)
6.6 fillStringboundsRec(Variable(")"), g)
6.7 + fillStringboundsRec(Variable("i)"), g)
6.8 fillStringboundsRec(Variable("(i"), g)
6.9 fillStringboundsRec(Variable("xx"), g)
6.10 fillStringboundsRec(ast, g)
6.11 @@ -82,7 +83,16 @@
6.12 ast_Stringbounds = ast_Stringbounds + (op -> (RectLv0, RectLv1, RectLv2))
6.13 }
6.14 case Variable(str) => {
6.15 - if (str.forall(c => EditingUtil.isNumber(c) || EditingUtil.isIdentifier(c)) ) {
6.16 +
6.17 + if (str.forall(c => EditingUtil.isNumber(c))){
6.18 + g.setFont(new Font("AR PL KaitiM Big5", Font.PLAIN, CalcUtil.fontsizeOf(0)))
6.19 + val RectLv0 = getStringBounds(g, str, 0f,0f)
6.20 + g.setFont(new Font("AR PL KaitiM Big5", Font.PLAIN, CalcUtil.fontsizeOf(1)))
6.21 + val RectLv1 = getStringBounds(g, str, 0f,0f)
6.22 + g.setFont(new Font("AR PL KaitiM Big5", Font.PLAIN, CalcUtil.fontsizeOf(2)))
6.23 + val RectLv2 = getStringBounds(g, str, 0f,0f)
6.24 + ast_Stringbounds = ast_Stringbounds + (str -> (RectLv0, RectLv1, RectLv2))
6.25 + } else if (str.forall(c => EditingUtil.isIdentifier(c))) {
6.26 g.setFont(new Font("CMMI12", Font.PLAIN, CalcUtil.fontsizeOf(0)))
6.27 val RectLv0 = getStringBounds(g, str, 0f,0f)
6.28 g.setFont(new Font("CMMI12", Font.PLAIN, CalcUtil.fontsizeOf(1)))
6.29 @@ -90,7 +100,7 @@
6.30 g.setFont(new Font("CMMI12", Font.PLAIN, CalcUtil.fontsizeOf(2)))
6.31 val RectLv2 = getStringBounds(g, str, 0f,0f)
6.32 ast_Stringbounds = ast_Stringbounds + (str -> (RectLv0, RectLv1, RectLv2))
6.33 - } else { // use CMCSC8 for "(" and ")"
6.34 + } else if (str.forall(c => EditingUtil.isDelim(c))) {
6.35 g.setFont(new Font("CMCSC8", Font.PLAIN, CalcUtil.fontsizeOf(0)))
6.36 val RectLv0 = getStringBounds(g, str, 0f,0f)
6.37 g.setFont(new Font("CMCSC8", Font.PLAIN, CalcUtil.fontsizeOf(1)))
6.38 @@ -98,6 +108,14 @@
6.39 g.setFont(new Font("CMCSC8", Font.PLAIN, CalcUtil.fontsizeOf(2)))
6.40 val RectLv2 = getStringBounds(g, str, 0f,0f)
6.41 ast_Stringbounds = ast_Stringbounds + (str -> (RectLv0, RectLv1, RectLv2))
6.42 + } else {
6.43 + g.setFont(new Font("PTF55F", Font.PLAIN, CalcUtil.fontsizeOf(0)))
6.44 + val RectLv0 = getStringBounds(g, str, 0f,0f)
6.45 + g.setFont(new Font("PTF55F", Font.PLAIN, CalcUtil.fontsizeOf(1)))
6.46 + val RectLv1 = getStringBounds(g, str, 0f,0f)
6.47 + g.setFont(new Font("PTF55F", Font.PLAIN, CalcUtil.fontsizeOf(2)))
6.48 + val RectLv2 = getStringBounds(g, str, 0f,0f)
6.49 + ast_Stringbounds = ast_Stringbounds + (str -> (RectLv0, RectLv1, RectLv2))
6.50 }
6.51 }
6.52 case Appl(asts) => asts.foreach(x => fillStringbounds(x, g))
7.1 --- a/isac-java/src/java/isac/gui/mawen/syntax/syntax.scala Thu Sep 07 10:49:55 2017 +0200
7.2 +++ b/isac-java/src/java/isac/gui/mawen/syntax/syntax.scala Tue Sep 12 09:30:34 2017 +0200
7.3 @@ -142,9 +142,4 @@
7.4 def print_rules (key: String): List[Tuple2[Ast, Ast]] =
7.5 if (symtab.contains(key)) symtab(key) else List()
7.6
7.7 -
7.8 -
7.9 -
7.10 -
7.11 -
7.12 }
7.13 \ No newline at end of file
8.1 --- a/isac-java/src/java/isac/gui/treetable/EditorFactory.java Thu Sep 07 10:49:55 2017 +0200
8.2 +++ b/isac-java/src/java/isac/gui/treetable/EditorFactory.java Tue Sep 12 09:30:34 2017 +0200
8.3 @@ -26,12 +26,6 @@
8.4 IsEditorVisible = false;
8.5 }
8.6 }
8.7 -
8.8 -
8.9 -
8.10 -
8.11 -
8.12 -
8.13 public static IEditor getTacticEditor() {
8.14 if (!IsEditorVisible) { // StringEditor is true
8.15 return new TacticTextField();