(String arg)
| 24 | private static final Color TEXT_COLOR = new Color(255,255,80); |
| 25 | |
| 26 | @AstroImageJ(modified = true, reason = "Adding AIJ version and authors to about page; fixing class loading issue.") |
| 27 | public void run(String arg) { |
| 28 | System.gc(); |
| 29 | int lines = 13; |
| 30 | String[] text = new String[lines]; |
| 31 | text[0] = "ImageJ "+ImageJ.VERSION+ImageJ.BUILD; |
| 32 | text[1] = "Wayne Rasband and contributors"; |
| 33 | text[2] = "National Institutes of Health, USA"; |
| 34 | text[3] = "http://imagej.org"; |
| 35 | text[4] = "Java "+System.getProperty("java.version")+(IJ.is64Bit()?" (64-bit)":" (32-bit)"); |
| 36 | text[5] = IJ.freeMemory(); |
| 37 | text[6] = "ImageJ is in the public domain"; |
| 38 | text[7] = "════════════════════════════════"; |
| 39 | text[8] = "AstroImageJ "+IJ.getAstroVersion(); |
| 40 | text[9] = "Karen Collins (Smithsonian Astrophysical Observatory)"; |
| 41 | text[10] = "Kevin Eastridge (George Mason University)"; |
| 42 | text[11] = "John Kielkopf (University of Louisville)"; |
| 43 | text[12] = "AstroImageJ is Licensed under GPL 3.0"; |
| 44 | ImageProcessor ip = null; |
| 45 | ImageJ ij = IJ.getInstance(); |
| 46 | if (ij==null) |
| 47 | return; |
| 48 | URL url = ij.getClass().getClassLoader().getResource("about.jpg"); |
| 49 | if (url!=null) { |
| 50 | Image img = null; |
| 51 | try {img = ij.createImage((ImageProducer)url.getContent());} |
| 52 | catch(Exception e) {} |
| 53 | if (img!=null) { |
| 54 | ImagePlus sImp = new ImagePlus("", img); |
| 55 | ip = sImp.getProcessor(); |
| 56 | } |
| 57 | } |
| 58 | if (ip==null) |
| 59 | ip = new ColorProcessor(55,45); |
| 60 | ip = ip.resize(ip.getWidth()*6, ip.getHeight()*6); |
| 61 | ImagePlus imp = new ImagePlus("About AstroImageJ", ip); |
| 62 | int width = imp.getWidth(); |
| 63 | Overlay overlay = new Overlay(); |
| 64 | Font font = new Font("SansSerif", Font.PLAIN, LARGE_FONT); |
| 65 | int y = 50; |
| 66 | int xcenter = 350; |
| 67 | add(text[0], xcenter, y, font, TextRoi.CENTER, overlay); |
| 68 | font = new Font("SansSerif", Font.PLAIN, SMALL_FONT); |
| 69 | y += 37; |
| 70 | add(text[1], xcenter, y, font, TextRoi.CENTER, overlay); |
| 71 | y += 27; |
| 72 | add(text[2], xcenter, y, font, TextRoi.CENTER, overlay); |
| 73 | y += 27; |
| 74 | add(text[3], xcenter, y, font, TextRoi.CENTER, overlay); |
| 75 | y += 27; |
| 76 | add(text[4], xcenter, y, font, TextRoi.CENTER, overlay); |
| 77 | y += 27; |
| 78 | add(text[5], xcenter, y, font, TextRoi.CENTER, overlay); |
| 79 | y += 27; |
| 80 | add(text[6], xcenter, y, font, TextRoi.CENTER, overlay); |
| 81 | y += 27; |
| 82 | add(text[7], xcenter, y, font, TextRoi.CENTER, overlay); |
| 83 | font = new Font("SansSerif", Font.PLAIN, LARGE_FONT); |
nothing calls this directly
no test coverage detected