(GenericDialog gd, AWTEvent e)
| 87 | } |
| 88 | |
| 89 | public boolean dialogItemChanged(GenericDialog gd, AWTEvent e) { |
| 90 | ImagePlus imp = WindowManager.getCurrentImage(); |
| 91 | Roi roi = imp!=null?imp.getRoi():null; |
| 92 | TextRoi textRoi = roi!=null&&(roi instanceof TextRoi)?(TextRoi)roi:null; |
| 93 | font = gd.getNextChoice(); |
| 94 | style = gd.getNextChoiceIndex(); |
| 95 | justification = gd.getNextChoiceIndex(); |
| 96 | String colorName2 = gd.getNextChoice(); |
| 97 | String fillc = gd.getNextChoice(); |
| 98 | fontSize = (int)gd.getNextNumber(); |
| 99 | angle = (int)gd.getNextNumber(); |
| 100 | antialiased = gd.getNextBoolean(); |
| 101 | if (colorName!=null && !colorName2.equals(colorName)) { |
| 102 | Color color = Colors.decode(colorName2, null); |
| 103 | Toolbar.setForegroundColor(color); |
| 104 | colorName = colorName2; |
| 105 | } |
| 106 | TextRoi.setFont(font, fontSize, style, antialiased); |
| 107 | TextRoi.setGlobalJustification(justification); |
| 108 | Color fillColor = Colors.decode(fillc, null); |
| 109 | TextRoi.setDefaultFillColor(fillColor); |
| 110 | TextRoi.setDefaultAngle(angle); |
| 111 | if (textRoi!=null) { |
| 112 | textRoi.setAngle(angle); |
| 113 | textRoi.setJustification(justification); |
| 114 | textRoi.setFillColor(fillColor); |
| 115 | textRoi.setAntiAlias(antialiased); |
| 116 | } |
| 117 | return true; |
| 118 | } |
| 119 | |
| 120 | } |
nothing calls this directly
no test coverage detected