net.simplace.pipe.formcomponents.FWAbstractFormComponent
This panel is supposed to be overwritten by component implementing classes that should be used to be shown in
FWFormPanel. It implements Observer to be updated while one other component changes his value. It
offers the notifyDependentComponents-function to update the observable with the current value of this component.
The observable will then inform all other components about this change. It is up to the implementations of
this abstract class to call notifyDependentComponents whenever necessary!
Implementations can use own configurations via XML. Feel free to use them as you need, but call the
superconstructor before beginning.
public abstract class FWAbstractFormComponent extends javax.swing.JPanel
implements net.simplace.core.FWObserver {
// Protected Constructors
protected FWAbstractFormComponent();
protected FWAbstractFormComponent(String aFormID, String aFieldID, boolean
aShowLabel, Element aFormElement, FWObservable aObservable);
protected FWAbstractFormComponent(String aFormID, String aFieldID, boolean
aShowLabel, int aDetachable, Element aFormElement, FWObservable
aObservable);
// Constants
public static final int DETACH_TRUE;
public static final int DETACH_FALSE;
public static final int DETACH_AUTO;
public static final int DETACH_BUTTON;
public static final int DETACH_LINKED;
protected static final int DETATCH_BORDER_WIDTH;
protected static final Color DETATCH_BORDER_DEFAULT_COLOR;
protected static final Color DETATCH_BORDER_HIGHLIGHT_COLOR;
protected static final ImageIcon DETATCH_BUTTON_DEFAULT_IMAGE;
protected static final ImageIcon DETATCH_BUTTON_HIGHLIGHT_IMAGE;
protected static final ImageIcon DETATCH_BUTTON_DISABLED_IMAGE;
protected static final ImageIcon PRINT_BUTTON_DEFAULT_IMAGE;
protected static final ImageIcon PRINT_BUTTON_HIGHLIGHT_IMAGE;
protected static final ImageIcon PRINT_BUTTON_DISABLED_IMAGE;
protected static final ImageIcon COPY_BUTTON_DEFAULT_IMAGE;
protected static final ImageIcon COPY_BUTTON_HIGHLIGHT_IMAGE;
protected static final ImageIcon COPY_BUTTON_DISABLED_IMAGE;
protected static final ImageIcon EXPORT_BUTTON_DEFAULT_IMAGE;
protected static final ImageIcon EXPORT_BUTTON_HIGHLIGHT_IMAGE;
protected static final ImageIcon EXPORT_BUTTON_DISABLED_IMAGE;
// Protected Instance Variables
protected FWObservable iObservable;
protected JPanel iDetachContentPanel;
// Public Instance Methods public abstract Object getValue();
returns value of the implemented component
public abstract void
setValue(Object aValue);
- aValue of the implemented component
public abstract void
processFormFiller();
- value of the implemented component
public String getFieldID();
returns field id of the implemented component
public void
setFormID(String aFormID);
public String getFormID();
returns form id of the implemented component
public void
setFieldID(String aFieldID);
public Element getFormElement();
returns the formElement
public boolean isRequired();
returns if form is required
public void
setRequired(boolean aRequiredness);
returns if form is required
public boolean isEnabled(); // Defines java.awt.Component
returns if formcomponent is enabled
public Dimension getPreferredSize(); // Defines javax.swing.JComponent
public Dimension getMaximumSize(); // Defines javax.swing.JComponent
public void
setObservable(
FWObservable aObservable);
- aObservable the observable to set
public void
setFormElement(Element aFormElement);
- aFormElement the formElement to set
public int getDetachability();
returns s if component is detachable
public void
attachPanel(
FWDetachFrame aDetachFrame);
detaches the detachpanel im possible
public void
disposePanel(
FWDetachFrame aDetachFrame);
detaches the detachpanel im possible
public void
detachPanel(boolean aUpdateContent);
detaches the detachpanel im possible
public void remove(Component aComp); // Overrides java.awt.Container
public void add(Component aComp, Object aConstraints);
// Overrides java.awt.Container
public void
add(Component aComp, Object aConstraints, boolean aUseScrollbar);
- aComp
- aConstraints
- aUseScrollbar
public boolean isClosingRequired();
Manages all things that have to be done while closing a Form. For exaple closing the detached frames if
user wants them to be closed
returns
public void closeFormComponent();
Manages all things that have to be done while closing a Form. For exaple closing the detached frames if
user wants them to be closed
public String getTitle();
returns the Title of Component
public String getSystemID();
returns the SystemID of Component
public void
setTitle(String aTitle);
setting Title of Component
public void setDefault();
public String toString(); // Defines java.awt.Component
public String getRequiredWarning();
returns s the Value from RequiredWarning. If empty returning a default value
public Rectangle[]
getCells(int aType);
returns s the Value from RequiredWarning. If empty returning a default value
// Protected Instance Methods protected void
init(String aFormID, String aFieldID, boolean aShowLabel, int
aDetachable, Element aFormElement,
FWObservable aObservable);
- aFormID
- aFieldID
- aShowLabel
- aDetachable
- aFormElement
- aObservable
protected void
setUpDetachControl(int aDetachability);
protected String
getOriginalComponentParameteterValue(String aKey);
returns the Value of the given parameterkey in FormElement parameters
protected String
getComponentParameteterValue(String aKey);
returns the Value of the given parameterkey in FormElement parameters
protected void notifyDependentComponents();
Updates the functionalities' parameter map with the current value of this
control so other form components that observe the parameter map get notified.
Implementations MUST call this function, whenever their value changes.
protected Element getConfiguration();
gets the detailed configuration of the Processor.
returns the configuration Element
protected void
setConfiguration(String aClassname, Element
aConfigurationElement);
sets the detailed configuration of a Processor.
- aClassname
- aConfigurationElement
protected boolean hasConfiguration();
gets the detailed configuration of the Processor.
returns if component has a special configuration
protected String
getLocaleValue(String aKey, String aDefault);
This method limits the coding for reading values from the locale.
returns protected String
getLocaleValue(String aKey);
This method limits the coding for reading values from the locale.
returns protected void exportData();
updates different functions like enabling of the Component
protected boolean hasFormFiller();
returns if the formFiller was initialized
protected String getJumper();
returns the jumper
protected String getJumperRule();
returns the jumperRule
protected void createDetachControls(JPanel aContentPanel);
protected void
setDetachControlsHighlighted(boolean aHighlighted);
Makes the detach button and related controls appear highlighted or not according to aHighlighted
protected void
setDetachControlsEnabled(boolean aEnabled);
Sets the enabled state of the detach button to aEnabled and clears the highlighted state if aEnabled is false.
To query the enabled state, use the isEnabled method of iDetachButton!
protected abstract Rectangle
getValueCell(int aType);
returns the value label to use for generating rtf, pdf or html version of the form
returns iText Cell
}
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) - FWAbstractFormComponent (net.simplace.core.FWObserver)
Extended by: FWAbstractExtendedFormComponent, net.simplace.pipe.formcomponents.result.FWChartFormComponent, FWCheckValueFormComponent, net.simplace.pipe.formcomponents.choice.FWChoiceFormComponent, net.simplace.pipe.formcomponents.database.FWDatabaseAccessFormComponent, net.simplace.pipe.formcomponents.date.FWDateFormComponent, net.simplace.pipe.formcomponents.integer.FWDoubleFormComponent, net.simplace.pipe.formcomponents.file.FWFileChooserFormComponent, FWGroupFormComponent, FWHeaderFormComponent, net.simplace.pipe.formcomponents.result.FWImageFormComponent, net.simplace.pipe.formcomponents.integer.FWIntegerFormComponent, FWLabelFormComponent, FWMemoryMonitorFormComponent, FWPasswordFormComponent, net.simplace.pipe.formcomponents.button.FWProcessorButtonFormComponent, FWProgressFormComponent, net.simplace.pipe.formcomponents.result.FWResultFormComponent, net.simplace.pipe.formcomponents.table.FWTableFormComponent, FWTextFormComponent, FWTreeFormComponent
Passed to: net.simplace.pipe.util.components.detach.FWDetachFrame()
Returned by: net.simplace.pipe.util.FWFormPanel.createFormComponent(), net.simplace.pipe.util.FWFormPanel.createFormComponent(), net.simplace.pipe.util.FWFormComponentFactory.createFormComponent()