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

Method extendSelection

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

Source from the content-addressed store, hash-verified

783 }
784
785 @AstroImageJ(reason = "Run macro to update astro windows", modified = true)
786 void extendSelection(int x,int y) {
787 Dimension d = tc.getSize();
788 if(iRowHeight==0 || x>d.width || y>d.height)
789 return;
790 int r=(y/iRowHeight)-1+iFirstRow;
791 if(r>=0 && r<iRowCount) {
792 if (r<selOrigin) {
793 selStart = r;
794 selEnd = selOrigin;
795
796 } else {
797 selStart = selOrigin;
798 selEnd = r;
799 }
800 }
801 tc.repaint();
802 selLine=r;
803 IJ.runPlugIn("Astronomy.UpdateAstroWindows", "");
804 }
805
806 /** Converts a y coordinate in pixels into a row index. */
807 public int rowIndex(int y) {

Callers 2

mousePressedMethod · 0.95
mouseDraggedMethod · 0.95

Calls 3

runPlugInMethod · 0.95
getSizeMethod · 0.65
repaintMethod · 0.45

Tested by

no test coverage detected