List of usage examples for org.jfree.chart.plot CategoryMarker getLabelFont
public Font getLabelFont()
From source file:net.sf.jasperreports.customizers.marker.CategoryMarkerCustomizer.java
protected CategoryMarker createMarker(JRChart jrc) { Comparable<?> value = getProperty(PROPERTY_CATEGORY); if (value == null) { return null; }//from w ww .j a v a 2 s . com CategoryMarker marker = new CategoryMarker(value); configureMarker(marker); configureStroke(marker); Boolean drawAsLine = getBooleanProperty(PROPERTY_DRAW_AS_LINE); if (drawAsLine != null) { marker.setDrawAsLine(drawAsLine); } //Setup the font Font font = marker.getLabelFont(); String fontName = getProperty(PROPERTY_FONT_NAME); if (fontName == null) { fontName = font.getName(); } Float fontSize = getFloatProperty(PROPERTY_FONT_SIZE); if (fontSize == null) { fontSize = Float.valueOf(font.getSize()); } int fontStyle = Font.PLAIN; Boolean isBold = getBooleanProperty(PROPERTY_FONT_BOLD); if (isBold != null) { fontStyle = fontStyle | Font.BOLD; } Boolean isItalic = getBooleanProperty(PROPERTY_FONT_ITALIC); if (isItalic != null) { fontStyle = fontStyle | Font.ITALIC; } marker.setLabelFont(FontUtil.getInstance(filler.getJasperReportsContext()).getAwtFontFromBundles(fontName, fontStyle, fontSize, filler.getFillContext().getMasterLocale(), true)); return marker; }