|
1 | 1 | package com.marginallyclever.donatello; |
2 | 2 |
|
| 3 | +import com.marginallyclever.donatello.modaltools.RememberKeyStateAction; |
3 | 4 | import com.marginallyclever.nodegraphcore.*; |
4 | 5 | import com.marginallyclever.donatello.actions.*; |
5 | 6 | import com.marginallyclever.donatello.actions.undoable.*; |
|
15 | 16 | import javax.swing.undo.UndoManager; |
16 | 17 | import javax.swing.undo.UndoableEdit; |
17 | 18 | import java.awt.*; |
18 | | -import java.awt.event.KeyEvent; |
19 | | -import java.awt.event.MouseAdapter; |
20 | | -import java.awt.event.MouseEvent; |
| 19 | +import java.awt.event.*; |
21 | 20 | import java.util.ArrayList; |
22 | 21 | import java.util.List; |
23 | 22 |
|
@@ -117,12 +116,12 @@ public Donatello(NodeGraph model) { |
117 | 116 | paintArea = new NodeGraphViewPanel(model); |
118 | 117 |
|
119 | 118 | this.add(toolBar,BorderLayout.NORTH); |
120 | | - this.add(new JScrollPane(paintArea),BorderLayout.CENTER); |
| 119 | + this.add(paintArea,BorderLayout.CENTER); |
121 | 120 |
|
122 | 121 | setupTools(); |
123 | 122 | setupPaintArea(); |
124 | 123 |
|
125 | | - attachMouseAdapter(); |
| 124 | + attachMouse(); |
126 | 125 |
|
127 | 126 | setupMenuBar(); |
128 | 127 |
|
@@ -436,9 +435,9 @@ private void activateCurrentTool() { |
436 | 435 | } |
437 | 436 |
|
438 | 437 | /** |
439 | | - * Attaches the mouse adapter |
| 438 | + * Respond to popup menu requests |
440 | 439 | */ |
441 | | - private void attachMouseAdapter() { |
| 440 | + private void attachMouse() { |
442 | 441 | paintArea.addMouseListener(new MouseAdapter() { |
443 | 442 | @Override |
444 | 443 | public void mousePressed(MouseEvent e) { |
|
0 commit comments