Package com.lowagie.text

Examples of com.lowagie.text.LwgRectangle


     * @param lly
     * @param urx
     * @param ury
     */
    public void setTextFieldParams(PdfFormField field, String text, String name, float llx, float lly, float urx, float ury) {
        field.setWidget(new LwgRectangle(llx, lly, urx, ury), PdfAnnotation.HIGHLIGHT_INVERT);
        field.setValueAsString(text);
        field.setDefaultValueAsString(text);
        field.setFieldName(name);
        field.setFlags(PdfAnnotation.FLAGS_PRINT);
        field.setPage();
View Full Code Here


     * @param lly
     * @param urx
     * @param ury
     */
    public void setCheckBoxParams(PdfFormField field, String name, String value, boolean status, float llx, float lly, float urx, float ury) {
        field.setWidget(new LwgRectangle(llx, lly, urx, ury), PdfAnnotation.HIGHLIGHT_TOGGLE);
        field.setFieldName(name);
        if (status) {
            field.setValueAsName(value);
            field.setAppearanceState(value);
        }
View Full Code Here

     * @param ury
     * @return a PdfFormField
     */
    public PdfFormField addRadioButton(PdfFormField radiogroup, String value, float llx, float lly, float urx, float ury) {
        PdfFormField radio = PdfFormField.createEmpty(writer);
        radio.setWidget(new LwgRectangle(llx, lly, urx, ury), PdfAnnotation.HIGHLIGHT_TOGGLE);
        String name = ((PdfName)radiogroup.get(PdfName.V)).toString().substring(1);
        if (name.equals(value)) {
            radio.setAppearanceState(value);
        }
        else {
View Full Code Here

     * @param lly
     * @param urx
     * @param ury
     */
    public void setChoiceParams(PdfFormField field, String name, String defaultValue, float llx, float lly, float urx, float ury) {
        field.setWidget(new LwgRectangle(llx, lly, urx, ury), PdfAnnotation.HIGHLIGHT_INVERT);
        if (defaultValue != null) {
            field.setValueAsString(defaultValue);
            field.setDefaultValueAsString(defaultValue);
        }
        field.setFieldName(name);
View Full Code Here

     * @param urx
     * @param ury
     */
    public void setSignatureParams(PdfFormField field, String name,
                    float llx, float lly, float urx, float ury) {
        field.setWidget(new LwgRectangle(llx, lly, urx, ury), PdfAnnotation.HIGHLIGHT_INVERT);
        field.setFieldName(name);
        field.setFlags(PdfAnnotation.FLAGS_PRINT);
        field.setPage();
        field.setMKBorderColor(java.awt.Color.black);
        field.setMKBackgroundColor(java.awt.Color.white);
View Full Code Here

        }
        int len = fullCode.length();
        float fullWidth = (len + 2) * 11 * x + 2 * x;
        fullWidth = Math.max(fullWidth, fontX);
        float fullHeight = barHeight + fontY;
        return new LwgRectangle(fullWidth, fullHeight);
    }
View Full Code Here

        PdfAppearance tpl = new PdfAppearance();
        tpl.writer = writer;
        tpl.pdf = pdf;
        tpl.thisReference = thisReference;
        tpl.pageResources = pageResources;
        tpl.bBox = new LwgRectangle(bBox);
        tpl.group = group;
        tpl.layer = layer;
        if (matrix != null) {
            tpl.matrix = new PdfArray(matrix);
        }
View Full Code Here

        backgr.setColorFill(background);
        backgr.rectangle(left, bottom, right - left, top - bottom);
        backgr.fill();
      }
      if (cell.hasBorders()) {
        LwgRectangle newRect = new LwgRectangle(left, bottom, right, top);
        // Clone non-position parameters except for the background color
        newRect.cloneNonPositionParameters(cell);
        newRect.setBackgroundColor(null);
        // Write the borders on the line canvas
        PdfContentByte lineCanvas = canvases[LwgPdfPTable.LINECANVAS];
        lineCanvas.rectangle(newRect);
      }
    }
View Full Code Here

                    }
                }
            }
      PdfPCellEvent evt = cell.getCellEvent();
      if (evt != null) {
        LwgRectangle rect = new LwgRectangle(cell.getLeft() + xPos, cell.getTop()
            + yPos - currentMaxHeight, cell.getRight() + xPos, cell.getTop()
            + yPos);
        evt.cellLayout(cell, rect, canvases);
      }
    }
View Full Code Here

    /**
     * Returns the high level version of this PdfRectangle
     * @return this PdfRectangle translated to class LwgRectangle
     */
    public LwgRectangle getRectangle() {
      return new LwgRectangle(left(), bottom(), right(), top());
    }
View Full Code Here

TOP

Related Classes of com.lowagie.text.LwgRectangle

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.