Sets the x and y label font size and style. Styles are defined in the Font class, e.g. Font.PLAIN, Font.BOLD. Set style to -1 to leave the style unchanged. Call update() thereafter to make the change visible (if the image is shown already).
(int style, float size)
| 1282 | * Set <code>style</code> to -1 to leave the style unchanged. |
| 1283 | * Call update() thereafter to make the change visible (if the image is shown already). */ |
| 1284 | public void setAxisLabelFont(int style, float size) { |
| 1285 | if (size < 9) size = 9f; |
| 1286 | if (size > 33) size = 33f; |
| 1287 | pp.xLabel.setFont(nonNullFont(pp.xLabel.getFont(), currentFont)); |
| 1288 | pp.yLabel.setFont(nonNullFont(pp.yLabel.getFont(), currentFont)); |
| 1289 | setXLabelFont(pp.xLabel.getFont().deriveFont(style < 0 ? pp.xLabel.getFont().getStyle() : style, size)); |
| 1290 | setYLabelFont(pp.xLabel.getFont().deriveFont(style < 0 ? pp.yLabel.getFont().getStyle() : style, size)); |
| 1291 | } |
| 1292 | |
| 1293 | /** Sets the xLabelFont; must not be null. If this method is not used, the last setFont |
| 1294 | * of setFontSize call before displaying the plot determines the font, or if neither |
no test coverage detected