public static Element createRect(final Document document, final double x, final double y, final double width, final double height, final SVGColor fillColor, final String... attributes) { return createRect(document, x, y, width, height, fillColor.getName(), attributes); }
public static Element createRect(final Document document, final double x, final double y, final double width, final double height, final SVGColor fillColor, final SVGColor strokeColor, final String... attributes) { return createRect(document, x, y, width, height, fillColor.getName(), prepend(attributes, "stroke", strokeColor.getName())); }
final double width2 = width - width1; if (width1 > 0) { diagram.appendChild(SVGHelper.createRect(doc, x1, y, width1, height, SVGColor.DARK_BLUE, SVGColor.DARK_BLUE)); diagram.appendChild(SVGHelper.createRect(doc, x1 + width1, y, width2, height, SVGColor.LIGHT_BLUE, SVGColor.DARK_BLUE)); diagram.appendChild(SVGHelper.createRect(doc, x1, y, width, height, SVGColor.DARK_BLUE, SVGColor.NONE));
return; diagram.appendChild(SVGHelper.createRect(doc, x1, taskInfo.y + 0.2 * style.getActivityHeight(), width, 0.8 * style.getActivityHeight(), SVGColor.DARK_RED, "stroke", "none")); if (drawLeftArrow == true) {
/** * @param doc * @param g * @param day * @param toDate Last day of diagram. * @param lastNonWorkingDay * @param height */ private void showNonWorkingDays(final Document doc, final Element g, final Date day, final Date toDate, final double height) { if (g == null) { return; } final DayHolder dh = new DayHolder(day); final double x1 = getXValue(day); for (int i = 0; i < 100; i++) { // End-less loop protection. dh.add(Calendar.DAY_OF_MONTH, 1); if (dh.isWorkingDay() == true || dh.before(toDate) == false) { break; } } final double x2 = getXValue(dh.getDate()); g.appendChild(SVGHelper.createRect(doc, x1, 0, x2 - x1, height, SVGColor.LIGHT_GRAY, SVGColor.NONE)); }
root.appendChild(g1); g1.appendChild(SVGHelper.createRect(doc, 0, 0, style.getWidth(), height, "none", "stroke-width", "2"));