Class FWLabelFormComponent

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, net.simplace.core.FWBusyIndicator, net.simplace.core.FWObserver

public class FWLabelFormComponent extends FWAbstractFormComponent
Form component that simply displays a descriptive text. This may be used to place instructions or descriptive text in a form. The text may be formatted using HTML. The text is taken from the locale (key = field id), from the parameter with the field id or from the element text, in this order; parameter tokens are replaced. With the attribute return="true" the text is also the value of the component.
Author:
Christoph Kunze
See Also:
  • Constructor Details

    • FWLabelFormComponent

      public FWLabelFormComponent(String aFormId, String aFieldId, org.jdom2.Element aFormElement, net.simplace.core.FWObservable aObservable)
      Parameters:
      aFormId - id of the form the component is placed in
      aFieldId - id of the component; also the locale key and parameter key of the text
      aFormElement - the form element; its text is the fallback text
      aObservable - parameters of the functionality
  • Method Details

    • getValue

      public String getValue()
      Specified by:
      getValue in class FWAbstractFormComponent
      Returns:
      the text if the attribute return is true, otherwise null
    • setValue

      public void setValue(Object aValue)
      Shows a text. Note: a text without <html> is not shown itself; instead the current text of the component is shown (tokens replaced, line breaks converted).
      Specified by:
      setValue in class FWAbstractFormComponent
      Parameters:
      aValue - text to be displayed, optionally with HTML formatting; null is ignored
    • update

      public void update(net.simplace.core.FWObservable aObservable, Object aKeyOfParameterChanged)
      In addition to the base behaviour, re-evaluates the element text (without form filler) with the changed parameters.
      Specified by:
      update in interface net.simplace.core.FWObserver
      Overrides:
      update in class FWAbstractFormComponent
      Parameters:
      aObservable - the parameters
      aKeyOfParameterChanged - key of the changed parameter
    • processFormFiller

      public void processFormFiller()
      Description copied from class: FWAbstractFormComponent
      Fills the component from its form filler (e.g. options or a chart); called after initialisation and whenever the jumper rule of the form filler changes.
      Specified by:
      processFormFiller in class FWAbstractFormComponent
    • getValueCell

      protected com.lowagie.text.Rectangle getValueCell(int aType)
      Description copied from class: FWAbstractFormComponent
      Returns the value cell used for generating the RTF, PDF or HTML version of the form.
      Specified by:
      getValueCell in class FWAbstractFormComponent
      Parameters:
      aType - output type, e.g. PrintHelper.TYPE_PDF
      Returns:
      an iText cell (PdfPCell for PDF, Cell otherwise)