public static void applyStyle(String arrowStyle, Link link) { if (arrowStyle == null) { return; } final StringTokenizer st = new StringTokenizer(arrowStyle, ","); while (st.hasMoreTokens()) { final String s = st.nextToken(); if (s.equalsIgnoreCase("dashed")) { link.goDashed(); } else if (s.equalsIgnoreCase("bold")) { link.goBold(); } else if (s.equalsIgnoreCase("dotted")) { link.goDotted(); } else if (s.equalsIgnoreCase("hidden")) { link.goHidden(); } else { link.setSpecificColor(s); } } }