(MouseEvent e)
| 173 | |
| 174 | addMouseListener(new MouseAdapter() { |
| 175 | public void mousePressed(MouseEvent e) { |
| 176 | int x = e.getX(); |
| 177 | int y = e.getY(); |
| 178 | |
| 179 | if ((x > menuLeft) && (x < menuRight)) { |
| 180 | popup.show(EditorHeader.this, x, y); |
| 181 | |
| 182 | } else { |
| 183 | int numTabs = editor.getTabs().size(); |
| 184 | for (int i = 0; i < numTabs; i++) { |
| 185 | if ((x > tabLeft[i]) && (x < tabRight[i])) { |
| 186 | editor.selectTab(i); |
| 187 | repaint(); |
| 188 | } |
| 189 | } |
| 190 | } |
| 191 | } |
| 192 | }); |
| 193 | } |
| 194 |