Class CheckBox

java.lang.Object
net.atthegate.server.service.pdf.CheckBox
All Implemented Interfaces:
Drawable

public class CheckBox extends Object implements Drawable
Creates a CheckBox, which can be set checked or unchecked. By default the check box is unchecked.
  • Constructor Details

    • CheckBox

      public CheckBox(Font font, String label)
      Creates a CheckBox with black check mark.
  • Method Details

    • 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(String uri)
      Sets the URI for the "click text line" action.
      Parameters:
      uri - the URI.
      Returns:
      this CheckBox.
    • setAltDescription

      public CheckBox setAltDescription(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(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 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:
      Exception