public com.itextpdf.text.Rectangle createLocalTargetArea(RenderingContext c, Box box) { return createLocalTargetArea(c, box, false); }
public com.lowagie.text.Rectangle createLocalTargetArea(RenderingContext c, Box box) { return createLocalTargetArea(c, box, false); }
public com.lowagie.text.Rectangle createLocalTargetArea(RenderingContext c, Box box) { return createLocalTargetArea(c, box, false); }
public com.lowagie.text.Rectangle createLocalTargetArea(RenderingContext c, Box box) { return createLocalTargetArea(c, box, false); }
public com.lowagie.text.Rectangle createLocalTargetArea(RenderingContext c, Box box) { return createLocalTargetArea(c, box, false); }
private com.lowagie.text.Rectangle calcTotalLinkArea(RenderingContext c, Box box) { Box current = box; while (true) { Box prev = current.getPreviousSibling(); if (prev == null || prev.getElement() != box.getElement()) { break; } current = prev; } com.lowagie.text.Rectangle result = createLocalTargetArea(c, current, true); current = current.getNextSibling(); while (current != null && current.getElement() == box.getElement()) { result = add(result, createLocalTargetArea(c, current, true)); current = current.getNextSibling(); } return result; }
private com.itextpdf.text.Rectangle calcTotalLinkArea(RenderingContext c, Box box) { Box current = box; while (true) { Box prev = current.getPreviousSibling(); if (prev == null || prev.getElement() != box.getElement()) { break; } current = prev; } com.itextpdf.text.Rectangle result = createLocalTargetArea(c, current, true); current = current.getNextSibling(); while (current != null && current.getElement() == box.getElement()) { result = add(result, createLocalTargetArea(c, current, true)); current = current.getNextSibling(); } return result; }
private com.lowagie.text.Rectangle calcTotalLinkArea(RenderingContext c, Box box) { Box current = box; while (true) { Box prev = current.getPreviousSibling(); if (prev == null || prev.getElement() != box.getElement()) { break; } current = prev; } com.lowagie.text.Rectangle result = createLocalTargetArea(c, current, true); current = current.getNextSibling(); while (current != null && current.getElement() == box.getElement()) { result = add(result, createLocalTargetArea(c, current, true)); current = current.getNextSibling(); } return result; }
private com.lowagie.text.Rectangle calcTotalLinkArea(RenderingContext c, Box box) { Box current = box; while (true) { Box prev = current.getPreviousSibling(); if (prev == null || prev.getElement() != box.getElement()) { break; } current = prev; } com.lowagie.text.Rectangle result = createLocalTargetArea(c, current, true); current = current.getNextSibling(); while (current != null && current.getElement() == box.getElement()) { result = add(result, createLocalTargetArea(c, current, true)); current = current.getNextSibling(); } return result; }
private com.lowagie.text.Rectangle calcTotalLinkArea(RenderingContext c, Box box) { Box current = box; while (true) { Box prev = current.getPreviousSibling(); if (prev == null || prev.getElement() != box.getElement()) { break; } current = prev; } com.lowagie.text.Rectangle result = createLocalTargetArea(c, current, true); current = current.getNextSibling(); while (current != null && current.getElement() == box.getElement()) { result = add(result, createLocalTargetArea(c, current, true)); current = current.getNextSibling(); } return result; }
public void paint(RenderingContext c, ITextOutputDevice outputDevice, BlockBox box) { PdfContentByte cb = outputDevice.getCurrentPage(); PdfWriter writer = outputDevice.getWriter(); Element elm = box.getElement(); Rectangle targetArea = outputDevice.createLocalTargetArea(c, box); String onValue = getValue(elm); RadioCheckField field = new RadioCheckField(writer, targetArea, getFieldName(outputDevice, elm), onValue); field.setChecked(isChecked(elm)); field.setCheckType(RadioCheckField.TYPE_CHECK); field.setBorderStyle(PdfBorderDictionary.STYLE_SOLID); //TODO Consider if we can get some more correct color field.setBorderColor(Color.black); field.setBorderWidth(BaseField.BORDER_WIDTH_THIN); try { PdfFormField formField = field.getCheckField(); if (isReadOnly(elm)) { formField.setFieldFlags(PdfFormField.FF_READ_ONLY); } writer.addAnnotation(formField); } catch (IOException ioe) { System.out.println(ioe); } catch (DocumentException de) { System.out.println(de); } }
public void paint(RenderingContext c, ITextOutputDevice outputDevice, BlockBox box) { PdfWriter writer = outputDevice.getWriter(); Element elem = box.getElement(); PdfFormField field = PdfFormField.createTextField( writer, false, false, getMaxLength(elem)); Rectangle targetArea = outputDevice.createLocalTargetArea(c, box); field.setWidget( targetArea, PdfAnnotation.HIGHLIGHT_INVERT); field.setFieldName(getFieldName(outputDevice, elem)); field.setBorderStyle(new PdfBorderDictionary(0.0f, 0)); String value = getValue(elem); field.setDefaultValueAsString(value); field.setValueAsString(value); createAppearance(c, outputDevice, box, field, value); if (isReadOnly(elem)) { field.setFieldFlags(PdfFormField.FF_READ_ONLY); } writer.addAnnotation(field); }
public void paint(RenderingContext c, ITextOutputDevice outputDevice, BlockBox box) { PdfWriter writer = outputDevice.getWriter(); Element elem = box.getElement(); PdfFormField field = PdfFormField.createTextField( writer, false, false, getMaxLength(elem)); Rectangle targetArea = outputDevice.createLocalTargetArea(c, box); field.setWidget( targetArea, PdfAnnotation.HIGHLIGHT_INVERT); field.setFieldName(getFieldName(outputDevice, elem)); field.setBorderStyle(new PdfBorderDictionary(0.0f, 0)); String value = getValue(elem); field.setDefaultValueAsString(value); field.setValueAsString(value); createAppearance(c, outputDevice, box, field, value); if (isReadOnly(elem)) { field.setFieldFlags(PdfFormField.FF_READ_ONLY); } writer.addAnnotation(field); }
public com.lowagie.text.Rectangle createTargetArea(RenderingContext c, Box box) { PageBox current = c.getPage(); boolean inCurrentPage = box.getAbsY() > current.getTop() && box.getAbsY() < current.getBottom(); if (inCurrentPage || box.isContainedInMarginBox()) { return createLocalTargetArea(c, box); } else { Rectangle bounds = box.getContentAreaEdge(box.getAbsX(), box.getAbsY(), c); PageBox page = _root.getLayer().getPage(c, bounds.y); float bottom = getDeviceLength(page.getBottom() - (bounds.y + bounds.height) + page.getMarginBorderPadding(c, CalculatedStyle.BOTTOM)); float left = getDeviceLength(page.getMarginBorderPadding(c, CalculatedStyle.LEFT) + bounds.x); com.lowagie.text.Rectangle result = new com.lowagie.text.Rectangle(left, bottom, left + getDeviceLength(bounds.width), bottom + getDeviceLength(bounds.height)); return result; } }
public com.itextpdf.text.Rectangle createTargetArea(RenderingContext c, Box box) { PageBox current = c.getPage(); boolean inCurrentPage = box.getAbsY() > current.getTop() && box.getAbsY() < current.getBottom(); if (inCurrentPage || box.isContainedInMarginBox()) { return createLocalTargetArea(c, box); } else { Rectangle bounds = box.getContentAreaEdge(box.getAbsX(), box.getAbsY(), c); PageBox page = _root.getLayer().getPage(c, bounds.y); float bottom = getDeviceLength(page.getBottom() - (bounds.y + bounds.height) + page.getMarginBorderPadding(c, CalculatedStyle.BOTTOM)); float left = getDeviceLength(page.getMarginBorderPadding(c, CalculatedStyle.LEFT) + bounds.x); com.itextpdf.text.Rectangle result = new com.itextpdf.text.Rectangle(left, bottom, left + getDeviceLength(bounds.width), bottom + getDeviceLength(bounds.height)); return result; } }
public com.lowagie.text.Rectangle createTargetArea(RenderingContext c, Box box) { PageBox current = c.getPage(); boolean inCurrentPage = box.getAbsY() > current.getTop() && box.getAbsY() < current.getBottom(); if (inCurrentPage || box.isContainedInMarginBox()) { return createLocalTargetArea(c, box); } else { Rectangle bounds = box.getContentAreaEdge(box.getAbsX(), box.getAbsY(), c); PageBox page = _root.getLayer().getPage(c, bounds.y); float bottom = getDeviceLength(page.getBottom() - (bounds.y + bounds.height) + page.getMarginBorderPadding(c, CalculatedStyle.BOTTOM)); float left = getDeviceLength(page.getMarginBorderPadding(c, CalculatedStyle.LEFT) + bounds.x); com.lowagie.text.Rectangle result = new com.lowagie.text.Rectangle(left, bottom, left + getDeviceLength(bounds.width), bottom + getDeviceLength(bounds.height)); return result; } }
public com.lowagie.text.Rectangle createTargetArea(RenderingContext c, Box box) { PageBox current = c.getPage(); boolean inCurrentPage = box.getAbsY() > current.getTop() && box.getAbsY() < current.getBottom(); if (inCurrentPage || box.isContainedInMarginBox()) { return createLocalTargetArea(c, box); } else { Rectangle bounds = box.getContentAreaEdge(box.getAbsX(), box.getAbsY(), c); PageBox page = _root.getLayer().getPage(c, bounds.y); float bottom = getDeviceLength(page.getBottom() - (bounds.y + bounds.height) + page.getMarginBorderPadding(c, CalculatedStyle.BOTTOM)); float left = getDeviceLength(page.getMarginBorderPadding(c, CalculatedStyle.LEFT) + bounds.x); com.lowagie.text.Rectangle result = new com.lowagie.text.Rectangle( left, bottom, left + getDeviceLength(bounds.width), bottom + getDeviceLength(bounds.height)); return result; } }
public com.lowagie.text.Rectangle createTargetArea(RenderingContext c, Box box) { PageBox current = c.getPage(); boolean inCurrentPage = box.getAbsY() > current.getTop() && box.getAbsY() < current.getBottom(); if (inCurrentPage || box.isContainedInMarginBox()) { return createLocalTargetArea(c, box); } else { Rectangle bounds = box.getContentAreaEdge(box.getAbsX(), box.getAbsY(), c); PageBox page = _root.getLayer().getPage(c, bounds.y); float bottom = getDeviceLength(page.getBottom() - (bounds.y + bounds.height) + page.getMarginBorderPadding(c, CalculatedStyle.BOTTOM)); float left = getDeviceLength(page.getMarginBorderPadding(c, CalculatedStyle.LEFT) + bounds.x); com.lowagie.text.Rectangle result = new com.lowagie.text.Rectangle( left, bottom, left + getDeviceLength(bounds.width), bottom + getDeviceLength(bounds.height)); return result; } }
public void paint(RenderingContext c, ITextOutputDevice outputDevice, BlockBox box) { PdfContentByte cb = outputDevice.getCurrentPage(); PdfWriter writer = outputDevice.getWriter(); PdfFormField field = PdfFormField.createCheckBox(writer); Element e = box.getElement(); String onValue = getValue(e); boolean checked = isChecked(e); float width = outputDevice.getDeviceLength(getWidth()); float height = outputDevice.getDeviceLength(getHeight()); FSColor color = box.getStyle().getColor(); FSColor darker = box.getEffBackgroundColor(c).darkenColor(); createAppearances(cb, field, onValue, width, height, true, color, darker); createAppearances(cb, field, onValue, width, height, false, color, darker); field.setWidget(outputDevice.createLocalTargetArea(c, box), PdfAnnotation.HIGHLIGHT_INVERT); field.setFieldName(getFieldName(outputDevice, e)); field.setBorderStyle(new PdfBorderDictionary(0.0f, 0)); field.setValueAsName(checked ? onValue : OFF_STATE); field.setAppearanceState(checked ? onValue : OFF_STATE); if (isReadOnly(e)) { field.setFieldFlags(PdfFormField.FF_READ_ONLY); } writer.addAnnotation(field); }
public void paint(RenderingContext c, ITextOutputDevice outputDevice, BlockBox box) { PdfContentByte cb = outputDevice.getCurrentPage(); PdfWriter writer = outputDevice.getWriter(); PdfFormField field = PdfFormField.createCheckBox(writer); Element e = box.getElement(); String onValue = getValue(e); boolean checked = isChecked(e); float width = outputDevice.getDeviceLength(getWidth()); float height = outputDevice.getDeviceLength(getHeight()); FSColor color = box.getStyle().getColor(); FSColor darker = box.getEffBackgroundColor(c).darkenColor(); createAppearances(cb, field, onValue, width, height, true, color, darker); createAppearances(cb, field, onValue, width, height, false, color, darker); field.setWidget(outputDevice.createLocalTargetArea(c, box), PdfAnnotation.HIGHLIGHT_INVERT); field.setFieldName(getFieldName(outputDevice, e)); field.setBorderStyle(new PdfBorderDictionary(0.0f, 0)); field.setValueAsName(checked ? onValue : OFF_STATE); field.setAppearanceState(checked ? onValue : OFF_STATE); if (isReadOnly(e)) { field.setFieldFlags(PdfFormField.FF_READ_ONLY); } writer.addAnnotation(field); }