Klasse FWAbstractFormSubComponent

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
net.simplace.pipe.formcomponents.FWAbstractFormSubComponent
Alle implementierten Schnittstellen:
ImageObserver, MenuContainer, Serializable, Accessible
Bekannte direkte Unterklassen:
FWCheckboxChoiceSubComponent, FWDaySubComponent, FWLabelChoiceSubComponent, FWMonthSubComponent, FWSingleCheckboxChoiceSubComponent, FWTableChoiceSubComponent, FWYearSubComponent

public abstract class FWAbstractFormSubComponent extends JPanel
Abstract class that is supposed to be overwritten by subcomponent implementations. Subcomponents may be used to assemble compound form components (see FWDateFormComponent) or to create form components that have a different appearance, depending on input parameters (see FWChoiceFormComponent). Subcomponents cannot be directly used in forms but can only be contained in a form component that inherits from FWAbstractFormComponent. Form components may register change listeners on subcomponents to get notified of changes. This may be useful to keep several subcomponents synchronized and to keep the form component's value up-to-date. However, it is up to the implementation of the subcomponent to notify listeners by calling fireStateChanged() whenever its value changes!
Autor:
Christoph Kunze
Siehe auch:
  • Felddetails

    • iObservable

      protected FWObservable iObservable
    • iIsEnabled

      protected boolean iIsEnabled
    • iFormComponentParameterMap

      protected Map<String,Object> iFormComponentParameterMap
  • Konstruktordetails

    • FWAbstractFormSubComponent

      public FWAbstractFormSubComponent(boolean aIsEnabled, FWObservable aObservable, Map<String,Object> aFormComponentParameterMap)
      Parameter:
      aIsEnabled -
      aObservable -
      aFormComponentParameterMap -
  • Methodendetails

    • getValue

      public abstract String getValue()
      Gibt zurück:
      value of the implemented subcomponent
    • getSelectedValueList

      public abstract List<Object> getSelectedValueList()
      Gibt zurück:
      value of the implemented subcomponent
    • isEnabled

      public boolean isEnabled()
      Setzt außer Kraft:
      isEnabled in Klasse Component
    • setEnabled

      public void setEnabled(boolean aEnabled)
      Setzt außer Kraft:
      setEnabled in Klasse JComponent
    • setValue

      public abstract void setValue(String aValue)
      Allows to set the value of the implemented subcomponent
      Parameter:
      aValue - String representation of the value to be set
    • addChangeListener

      public void addChangeListener(ChangeListener aListener)
      Allows form components to register change listeners on subcomponents in order to get notified of changes. Implementations of subcomponents MUST call fireStateChanged() whenever their value changes, so that change listeners get notified.
      Parameter:
      aListener - Change Listener to be registered
    • removeChangeListener

      public void removeChangeListener(ChangeListener aListener)
      Allows form components to unregister previously registered change listeners on subcomponents
      Parameter:
      aListener - The previpusly registered change listener
    • fireStateChanged

      protected void fireStateChanged()
      Notifies change listeners of changes to the subcomponent. This method MUST get called, whenever the value of the subcomponent changes. However, calling it is up to the specific implementation of this abstract class.
    • getChangeListeners

      public ChangeListener[] getChangeListeners()
      Gibt zurück:
      An array of all the change listeners that are currently registered on this component
    • getLocaleValue

      protected String getLocaleValue(String aKey)
      This method limits the coding for reading values from the locale.
      Parameter:
      aKey -
      Gibt zurück: