* @return the bullet style of the paragraph, if {@code null} then no bullets are used \r
*/\r
BulletStyle getBulletStyle();\r
+\r
+ /**\r
+ * Sets the bullet styles. If no styles are given, the bullets are omitted.\r
+ * Possible attributes are integer/double (bullet size), Color (bullet color),\r
+ * character (bullet character), string (bullet font), AutoNumberingScheme\r
+ *\r
+ * @param styles\r
+ */\r
+ void setBulletStyle(Object... styles);\r
\r
/**\r
* @return the default size for a tab character within this paragraph in points, null if unset\r
\r
};\r
}\r
+\r
+ @Override\r
+ public void setBulletStyle(Object... styles) {\r
+ if (styles.length == 0) {\r
+ setBullet(false);\r
+ } else {\r
+ setBullet(true);\r
+ for (Object ostyle : styles) {\r
+ if (ostyle instanceof Number) {\r
+ setBulletFontSize(((Number)ostyle).doubleValue());\r
+ } else if (ostyle instanceof Color) {\r
+ setBulletFontColor((Color)ostyle);\r
+ } else if (ostyle instanceof Character) {\r
+ setBulletCharacter(ostyle.toString());\r
+ } else if (ostyle instanceof String) {\r
+ setBulletFont((String)ostyle);\r
+ } else if (ostyle instanceof AutoNumberingScheme) {\r
+ setBulletAutoNumber((AutoNumberingScheme)ostyle, 0);\r
+ }\r
+ }\r
+ }\r
+ }\r
}\r