(Component comp, String name, String icon)
| 342 | int textWidth; |
| 343 | |
| 344 | Tab(Component comp, String name, String icon) { |
| 345 | this.comp = comp; |
| 346 | this.name = name; |
| 347 | |
| 348 | if (icon != null) { |
| 349 | Mode mode = editor.getMode(); |
| 350 | enabledIcon = mode.loadImageX(icon + "-enabled"); |
| 351 | selectedIcon = mode.loadImageX(icon + "-selected"); |
| 352 | if (selectedIcon == null) { |
| 353 | selectedIcon = enabledIcon; // use this as the default |
| 354 | } |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | boolean contains(int x) { |
| 359 | return x >= left && x <= right; |
nothing calls this directly
no test coverage detected