DynamicPDF by ceTe Software

com.cete.dynamicpdf.pageelements.forms
Class Button

java.lang.Object
  extended by com.cete.dynamicpdf.PageElement
      extended by com.cete.dynamicpdf.pageelements.TaggablePageElement
          extended by com.cete.dynamicpdf.pageelements.forms.FormElement
              extended by com.cete.dynamicpdf.pageelements.forms.Button

public class Button
extends FormElement

Represents the button field of a interactive forms.

A button is a purely interactive control that responds immediately to user input without retaining a permanent value.

NOTE: This page element cannot be used within a table cell, or tranformation group.

Licensing:
This class is a DynamicPDF Generator Enterprise Edition feature. One of the following licenses is required for non-evaluation usage:

View Example


Constructor Summary
Button(java.lang.String name, float x, float y, float width, float height)
          Creates a new instance of Button class.
 
Method Summary
 void draw(PageWriter writer)
          Draws the button to the given PageWriter object.
 Action getAction()
          Gets the action associated with this button.
 Behavior getBehavior()
          Gets the behavior of a button field.
 Font getFont()
          Gets the font of the field.
 float getFontSize()
          Gets the font size of the field.
 java.lang.String getLabel()
          Gets the label/caption of a field.
 void setAction(Action action)
          Sets the action.
 void setBehavior(Behavior behavior)
          Sets the field�s highlighting mode, the visual effect to be used when the mouse button is pressed or held down inside its active area.
 void setFont(Font font)
          Sets the font for the field.
 void setFontSize(float fontSize)
          Sets the font size for the field.
 void setLabel(java.lang.String label)
          Sets the label/caption of a field.
 
Methods inherited from class com.cete.dynamicpdf.pageelements.forms.FormElement
getBackgroundColor, getBorderColor, getBorderStyle, getHeight, getMappingName, getName, getOutput, getReaderEvents, getRotate, getTextColor, getToolTip, getWidth, getX, getY, isPrintable, isReadOnly, isVisible, setBackgroundColor, setBorderColor, setBorderStyle, setHeight, setMappingName, setName, setOutput, setPrintable, setReadOnly, setRotate, setTag, setTextColor, setToolTip, setVisible, setWidth, setX, setY
 
Methods inherited from class com.cete.dynamicpdf.pageelements.TaggablePageElement
getTag, getTagOrder, setTagOrder
 
Methods inherited from class com.cete.dynamicpdf.PageElement
getRequiredLicenseLevel, getStrID, setRequiredLicenseLevel, setStrID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Button

public Button(java.lang.String name,
              float x,
              float y,
              float width,
              float height)
Creates a new instance of Button class.

Parameters:
name - Name of a button.
x - X coordinate of a button.
y - Y coordinate of a button.
width - Width of a button.
height - Height of a button.
Method Detail

setFont

public void setFont(Font font)
Sets the font for the field.

Parameters:
font - the font for the field.

getFont

public Font getFont()
Gets the font of the field.

Returns:
the font of the field.

setFontSize

public void setFontSize(float fontSize)
Sets the font size for the field.

Parameters:
fontSize - the font size for the field.

getFontSize

public float getFontSize()
Gets the font size of the field.

Returns:
the font size of the field.

getLabel

public java.lang.String getLabel()
Gets the label/caption of a field.

Returns:
the label/caption of a field.

setLabel

public void setLabel(java.lang.String label)
Sets the label/caption of a field.

Parameters:
label - the label/caption of a field.

setBehavior

public void setBehavior(Behavior behavior)
Sets the field�s highlighting mode, the visual effect to be used when the mouse button is pressed or held down inside its active area.

Parameters:
behavior - the behavior of the button.

getBehavior

public Behavior getBehavior()
Gets the behavior of a button field.

Returns:
the behavior of a button field.

setAction

public void setAction(Action action)
Sets the action.

Parameters:
action - the action.

getAction

public Action getAction()
Gets the action associated with this button.

Returns:
the action associated with this button.

draw

public void draw(PageWriter writer)
Draws the button to the given PageWriter object.

Overrides:
draw in class TaggablePageElement
Throws:
GeneratorException - If Form Field with the same name already exist.
Parameters:
writer - PageWriter object to receive the button's output.
See Also:
PageWriter

DynamicPDF by ceTe Software

API Reference for DynamicPDF v10.07 for Java generated on Aug 12, 2020
© Copyright 2020, ceTe Software