Class FWResultFormComponent

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

public class FWResultFormComponent extends FWAbstractFormComponent
This form component displays results dynamically. The content is shown by a result panel (FWAbstractResultFormComponentPanel) chosen by show mode (chart, the default, or crop) or by class name. The content can be passed by a form filler or by static parameters:
<result id="mal1.chart" showpanel="false">
  <!-- with form filler: -->
  <parameter key="formFiller">net.simplace.pipe.filler.FWDatabaseFormComponentFiller</parameter>
  <parameter key="formFiller.contentfield">initial</parameter>
  <parameter key="formFiller.jumper">${mal1.choice2}</parameter>
  <parameter key="formFiller.styletype">st_9</parameter>
  <!-- or without form filler: -->
  <parameter key="result.showmode">chart</parameter> <!-- or result.class -->
  <parameter key="result.jumper">${mal1.choice2}</parameter>
  <parameter key="result.styletype">st_9</parameter> <!-- only for chart results -->
</result>
The jumper may also be a <result class="..." showmode="..."> element with the panel parameters. The component has no value.
Author:
Andreas Enders
See Also:
  • Field Details

    • iContentPanel

      protected JPanel iContentPanel
      The result panel currently displayed.
  • Constructor Details

    • FWResultFormComponent

      public FWResultFormComponent(String aFormID, String aFieldID, boolean aShowLabel, int aDetachable, org.jdom2.Element aFormElement, net.simplace.core.FWObservable aObservable)
      Creates the component; without form filler the result panel is created from the static parameters.
      Parameters:
      aFormID - id of the form the component is placed in
      aFieldID - id of the component
      aShowLabel - true to show a caption label
      aDetachable - detachability, one of the DETACH_* constants
      aFormElement - the form element
      aObservable - parameters of the functionality
  • Method Details

    • getValue

      public String getValue()
      Specified by:
      getValue in class FWAbstractFormComponent
      Returns:
      always null; a result component has no value
    • setValue

      public void setValue(Object aValue)
      Does nothing; a result component has no value.
      Specified by:
      setValue in class FWAbstractFormComponent
      Parameters:
      aValue - not used
    • update

      public void update(net.simplace.core.FWObservable aObservabal, Object aKeyOfParameterChanged)
      In addition to the base behaviour, re-creates the result panel from the static parameters (without form filler) if show mode, class or jumper changed.
      Specified by:
      update in interface net.simplace.core.FWObserver
      Overrides:
      update in class FWAbstractFormComponent
      Parameters:
      aObservabal - the parameters
      aKeyOfParameterChanged - key of the changed parameter
    • processFormFiller

      public void processFormFiller()
      Determines the result panel class (from a <result> jumper, the attributes class/showmode or the parameter result.showmode) and re-creates the result panel with the form filler.
      Specified by:
      processFormFiller in class FWAbstractFormComponent
    • exportData

      protected void exportData()
      Delegates the export to the displayed result panel.
      Overrides:
      exportData 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)