de.mguennewig.pobjform
Class AbstractLinkElement

java.lang.Object
  extended by de.mguennewig.pobjform.AbstractFormElement
      extended by de.mguennewig.pobjform.AbstractLinkElement
All Implemented Interfaces:
FormElement, LinkElement
Direct Known Subclasses:
HtmlLinkElement

public abstract class AbstractLinkElement
extends AbstractFormElement
implements LinkElement

Abstract base implementation for a form element that shows a link.

Author:
Michael Günnewig

Constructor Summary
AbstractLinkElement(PObjForm form, LinkEntry entry)
          Creates a new AbstractLinkElement.
 
Method Summary
 java.lang.String getLinkUrl()
          Returns the URL the link is pointing to.
 boolean hasChanged()
          Tests whether the data for this element has been changed.
 boolean isMandatory()
          Tests whether data for this element must be entered.
 boolean isVisible()
          Tests whether this element will write anything visible.
 void setLinkUrl(java.lang.String url)
          Sets the URL the link will point to.
 void setVisible(boolean visible)
          Sets whether the link is visible.
 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

AbstractLinkElement

public AbstractLinkElement(PObjForm form,
                           LinkEntry entry)
Creates a new AbstractLinkElement.

Method Detail

hasChanged

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

Specified by:
hasChanged in interface FormElement

isMandatory

public final 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

validate

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

Specified by:
validate in interface FormElement

getLinkUrl

public final java.lang.String getLinkUrl()
Returns the URL the link is pointing to.

Specified by:
getLinkUrl in interface LinkElement

setLinkUrl

public void setLinkUrl(java.lang.String url)
Sets the URL the link will point to.

Specified by:
setLinkUrl in interface LinkElement

setVisible

public void setVisible(boolean visible)
Sets whether the link is visible.

Specified by:
setVisible in interface FormElement
Specified by:
setVisible in interface LinkElement