isac-java/src/java/isac/gui/mawen/editor/AstComponent.scala
changeset 5153 a2a220b0996b
parent 5144 4c84e3c33d8a
child 5155 f32588a5fde1
     1.1 --- a/isac-java/src/java/isac/gui/mawen/editor/AstComponent.scala	Tue Jun 27 13:08:01 2017 +0200
     1.2 +++ b/isac-java/src/java/isac/gui/mawen/editor/AstComponent.scala	Tue Jun 27 13:15:21 2017 +0200
     1.3 @@ -12,7 +12,7 @@
     1.4  import org.drools.xml.ExtensibleXmlParser.Null
     1.5  import scala.collection.immutable.List
     1.6  
     1.7 -class AstComponent(var ast: Ast, editorPanel: EditorPanel) extends JComponent with AstContainer with MouseListener with MouseMotionListener with MouseWheelListener with ActionListener with KeyListener {
     1.8 +class AstComponent(var ast: Ast) extends JComponent with AstContainer with MouseListener with MouseMotionListener with MouseWheelListener with ActionListener  {
     1.9  
    1.10    var isSelected = false
    1.11    addMouseListener(this)
    1.12 @@ -67,7 +67,7 @@
    1.13          }
    1.14        )
    1.15        
    1.16 -      BoxUtil.Draw(box , g, editorPanel.field)
    1.17 +      BoxUtil.Draw(box , g)
    1.18        setSize((box.width * Settings.zoom).round + 50 + Settings.translateX, Math.max((box.height * Settings.zoom).round, 50)  + Settings.translateY)
    1.19        setPreferredSize(getSize)
    1.20        
    1.21 @@ -181,34 +181,13 @@
    1.22          e.getSource().asInstanceOf[AstTextField].ToAstFunc)
    1.23      
    1.24      
    1.25 -    editorPanel.field.setVisible(false)
    1.26 +
    1.27      repaint()
    1.28      
    1.29      
    1.30    }
    1.31  
    1.32 -  def keyPressed(event: KeyEvent): Unit = {
    1.33 -    
    1.34 -  }
    1.35  
    1.36 -  def keyReleased(event: KeyEvent): Unit = {
    1.37 -    if (event.getKeyCode() == KeyEvent.VK_ENTER && event.isControlDown()) {
    1.38 -      ast = TransformAstUtil.Update(
    1.39 -        ast, 
    1.40 -        editorPanel.field.getAst,
    1.41 -        editorPanel.field.ToAstFunc)
    1.42 -        
    1.43 -      editorPanel.field.setVisible(false)
    1.44 -      repaint()
    1.45 -      
    1.46 -      editorPanel.fireNotifyIsaCheck();
    1.47 -    }
    1.48 -    
    1.49 -  }
    1.50 -
    1.51 -  def keyTyped(event: KeyEvent): Unit = {
    1.52 -    
    1.53 -  }
    1.54    
    1.55    def findHighesBoxOf(rootbox: Box, markedBoxes : List[Box]) : Box = {
    1.56      println("size: " + markedBoxes.length)