de.mguennewig.pobjform
Class AbstractFormElement

java.lang.Object
  extended by de.mguennewig.pobjform.AbstractFormElement
All Implemented Interfaces:
FormElement
Direct Known Subclasses:
AbstractButtonElement, AbstractLinkElement, AbstractSpacerElement, AbstractTextElement, AbstractValueElement

public abstract class AbstractFormElement
extends java.lang.Object
implements FormElement

Abstract implementation of an form element.

Author:
Michael Günnewig

Constructor Summary
AbstractFormElement(PObjForm form, FormEntry entry)
          Creates a new AbstractFormElement.
 
Method Summary
 void appendToList(java.util.List<FormElement> elements)
          
 Container getContainer()
          Returns the database connection.
 FormEntry getEntry()
          Returns the form entry specification for this element.
 PObjForm getForm()
          Returns the form to which this element belongs.
 java.lang.String getLabel()
          Returns the label for this form element.
 java.lang.String getProperty()
          Returns the property for this form element.
 java.lang.String getPullInPrefix()
          Returns the pullInPrefix.
 boolean isPulledIn()
          Tests whether this element will be pulled into previous line.
 boolean omitRowHeader()
          Tests whether for this element the header row should be omited.
 void setLabel(java.lang.String label)
          Sets the label of this form element to a new value.
 void setProperty(java.lang.String property)
          Sets the property to a new value, and propagates the change to all child elements.
 void setPullInPrefix(java.lang.String pullInPrefix)
          Sets the pullInPrefix.
 boolean startsNewCell()
          Tests whether this element will start a new cell in the current row.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.mguennewig.pobjform.FormElement
hasChanged, isMandatory, isVisible, setVisible, validate
 

Constructor Detail

AbstractFormElement

public AbstractFormElement(PObjForm form,
                           FormEntry entry)
Creates a new AbstractFormElement.

Method Detail

getForm

public final PObjForm getForm()
Returns the form to which this element belongs.

Specified by:
getForm in interface FormElement

getEntry

public final FormEntry getEntry()
Returns the form entry specification for this element.

Specified by:
getEntry in interface FormElement

getContainer

public final Container getContainer()
Returns the database connection.

Specified by:
getContainer in interface FormElement
See Also:
PObjForm.getContainer()

getProperty

public final java.lang.String getProperty()
Returns the property for this form element.

Specified by:
getProperty in interface FormElement

setProperty

public void setProperty(java.lang.String property)
Sets the property to a new value, and propagates the change to all child elements.

Specified by:
setProperty in interface FormElement

getLabel

public final java.lang.String getLabel()
Returns the label for this form element.

Specified by:
getLabel in interface FormElement

setLabel

public void setLabel(java.lang.String label)
Sets the label of this form element to a new value.

Specified by:
setLabel in interface FormElement

getPullInPrefix

public final java.lang.String getPullInPrefix()
Returns the pullInPrefix.

Specified by:
getPullInPrefix in interface FormElement
See Also:
FormElement.setPullInPrefix(String)

setPullInPrefix

public void setPullInPrefix(java.lang.String pullInPrefix)
Sets the pullInPrefix.

If the form element is pulled into a line (and is not the first element of that line), then this text is written in front of the element.

Specified by:
setPullInPrefix in interface FormElement

isPulledIn

public final boolean isPulledIn()
Tests whether this element will be pulled into previous line.

Specified by:
isPulledIn in interface FormElement

omitRowHeader

public final boolean omitRowHeader()
Tests whether for this element the header row should be omited.

Specified by:
omitRowHeader in interface FormElement

startsNewCell

public final boolean startsNewCell()
Tests whether this element will start a new cell in the current row.

Specified by:
startsNewCell in interface FormElement

appendToList

public void appendToList(java.util.List<FormElement> elements)

Specified by:
appendToList in interface FormElement