de.mguennewig.pobjform
Class AbstractTextElement

java.lang.Object
  extended by de.mguennewig.pobjform.AbstractFormElement
      extended by de.mguennewig.pobjform.AbstractTextElement
All Implemented Interfaces:
FormElement, TextElement
Direct Known Subclasses:
HtmlTextElement, SwingTextElement

public abstract class AbstractTextElement
extends AbstractFormElement
implements TextElement

Common base class for all text element implementations.

Author:
Michael Günnewig

Constructor Summary
AbstractTextElement(PObjForm form, TextEntry entry)
          Creates a new AbstractTextElement.
 
Method Summary
 java.lang.String getText()
          
 boolean hasChanged()
          Tests whether the data for this element has been changed.
 boolean isMandatory()
          Tests whether data for this element must be entered.
 boolean isRightAligned()
          Returns whether the text will be right aligned.
 boolean isVisible()
          Tests whether this element will write anything visible.
 void setRightAligned(boolean rightAligned)
          Sets whether the text should be right aligned.
 void setText(java.lang.String text)
          
 void setVisible(boolean visible)
          Sets whether this element will be written visibly.
 void validate()
          Checks for a valid value in this form element and any possible children.
 
Methods inherited from class de.mguennewig.pobjform.AbstractFormElement
appendToList, getContainer, getEntry, getForm, getLabel, getProperty, getPullInPrefix, isPulledIn, omitRowHeader, setLabel, setProperty, setPullInPrefix, startsNewCell
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.mguennewig.pobjform.FormElement
appendToList, getContainer, getEntry, getForm, getLabel, getProperty, getPullInPrefix, isPulledIn, omitRowHeader, setLabel, setProperty, setPullInPrefix, startsNewCell
 

Constructor Detail

AbstractTextElement

public AbstractTextElement(PObjForm form,
                           TextEntry entry)
Creates a new AbstractTextElement.

Method Detail

isMandatory

public boolean isMandatory()
Tests whether data for this element must be entered.

Specified by:
isMandatory in interface FormElement

isVisible

public final boolean isVisible()
Tests whether this element will write anything visible.

Specified by:
isVisible in interface FormElement

setVisible

public void setVisible(boolean visible)
Sets whether this element will be written visibly.

Specified by:
setVisible in interface FormElement

hasChanged

public boolean hasChanged()
Tests whether the data for this element has been changed.

Specified by:
hasChanged in interface FormElement

validate

public void validate()
Checks for a valid value in this form element and any possible children.

Specified by:
validate in interface FormElement

getText

public final java.lang.String getText()

Specified by:
getText in interface TextElement

setText

public void setText(java.lang.String text)

Specified by:
setText in interface TextElement

isRightAligned

public final boolean isRightAligned()
Returns whether the text will be right aligned.

Specified by:
isRightAligned in interface TextElement

setRightAligned

public void setRightAligned(boolean rightAligned)
Sets whether the text should be right aligned.

Specified by:
setRightAligned in interface TextElement