Class FWAbstractResultFormComponentPanel

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
net.simplace.pipe.formcomponents.result.FWAbstractResultFormComponentPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
FWChartResultFormComponentPanel, FWCropResultFormComponentPanel

public abstract class FWAbstractResultFormComponentPanel extends JPanel
Base class of the result panels displayed by FWResultFormComponent (see there for the configuration). Panels are instantiated by class name and initialised with initialize(String, FWAbstractFormComponentFiller, Element, FWObservable); they take their content from the form filler (initFromFiller()) or from static parameters (initFromParameters()).

The jumper may be

  • a <result> element whose children are the panel parameters (jumper, title, ...)
  • in compatibility mode jumper[&&title]&&style
  • a plain value; the parameters are then taken from the form element
Author:
Andreas Enders
See Also:
  • Constructor Details

    • FWAbstractResultFormComponentPanel

      public FWAbstractResultFormComponentPanel()
  • Method Details

    • initialize

      public void initialize(String aJumper, FWAbstractFormComponentFiller aFiller, org.jdom2.Element aFormElement, net.simplace.core.FWObservable aObservable)
      Initialises the panel: evaluates the jumper and the title (parameter title, localised, or title_<locale>) and calls initFromFiller() or initFromParameters().
      Parameters:
      aJumper - the jumper (see class description)
      aFiller - the form filler, or null
      aFormElement - the form element of the result component
      aObservable - parameters of the functionality
    • initFromFiller

      protected abstract void initFromFiller()
      initializes from filler as source remember to initialize the title
    • initFromParameters

      protected abstract void initFromParameters()
      initializes from static parameters as source remember to initialize the title
    • exportData

      public abstract void exportData()
      exporting data of this result
    • getTitle

      public String getTitle()
      Returns:
      delivers the title of the component
    • setTitle

      protected void setTitle(String aTitle)
      Sets the title of the component (parameter tokens are replaced).
      Parameters:
      aTitle - the title
    • getOriginalComponentParameteterValue

      protected String getOriginalComponentParameteterValue(String aKey)
      Parameters:
      aKey - parameter key
      Returns:
      the raw value of the panel parameter (tokens not replaced), or null
    • getComponentParameterValue

      protected String getComponentParameterValue(String aKey)
      Parameters:
      aKey - parameter key
      Returns:
      the value of the panel parameter with tokens replaced, or null
    • getComponentParameterMap

      protected Map<String,Object> getComponentParameterMap()
      Returns:
      the panel parameters
    • getFiller

      protected FWAbstractFormComponentFiller getFiller()
      Returns:
      the filler
    • hasFiller

      protected boolean hasFiller()
      Returns:
      true if a form filler is set
    • getFormElement

      protected org.jdom2.Element getFormElement()
      Returns:
      the formElement
    • getSystemID

      public String getSystemID()
      Returns:
      the SystemID of Component
    • getJumper

      protected String getJumper()
      Returns:
      the jumper
    • getLocaleValue

      protected String getLocaleValue(String aKey, String aDefault)
      Reads a localised text <locale prefix>.FormComponent.<key> from the locale bundle of the system.
      Parameters:
      aKey - key of the text
      aDefault - text returned if the key is missing
      Returns:
      the localised text
    • getObservable

      protected net.simplace.core.FWObservable getObservable()
      Returns:
      the observable