net.simplace.pipe.formcomponents.FWAbstractFormSubComponent

Abstract class that is supposed to be overwritten by subcomponent implementations. Subcomponents may be used to assemble compound form components (see net.simplace.pipe.formcomponents.date.FWDateFormComponent) or to create form components that have a different appearance, depending on input parameters (see net.simplace.pipe.formcomponents.choice.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!


public abstract class FWAbstractFormSubComponent extends javax.swing.JPanel {
// Public Constructors
public FWAbstractFormSubComponent(boolean aIsEnabled, FWObservable
aObservable, Map aFormComponentParameterMap);

// Protected Instance Variables
protected FWObservable iObservable;
protected boolean iIsEnabled;
protected Map iFormComponentParameterMap;

// Public Instance Methods
public abstract String getValue();


returns value of the implemented subcomponent
public abstract List getSelectedValueList();


returns value of the implemented subcomponent
public boolean isEnabled(); // Defines java.awt.Component

public void setEnabled(boolean aEnabled); // Defines javax.swing.JComponent

public abstract void setValue(String aValue);

Allows to set the value of the implemented subcomponent
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.
public void removeChangeListener(ChangeListener aListener);

Allows form components to unregister previously registered change listeners on subcomponents
public ChangeListener[] getChangeListeners();


returns An array of all the change listeners that are currently registered on this component

// Protected Instance Methods
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.
protected String getLocaleValue(String aKey);

This method limits the coding for reading values from the locale.
returns


}



Hierarchy: java.lang.Object - java.awt.Component (java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable) - java.awt.Container - javax.swing.JComponent (java.io.Serializable, javax.swing.TransferHandler.HasGetTransferHandler) - javax.swing.JPanel (javax.accessibility.Accessible) - FWAbstractFormSubComponent



Extended by: net.simplace.pipe.formcomponents.choice.FWCheckboxChoiceSubComponent, net.simplace.pipe.formcomponents.date.FWDaySubComponent, net.simplace.pipe.formcomponents.choice.FWLabelChoiceSubComponent, net.simplace.pipe.formcomponents.date.FWMonthSubComponent, net.simplace.pipe.formcomponents.choice.FWSingleCheckboxChoiceSubComponent, net.simplace.pipe.formcomponents.date.FWYearSubComponent