()
| 468 | /// The current sheet or null. |
| 469 | /// |
| 470 | public static Sheet getCurrentSheet() { |
| 471 | if (CN.getCurrentForm() == null) { |
| 472 | return null; |
| 473 | } |
| 474 | Container cnt = CN.getCurrentForm().getFormLayeredPaneIfExists(); |
| 475 | if (cnt == null) { |
| 476 | return null; |
| 477 | } |
| 478 | for (Component cmp : $(".Sheet", cnt)) { |
| 479 | if (cmp instanceof Sheet) { |
| 480 | return (Sheet) cmp; |
| 481 | } |
| 482 | } |
| 483 | return null; |
| 484 | } |
| 485 | |
| 486 | /// Finds Sheet containing this component if it is currently part of a Sheet. |
| 487 | /// |