com.pdfjet
Class CheckBox

java.lang.Object
  extended by com.pdfjet.CheckBox
All Implemented Interfaces:
Drawable

public class CheckBox
extends java.lang.Object
implements Drawable

Creates a CheckBox, which can be set checked or unchecked. By default the check box is unchecked.


Constructor Summary
CheckBox(Font font, java.lang.String label)
          Creates a CheckBox with black check mark.
 
Method Summary
 CheckBox check(int mark)
          Checks or unchecks this check box.
 float[] drawOn(Page page)
          Draws this CheckBox on the specified Page.
 float getHeight()
          Gets the height of the CheckBox.
 float getWidth()
          Gets the width of the CheckBox.
 CheckBox setActualText(java.lang.String actualText)
          Sets the actual text for this check box.
 CheckBox setAltDescription(java.lang.String altDescription)
          Sets the alternate description of this check box.
 CheckBox setBoxColor(int boxColor)
          Sets the color of the check box.
 CheckBox setCheckmark(int checkColor)
          Sets the color of the check mark.
 CheckBox setFontSize(float fontSize)
          Sets the font size to use for this text line.
 CheckBox setLocation(float x, float y)
          Set the x,y location on the Page.
 CheckBox setPosition(float x, float y)
          Set the x,y position on the Page.
 CheckBox setURIAction(java.lang.String uri)
          Sets the URI for the "click text line" action.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckBox

public CheckBox(Font font,
                java.lang.String label)
Creates a CheckBox with black check mark.

Method Detail

setFontSize

public CheckBox setFontSize(float fontSize)
Sets the font size to use for this text line.

Parameters:
fontSize - the fontSize to use.
Returns:
this CheckBox.

setBoxColor

public CheckBox setBoxColor(int boxColor)
Sets the color of the check box.

Parameters:
boxColor - the check box color specified as an 0xRRGGBB integer.
Returns:
this CheckBox.

setCheckmark

public CheckBox setCheckmark(int checkColor)
Sets the color of the check mark.

Parameters:
checkColor - the check mark color specified as an 0xRRGGBB integer.
Returns:
this CheckBox.

setPosition

public CheckBox setPosition(float x,
                            float y)
Set the x,y position on the Page.

Parameters:
x - the x coordinate on the Page.
y - the y coordinate on the Page.
Returns:
this CheckBox.

setLocation

public CheckBox setLocation(float x,
                            float y)
Set the x,y location on the Page.

Parameters:
x - the x coordinate on the Page.
y - the y coordinate on the Page.
Returns:
this CheckBox.

getHeight

public float getHeight()
Gets the height of the CheckBox.


getWidth

public float getWidth()
Gets the width of the CheckBox.


check

public CheckBox check(int mark)
Checks or unchecks this check box. See the Mark class for available options.

Returns:
this CheckBox.

setURIAction

public CheckBox setURIAction(java.lang.String uri)
Sets the URI for the "click text line" action.

Parameters:
uri - the URI.
Returns:
this CheckBox.

setAltDescription

public CheckBox setAltDescription(java.lang.String altDescription)
Sets the alternate description of this check box.

Parameters:
altDescription - the alternate description of the check box.
Returns:
this Checkbox.

setActualText

public CheckBox setActualText(java.lang.String actualText)
Sets the actual text for this check box.

Parameters:
actualText - the actual text for the check box.
Returns:
this CheckBox.

drawOn

public float[] drawOn(Page page)
               throws java.lang.Exception
Draws this CheckBox on the specified Page.

Specified by:
drawOn in interface Drawable
Parameters:
page - the Page where the CheckBox is to be drawn.
Returns:
x and y coordinates of the bottom right corner of this component.
Throws:
java.lang.Exception