MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / select

Method select

ij/src/main/java/ij/text/TextPanel.java:756–783  ·  view source on GitHub ↗
(int x,int y)

Source from the content-addressed store, hash-verified

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) {

Callers 1

mousePressedMethod · 0.95

Calls 8

resetSelectionMethod · 0.95
runPlugInMethod · 0.95
getInstanceMethod · 0.95
showArrayInspectorMethod · 0.95
getSizeMethod · 0.65
maxMethod · 0.45
repaintMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected