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; }