(MouseEvent e)
| 95 | |
| 96 | addMouseListener(new MouseAdapter() { |
| 97 | public void mousePressed(MouseEvent e) { |
| 98 | int x = e.getX(); |
| 99 | int y = e.getY(); |
| 100 | |
| 101 | if ((x > menuLeft) && (x < menuRight)) { |
| 102 | popup.show(EditorHeader.this, x, y); |
| 103 | } else { |
| 104 | Sketch sketch = editor.getSketch(); |
| 105 | for (Tab tab : tabs) { |
| 106 | if (tab.contains(x)) { |
| 107 | sketch.setCurrentCode(tab.index); |
| 108 | repaint(); |
| 109 | } |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | public void mouseExited(MouseEvent e) { |
| 115 | // only clear if it's been set |