Draws the subtitle.
(Graphics g)
| 336 | |
| 337 | /** Draws the subtitle. */ |
| 338 | @AstroImageJ(reason = "Remove info from multiplot window", modified = true) |
| 339 | public void drawInfo(Graphics g) { |
| 340 | if (imp==null) |
| 341 | return; |
| 342 | if (this instanceof PlotWindow) return; |
| 343 | if (textGap!=0) { |
| 344 | Insets insets = super.getInsets(); |
| 345 | Color savec = null; |
| 346 | if (imp.isComposite()) { |
| 347 | CompositeImage ci = (CompositeImage)imp; |
| 348 | if (ci.getMode()==IJ.COMPOSITE) { |
| 349 | savec = g.getColor(); |
| 350 | Color c = ci.getChannelColor(); |
| 351 | if (Color.green.equals(c)) |
| 352 | c = new Color(0,180,0); |
| 353 | g.setColor(c); |
| 354 | } |
| 355 | } |
| 356 | Java2.setAntialiasedText(g, true); |
| 357 | if (SCALE>1.0) { |
| 358 | Font font = new Font("SansSerif", Font.PLAIN, (int)(12*SCALE)); |
| 359 | g.setFont(font); |
| 360 | } |
| 361 | g.drawString(createSubtitle(), insets.left+5, insets.top+TEXT_GAP); |
| 362 | if (savec!=null) |
| 363 | g.setColor(savec); |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | /** Creates the subtitle. */ |
| 368 | public String createSubtitle() { |
no test coverage detected