(int x,int y)
| 754 | } |
| 755 | |
| 756 | @AstroImageJ(reason = "Add opening of astro windows", modified = true) |
| 757 | void select(int x,int y) { |
| 758 | Dimension d = tc.getSize(); |
| 759 | if(iRowHeight==0 || x>d.width || y>d.height) |
| 760 | return; |
| 761 | int r=(y/iRowHeight)-1+iFirstRow; |
| 762 | int lineWidth = iGridWidth; |
| 763 | if (iColCount==1 && tc.fMetrics!=null && r>=0 && r<iRowCount) { |
| 764 | char[] chars = (char[])vData.elementAt(r); |
| 765 | lineWidth = Math.max(tc.fMetrics.charsWidth(chars,0,chars.length), iGridWidth); |
| 766 | } |
| 767 | if (r>=0 && r<iRowCount && x<lineWidth) { |
| 768 | selOrigin = r; |
| 769 | selStart = r; |
| 770 | selEnd = r; |
| 771 | } else { |
| 772 | resetSelection(); |
| 773 | selOrigin = r; |
| 774 | if (r>=iRowCount) |
| 775 | selOrigin = iRowCount-1; |
| 776 | } |
| 777 | tc.repaint(); |
| 778 | selLine=r; |
| 779 | IJ.runPlugIn("Astronomy.UpdateAstroWindows", ""); |
| 780 | Interpreter interp = Interpreter.getInstance(); |
| 781 | if (interp!=null && title.equals("Debug")) |
| 782 | interp.showArrayInspector(r); |
| 783 | } |
| 784 | |
| 785 | @AstroImageJ(reason = "Run macro to update astro windows", modified = true) |
| 786 | void extendSelection(int x,int y) { |
no test coverage detected