Class FormField

java.lang.Object
org.openpdf.simple.extend.form.FormField
Direct Known Subclasses:
InputField, SelectField, TextAreaField

public abstract class FormField extends Object
  • Field Details

    • _parentForm

      private final XhtmlForm _parentForm
    • _element

      private final Element _element
    • _originalState

      private @Nullable FormFieldState _originalState
    • _component

      private JComponent _component
    • context

      private final LayoutContext context
    • box

      private final BlockBox box
    • intrinsicWidth

      protected @Nullable Integer intrinsicWidth
    • intrinsicHeight

      protected @Nullable Integer intrinsicHeight
  • Constructor Details

  • Method Details

    • getElement

      protected Element getElement()
    • getComponent

      public JComponent getComponent()
    • getParentForm

      public XhtmlForm getParentForm()
    • getIntrinsicSize

      @CheckReturnValue public Dimension getIntrinsicSize()
    • reset

      public void reset()
    • getUserAgentCallback

      protected UserAgentCallback getUserAgentCallback()
    • getOriginalState

      protected FormFieldState getOriginalState()
    • hasAttribute

      protected boolean hasAttribute(String attributeName)
    • getAttribute

      protected String getAttribute(String attributeName)
    • initialize

      private void initialize()
    • create

      public abstract @Nullable JComponent create()
    • loadOriginalState

      protected FormFieldState loadOriginalState()
    • applyOriginalState

      protected void applyOriginalState()
    • includeInSubmission

      public boolean includeInSubmission(JComponent source)
      Returns true if the value of the current FormField should be sent along with the current submission. This is used so that only the value of the submit button that is used to trigger the form's submission is sent.
      Parameters:
      source - The JComponent that caused the submission
      Returns:
      true if it should
    • getFormDataStrings

      public Collection<String> getFormDataStrings()
    • getFieldValues

      protected abstract String[] getFieldValues()
    • getBox

      public BlockBox getBox()
    • getContext

      public LayoutContext getContext()
    • getStyle

      public CalculatedStyle getStyle()
    • applyComponentStyle

      protected void applyComponentStyle(JComponent comp)
    • toColor

      private static Color toColor(FSColor color)
    • getFont

      public Font getFont()
    • getLengthValue

      protected static Integer getLengthValue(CalculatedStyle style, CSSName cssName)