org.docx4j.org.xhtmlrenderer.pdf
Class AbstractFormField

java.lang.Object
  extended by org.docx4j.org.xhtmlrenderer.pdf.AbstractFormField
All Implemented Interfaces:
ReplacedElement, ITextReplacedElement
Direct Known Subclasses:
CheckboxFormField, RadioButtonFormField, SelectFormField, TextAreaFormField, TextFormField

public abstract class AbstractFormField
extends Object
implements ITextReplacedElement


Field Summary
protected static String DEFAULT_CHECKED_STATE
           
protected static String OFF_STATE
           
 
Constructor Summary
AbstractFormField()
           
 
Method Summary
 void detach(LayoutContext c)
           
protected  String getFieldName(ITextOutputDevice outputDevice, Element e)
           
protected abstract  String getFieldType()
           
protected  int getHeight()
           
 int getIntrinsicHeight()
           
 int getIntrinsicWidth()
           
 Point getLocation()
          Returns the current location where the element will be rendered on the canvas
protected  String getValue(Element e)
           
protected  int getWidth()
           
protected  int getX()
           
protected  int getY()
           
protected  void initDimensions(LayoutContext c, BlockBox box, int cssWidth, int cssHeight)
           
protected  boolean isChecked(Element e)
           
protected  boolean isReadOnly(Element e)
           
 boolean isRequiresInteractivePaint()
           
protected  boolean isSelected(Element e)
           
protected  void setFillColor(com.lowagie.text.pdf.PdfTemplate template, FSColor color)
           
protected  void setHeight(int height)
           
 void setLocation(int x, int y)
          Assigns the new locations where the element will be rendered.
protected  void setStrokeColor(com.lowagie.text.pdf.PdfTemplate template, FSColor color)
           
protected  void setWidth(int width)
           
protected  void setX(int x)
           
protected  void setY(int y)
           
protected  String spaces(int count)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.docx4j.org.xhtmlrenderer.pdf.ITextReplacedElement
paint
 
Methods inherited from interface org.docx4j.org.xhtmlrenderer.extend.ReplacedElement
getBaseline, hasBaseline
 

Field Detail

DEFAULT_CHECKED_STATE

protected static final String DEFAULT_CHECKED_STATE
See Also:
Constant Field Values

OFF_STATE

protected static final String OFF_STATE
See Also:
Constant Field Values
Constructor Detail

AbstractFormField

public AbstractFormField()
Method Detail

getFieldType

protected abstract String getFieldType()

getX

protected int getX()

setX

protected void setX(int x)

getY

protected int getY()

setY

protected void setY(int y)

getWidth

protected int getWidth()

setWidth

protected void setWidth(int width)

getHeight

protected int getHeight()

setHeight

protected void setHeight(int height)

getFieldName

protected String getFieldName(ITextOutputDevice outputDevice,
                              Element e)

getValue

protected String getValue(Element e)

isChecked

protected boolean isChecked(Element e)

isReadOnly

protected boolean isReadOnly(Element e)

isSelected

protected boolean isSelected(Element e)

detach

public void detach(LayoutContext c)
Specified by:
detach in interface ReplacedElement

getIntrinsicHeight

public int getIntrinsicHeight()
Specified by:
getIntrinsicHeight in interface ReplacedElement

getIntrinsicWidth

public int getIntrinsicWidth()
Specified by:
getIntrinsicWidth in interface ReplacedElement

getLocation

public Point getLocation()
Description copied from interface: ReplacedElement
Returns the current location where the element will be rendered on the canvas

Specified by:
getLocation in interface ReplacedElement
Returns:
see desc

isRequiresInteractivePaint

public boolean isRequiresInteractivePaint()
Specified by:
isRequiresInteractivePaint in interface ReplacedElement

setLocation

public void setLocation(int x,
                        int y)
Description copied from interface: ReplacedElement
Assigns the new locations where the element will be rendered.

Specified by:
setLocation in interface ReplacedElement
Parameters:
x - new horizontal pos
y - new vertical pos

initDimensions

protected void initDimensions(LayoutContext c,
                              BlockBox box,
                              int cssWidth,
                              int cssHeight)

spaces

protected String spaces(int count)

setStrokeColor

protected void setStrokeColor(com.lowagie.text.pdf.PdfTemplate template,
                              FSColor color)

setFillColor

protected void setFillColor(com.lowagie.text.pdf.PdfTemplate template,
                            FSColor color)


Copyright © 2011-2012. All Rights Reserved.