de.mguennewig.pobjform.swing
Class SwingSpacerElement

java.lang.Object
  extended by de.mguennewig.pobjform.AbstractFormElement
      extended by de.mguennewig.pobjform.AbstractSpacerElement
          extended by de.mguennewig.pobjform.swing.SwingSpacerElement
All Implemented Interfaces:
FormElement, SpacerElement, SwingFormElement

public final class SwingSpacerElement
extends AbstractSpacerElement
implements SwingFormElement

Class description goes here.

Author:
Michael Günnewig

Constructor Summary
SwingSpacerElement(PObjSwingForm form, SpacerEntry entry)
          Creates a new SwingSpacerElement.
 
Method Summary
 javax.swing.JComponent getComponent()
          Returns the Swing component for the input element.
 javax.swing.JComponent getErrorComponent()
          Returns the Swing component to display any errors.
 javax.swing.JLabel getLabelComponent()
          Returns the Swing component to display the label.
 void updateErrorComponent()
          Updates the error messages that are displayed by the error component.
 
Methods inherited from class de.mguennewig.pobjform.AbstractSpacerElement
getRenderAs, hasChanged, isMandatory, isVisible, setVisible, validate
 
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, hasChanged, isMandatory, isPulledIn, isVisible, omitRowHeader, setLabel, setProperty, setPullInPrefix, setVisible, startsNewCell, validate
 

Constructor Detail

SwingSpacerElement

public SwingSpacerElement(PObjSwingForm form,
                          SpacerEntry entry)
Creates a new SwingSpacerElement.

Method Detail

getComponent

public javax.swing.JComponent getComponent()
Description copied from interface: SwingFormElement
Returns the Swing component for the input element.

Specified by:
getComponent in interface SwingFormElement

getErrorComponent

public javax.swing.JComponent getErrorComponent()
Description copied from interface: SwingFormElement
Returns the Swing component to display any errors.

This method must return a valid component for any element that can have an error even if currently no error exists.

Specified by:
getErrorComponent in interface SwingFormElement
Returns:
A Swing component if this element can have any errors, otherwise null is acceptable.
See Also:
SwingFormElement.updateErrorComponent()

updateErrorComponent

public void updateErrorComponent()
Description copied from interface: SwingFormElement
Updates the error messages that are displayed by the error component.

To prevent layout changes of the dialog the error component is always present in the dialog even if no error currently exists. This method will be called every time possible error messages have been added to the form.

Specified by:
updateErrorComponent in interface SwingFormElement
See Also:
SwingFormElement.getErrorComponent(), PObjForm.addMessage(String,de.mguennewig.pobjform.Message)

getLabelComponent

public final javax.swing.JLabel getLabelComponent()
Description copied from interface: SwingFormElement
Returns the Swing component to display the label.

Specified by:
getLabelComponent in interface SwingFormElement