/** Default constructor. Makes sure everything has a default value, to minimize the chance of a NPE. */ public LegendConfig() { fontStyle = new FontStyleInfo(); fontStyle.setColor(DEFAULT_FONT_COLOR); fontStyle.setFamily(DEFAULT_FONT_FAMILY); fontStyle.setOpacity(1); fontStyle.setSize(DEFAULT_FONT_SIZE); fontStyle.setStyle("normal"); fontStyle.setWeight("normal"); fontStyle.applyDefaults(); }
/** Default constructor. Makes sure everything has a default value, to minimize the chance of a NPE. */ public LegendConfig() { fontStyle = new FontStyleInfo(); fontStyle.setColor(DEFAULT_FONT_COLOR); fontStyle.setFamily(DEFAULT_FONT_FAMILY); fontStyle.setOpacity(1); fontStyle.setSize(DEFAULT_FONT_SIZE); fontStyle.setStyle("normal"); fontStyle.setWeight("normal"); fontStyle.applyDefaults(); }
private LabelStyleInfo createRandomLabelStyle(String attributeName) { LabelStyleInfo style = new LabelStyleInfo(); style.setBackgroundStyle(createRandomPolygonStyle()); FontStyleInfo fontStyle = new FontStyleInfo(); fontStyle.setColor(style.getBackgroundStyle().getStrokeColor()); fontStyle.setFamily("Verdana"); fontStyle.setOpacity(1F); fontStyle.setSize(8); fontStyle.setWeight("normal"); fontStyle.setStyle("normal"); style.setFontStyle(fontStyle); style.setLabelAttributeName(attributeName); return style; }