Returns the specified ImageJ menu (e.g., "File>New") or null if it is not found.
(String menuPath)
| 905 | |
| 906 | /** Returns the specified ImageJ menu (e.g., "File>New") or null if it is not found. */ |
| 907 | public static Menu getImageJMenu(String menuPath) { |
| 908 | if (menus==null && !GraphicsEnvironment.isHeadless()) |
| 909 | IJ.init(); |
| 910 | if (menus==null) |
| 911 | return null; |
| 912 | if (menus.get(menuPath)!=null) |
| 913 | return getMenu(menuPath, false); |
| 914 | else |
| 915 | return null; |
| 916 | } |
| 917 | |
| 918 | private static Menu getMenu(String menuPath) { |
| 919 | if (GraphicsEnvironment.isHeadless()) |
no test coverage detected