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

Method setFont

ij/src/main/java/ij/gui/Plot.java:1252–1260  ·  view source on GitHub ↗

Sets the font for all following addLabel() etc. operations. The currently set font when displaying the plot determines the font of all labels & numbers. After the plot has been shown, sets the font for the numbers and the legend (if present); use setFont(char, Font) to set these fonts individually

(Font font)

Source from the content-addressed store, hash-verified

1250 * use setFont(char, Font) to set these fonts individually.
1251 * If the plot is hown already, call update() thereafter to make the change visible. */
1252 public void setFont(Font font) {
1253 if (font == null) font = defaultFont;
1254 currentFont = font;
1255 if (plotDrawn) {
1256 pp.frame.setFont(font);
1257 if (pp.legend != null)
1258 pp.legend.setFont(font);
1259 }
1260 }
1261
1262 /** Sets the font size and style for all following addLabel() etc. operations. This leaves
1263 * the font name and style of the previously used fonts unchanged. The currently set font

Callers 3

plotHistogramMethod · 0.95
setFontSizeMethod · 0.95
changeFontMethod · 0.95

Calls 6

nonNullFontMethod · 0.95
setFontMethod · 0.95
getPlotObjectMethod · 0.80
setFontMethod · 0.65
getFontMethod · 0.65
getStyleMethod · 0.45

Tested by

no test coverage detected