(String title)
| 7829 | } |
| 7830 | |
| 7831 | @AstroImageJ(reason = "Support MeasurementsWindow", modified = true) |
| 7832 | private ResultsTable getRT(String title) { |
| 7833 | if (interp.applyMacroTable!=null && title==null) |
| 7834 | return interp.applyMacroTable; |
| 7835 | ResultsTable rt = null; |
| 7836 | Frame frame = null; |
| 7837 | if (title==null) { |
| 7838 | frame = WindowManager.getFrontWindow(); |
| 7839 | if (!(frame instanceof ITableWindow)) |
| 7840 | frame = null; |
| 7841 | if (frame!=null) { |
| 7842 | rt = ((ITableWindow)frame).getTable(); |
| 7843 | if (rt==null) { |
| 7844 | if (currentTable!=null) |
| 7845 | return currentTable; |
| 7846 | frame = null; |
| 7847 | } else { |
| 7848 | currentTable = rt; |
| 7849 | return rt; |
| 7850 | } |
| 7851 | } |
| 7852 | } |
| 7853 | if (title==null && rt==null && currentTable!=null) |
| 7854 | return currentTable; |
| 7855 | if (title==null) |
| 7856 | title="Results"; |
| 7857 | if (frame==null) { |
| 7858 | frame = WindowManager.getFrame(title); |
| 7859 | if (!(frame instanceof ITableWindow)) |
| 7860 | frame = null; |
| 7861 | } |
| 7862 | if (frame==null) { |
| 7863 | if (title!=null && !title.equals("Results")) |
| 7864 | return null; |
| 7865 | Frame[] frames = WindowManager.getNonImageWindows(); |
| 7866 | if (frames==null) return null; |
| 7867 | for (int i=0; i<frames.length; i++) { |
| 7868 | if (frames[i]!=null && (frames[i] instanceof ITableWindow) && |
| 7869 | !("Results".equals(frames[i].getTitle())||"Log".equals(frames[i].getTitle()))) |
| 7870 | rt = ((ITableWindow)frames[i]).getTable(); |
| 7871 | if (rt!=null) |
| 7872 | break; |
| 7873 | } |
| 7874 | if (rt!=null) |
| 7875 | currentTable = rt; |
| 7876 | return rt; |
| 7877 | } |
| 7878 | if (frame==null || !(frame instanceof ITableWindow)) |
| 7879 | return null; |
| 7880 | rt = ((ITableWindow)frame).getTable(); |
| 7881 | currentTable = rt; |
| 7882 | return rt; |
| 7883 | } |
| 7884 | |
| 7885 | final double selectionContains() { |
| 7886 | int x = (int)Math.round(getFirstArg()); |
no test coverage detected