de.mguennewig.pobjform.swing
Interface SwingFormElement

All Superinterfaces:
FormElement
All Known Implementing Classes:
PClassSwingSearchForm.SwingColumn, PClassSwingSearchForm.SwingCondition, PClassSwingSearchForm.SwingRestrict, PClassSwingSearchForm.SwingSort, SwingArrayElement, SwingButtonElement, SwingCheckboxElement, SwingInputElement, SwingRecordElement, SwingReferenceElement, SwingSpacerElement, SwingStringElement, SwingTextAreaElement, SwingTextElement

public interface SwingFormElement
extends FormElement

A Swing based form element.

Author:
Michael Günnewig

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 interface de.mguennewig.pobjform.FormElement
appendToList, getContainer, getEntry, getForm, getLabel, getProperty, getPullInPrefix, hasChanged, isMandatory, isPulledIn, isVisible, omitRowHeader, setLabel, setProperty, setPullInPrefix, setVisible, startsNewCell, validate
 

Method Detail

getComponent

javax.swing.JComponent getComponent()
Returns the Swing component for the input element.


getErrorComponent

javax.swing.JComponent getErrorComponent()
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.

Returns:
A Swing component if this element can have any errors, otherwise null is acceptable.
See Also:
updateErrorComponent()

updateErrorComponent

void updateErrorComponent()
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.

See Also:
getErrorComponent(), PObjForm.addMessage(String,de.mguennewig.pobjform.Message)

getLabelComponent

javax.swing.JLabel getLabelComponent()
Returns the Swing component to display the label.