org.xhtmlrenderer.simple.extend.form
Class FormField

java.lang.Object
  extended by org.xhtmlrenderer.simple.extend.form.FormField
Direct Known Subclasses:
InputField

public abstract class FormField
extends Object


Field Summary
protected  Integer intrinsicHeight
           
protected  Integer intrinsicWidth
           
 
Constructor Summary
FormField(Element e, XhtmlForm form, LayoutContext context, BlockBox box)
           
 
Method Summary
protected  void applyComponentStyle(JComponent comp)
           
protected  void applyOriginalState()
           
abstract  JComponent create()
           
protected  String getAttribute(String attributeName)
           
 BlockBox getBox()
           
 JComponent getComponent()
           
 LayoutContext getContext()
           
protected  Element getElement()
           
protected abstract  String[] getFieldValues()
           
 Font getFont()
           
 String[] getFormDataStrings()
           
 Dimension getIntrinsicSize()
           
protected static Integer getLengthValue(CalculatedStyle style, CSSName cssName)
           
protected  FormFieldState getOriginalState()
           
 XhtmlForm getParentForm()
           
 CalculatedStyle getStyle()
           
protected  UserAgentCallback getUserAgentCallback()
           
protected  boolean hasAttribute(String attributeName)
           
 boolean includeInSubmission(JComponent source)
          Returns true if the value of the current FormField should be sent along with the current submission.
protected  FormFieldState loadOriginalState()
           
 void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

intrinsicWidth

protected Integer intrinsicWidth

intrinsicHeight

protected Integer intrinsicHeight
Constructor Detail

FormField

public FormField(Element e,
                 XhtmlForm form,
                 LayoutContext context,
                 BlockBox box)
Method Detail

getElement

protected Element getElement()

getComponent

public JComponent getComponent()

getParentForm

public XhtmlForm getParentForm()

getIntrinsicSize

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)

create

public abstract 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 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)

getFont

public Font getFont()

getLengthValue

protected static Integer getLengthValue(CalculatedStyle style,
                                        CSSName cssName)


Copyright © 2013. All Rights Reserved.