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

Method drawInfo

ij/src/main/java/ij/gui/ImageWindow.java:338–365  ·  view source on GitHub ↗

Draws the subtitle.

(Graphics g)

Source from the content-addressed store, hash-verified

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

Callers 1

paintMethod · 0.95

Calls 11

getModeMethod · 0.95
getChannelColorMethod · 0.95
setAntialiasedTextMethod · 0.95
createSubtitleMethod · 0.95
isCompositeMethod · 0.80
getColorMethod · 0.65
setColorMethod · 0.65
setFontMethod · 0.65
getInsetsMethod · 0.45
equalsMethod · 0.45
drawStringMethod · 0.45

Tested by

no test coverage detected