(Component c)
| 874 | if (cnt.getComponentCount() > 0) { |
| 875 | $(".Sheet", cnt).each(new ComponentClosure() { |
| 876 | @Override |
| 877 | public void call(Component c) { |
| 878 | if (c instanceof Sheet) { |
| 879 | Sheet s = (Sheet) c; |
| 880 | if (s.isAncestorSheetOf(Sheet.this) || s == Sheet.this) { //NOPMD CompareObjectsWithEquals |
| 881 | // If the sheet is an ancestor of |
| 882 | // ours then we don't need to fire a close event |
| 883 | // yet. We fire it when it is closed |
| 884 | // without possibility of returning |
| 885 | // via a back chain |
| 886 | return; |
| 887 | } |
| 888 | s.fireCloseEvent(false); |
| 889 | |
| 890 | // Hiding this sheet may eliminate the possibility of |
| 891 | // its parent sheets from being shown again, |
| 892 | // so their close events should also be fired in this case. |
| 893 | Sheet sp = s.getParentSheet(); |
| 894 | while (sp != null) { |
| 895 | if (sp == Sheet.this) { //NOPMD CompareObjectsWithEquals |
| 896 | break; |
| 897 | } |
| 898 | if (!sp.isAncestorSheetOf(Sheet.this)) { |
| 899 | sp.fireCloseEvent(false); |
| 900 | } |
| 901 | sp = sp.getParentSheet(); |
| 902 | |
| 903 | } |
| 904 | } |
| 905 | |
| 906 | |
| 907 | } |
| 908 | |
| 909 | }); |
| 910 | Component existing = cnt.getComponentAt(0); |
nothing calls this directly
no test coverage detected