equal
deleted
inserted
replaced
22 |
22 |
23 addMouseListener(this) |
23 addMouseListener(this) |
24 addMouseMotionListener(this) |
24 addMouseMotionListener(this) |
25 var pressedMousePoint : Point = null |
25 var pressedMousePoint : Point = null |
26 var marker : Rectangle = new Rectangle() |
26 var marker : Rectangle = new Rectangle() |
27 //list of boxes touched by mouse while drawing a rectangle; the outmost is relevant |
27 // list of boxes touched by mouse while drawing a rectangle; the outmost is relevant |
28 var markedBoxes : List[DrawBox] = List.empty[DrawBox] |
28 var markedBoxes : List[DrawBox] = List.empty[DrawBox] |
29 // TODOWN |
|
30 var mousePositionFunction : (Graphics, Int, Int, String, Box) => Unit = null |
|
31 var box : DrawBox = null |
29 var box : DrawBox = null |
32 setFocusable(true) |
30 setFocusable(true) |
33 addKeyListener(EventUtil.CreateKeyEventHandler(this)) |
31 addKeyListener(EventUtil.CreateKeyEventHandler(this)) |
34 addMouseWheelListener(EventUtil.CreateMouseWheelHandler(this)) |
32 addMouseWheelListener(EventUtil.CreateMouseWheelHandler(this)) |
35 setSize(50,150) |
33 setSize(50,150) |
120 ast = TransformAstUtil.Update(ast, box.ast, TransformAstUtil.AstToCursor) |
118 ast = TransformAstUtil.Update(ast, box.ast, TransformAstUtil.AstToCursor) |
121 |
119 |
122 repaint() |
120 repaint() |
123 } |
121 } |
124 ); |
122 ); |
125 }else { |
|
126 mousePositionFunction = null |
|
127 } |
123 } |
128 repaint() |
124 repaint() |
129 } |
125 } |
130 def mouseDragged(e:MouseEvent) { |
126 def mouseDragged(e:MouseEvent) { |
131 if (e.isControlDown() && Settings.isdraggingAllowed) { |
127 if (e.isControlDown() && Settings.isdraggingAllowed) { |