public abstract class FInputPanel extends FPanel implements FormInputPanelMandatoryI
This class provides a foundation for creating form elements that handle user input. It extends "FPanel" and implements "FormInputPanelMandatoryI" to support mandatory field validation.
Additional Features:
| Modifier and Type | Field and Description |
|---|---|
static java.util.LinkedHashMap |
myActions |
static java.util.HashMap |
myAttributes |
static java.util.HashMap |
myElements |
XMLConfigureInfoinhibitFocusChange, SCROLLING_MODE_ANY, SCROLLING_MODE_HORIZONTAL_ONLY, SCROLLING_MODE_VERTICAL_ONLY, TEXTURE_CENTERED, TEXTURE_REPEATTOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTALL_ACTIONS, AVAILABLE_ACTION_KIND, CONTEXTMENU_ACTION_KIND, LOCAL_ACTION_KIND, MENU_ACTION_KIND, NO_LOCAL_ACTION_KIND, NO_TOPMDI_ONLY_ACTION_KIND, NOT_AVAILABLE_ACTION_KIND, REFRESH_FROM_TRANSACTION, REFRESH_FROM_USER, SHORTCUT_ACTION_KIND, TOOLBAR_ACTION_KIND, TOPMDI_ONLY_ACTION_KIND| Constructor and Description |
|---|
FInputPanel(FormContextI ftx,
electric.xml.Element confRoot)
Constructs a new "FInputPanel" with the given form context and configuration root element.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
calculateMandatory(BOI bo,
AttributeI attr)
Determines if the attribute is mandatory within the given context.
|
boolean |
getAlsoMandatoryIf()
Evaluates the "alsoMandatoryIf" condition and determines if the panel should be marked as mandatory.
|
java.util.HashMap |
getAttributeMap()
Returns the map of attributes supported by this component.
|
int |
getBaseline(int width,
int height)
Returns the baseline of the component.
|
java.util.LinkedHashMap |
getDefaultActionMap()
Returns the default action map for this component.
|
java.util.HashMap |
getElementMap()
Returns the map of elements supported by this component.
|
abstract javax.swing.JComponent |
getJComponent()
Returns the "JComponent" associated with this form element.
|
void |
handleAlsoMandatoryIfE(electric.xml.Element e)
Handles the "alsoMandatoryIf" script element.
|
_refreshActions, action_editForm_available, action_editForm_enabled, action_editForm, action_refreshView_available, action_refreshView, action_reopenView_available, action_reopenView_enabled, action_reopenView, addBeanA, addFormElementListener, addHandleA, addHandleE, afterSave, afterSetValue, assureTransferHandler, beforeSave, beforeSetValue, calculationMightBeExpensive, callLog, cancelPendingRefreshRequests, checkEditable, checkVisible, close, evalScript, evalScript, evalScript, evalScript, evalScript, fhide, focusNextComponent, focusPreviousComponent, fshow, getActions, getActionsOfKind, getActionsOfKind, getBO, getConfRoot, getCtx, getDebugName, getFormActions, getFtx, getInstrumentedSchema, getLastRefreshRequest, getMaximumSize, getMinimumSize, getMissingPropertiesPolicy, getPreferredSize, getRefreshRequestsPending, getSchema, handleActionE, handleAttributes, handleDropAllowedIfE, handleEditableA, handleEditableIfE, handleElement, handleElements, handleElements, handleElements, handleImpliedA, handleMaximumSizeA, handleMaxSizeA, handleMinimumSizeA, handleMinSizeA, handleMissingPropertiesPolicyA, handleNameA, handleNewElement, handleNewElement, handleNewElement, handleOnAfterSaveE, handleOnAfterSetValueE, handleOnBeforeSaveE, handleOnBeforeSetValueE, handleOnConstructionE, handleOnDropE, handleOnFocusGainedE, handleOnFocusLostE, handleOnMDIActivateE, handleOnMDICloseE, handleOnMDIDeactivateE, handleOnMDIOpenE, handleOnRefreshE, handleOnSyncE, handlePreferredSizeA, handlePrefSizeA, handleScriptE, handleVirtualPropertyE, handleVisibleIfE, hasPreferredSizeOverride, invokeAction, invokeAction, isClosed, isDebug, isDefinedEditable, isEditable, isExplicitEditable, isGUIBuilt, isImpliedElement, isInputPossible, isShown, mdiActivate, mdiClose, mdiDeactivate, mdiOpen, postConstructor, postInit, postRefresh, postRefresh, postRefresh, processFocusVeto, processFocusVeto, queueDelayedRefresh, queueDelayedRefresh, reallyHandleVirtualPropertyE, refresh, refresh, refreshActions, refreshActions, registerActionImpl, registerFormAction, removeFormElementListener, requestFocus, requestFocusInWindow, requestFocusInWindow, runAndDeclare, runAndDeclare, setConfRoot, setDebug, setEditable, setFtx, setGUIBuilt, setMissingPropertiesPolicy, setShown, shouldShow, sync, syncImpl, waitForAsyncRefreshes, willCareForChildActions, willCareForChildRefreshgetPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getScrollingMode, grabFocus, init, init, init, paintComponent, setScrollingMode, setTexturegetAccessibleContext, getUI, getUIClassID, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validateaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetName, toDebugNamepublic static java.util.HashMap myAttributes
public static java.util.HashMap myElements
public static java.util.LinkedHashMap myActions
public FInputPanel(FormContextI ftx, electric.xml.Element confRoot)
This constructor initializes the input panel by setting up the necessary configuration for parsing and handling elements and attributes. It also initializes the action map for handling user interactions.
The constructor performs the following actions:
ftx - The form context associated with this panel.confRoot - The root element of the panel's configuration.public java.util.HashMap getAttributeMap()
getAttributeMap in interface FormElementIgetAttributeMap in class FPanelpublic java.util.HashMap getElementMap()
getElementMap in interface FormElementIgetElementMap in class FPanelpublic java.util.LinkedHashMap getDefaultActionMap()
getDefaultActionMap in class FPanelpublic void handleAlsoMandatoryIfE(electric.xml.Element e)
This method processes the "alsoMandatoryIf" element in the form definition, which allows for defining a custom condition to determine if the panel should be marked as mandatory. The script or expression within this element is evaluated to determine the mandatory status.
The "cached" attribute of the "alsoMandatoryIf" element can be used to specify whether the result of the script evaluation should be cached. By default, the result is cached to optimize performance.
If multiple "alsoMandatoryIf" elements are encountered, a "FormElementDefinitionException" is thrown to indicate an invalid form definition.
Example:
<alsoMandatoryIf language="groovy">ctx.currentUser.istMitgliedVon("Pflichtgruppe")</alsoMandatoryIf>
e - The XML element representing the "alsoMandatoryIf" node.FormElementDefinitionException - If multiple "alsoMandatoryIf" elements are found.public boolean getAlsoMandatoryIf()
This method evaluates the "alsoMandatoryIf" script or expression associated with the form input panel.
If the condition evaluates to true, the panel is considered mandatory, regardless of the mandatory status
defined in the schema or through other means (e.g., "isMandatory").
If the "alsoMandatoryIf" condition is not defined or evaluates to false, the mandatory status of the panel
is determined by the schema definition or other relevant factors.
The result of the evaluation can be cached to optimize performance, especially if the condition is complex or involves expensive calculations.
true if the "alsoMandatoryIf" condition is met and the panel should be marked as mandatory, false otherwise.public abstract javax.swing.JComponent getJComponent()
public int getBaseline(int width,
int height)
getBaseline in class javax.swing.JComponentwidth - The width to get the baseline for.height - The height to get the baseline for.public boolean calculateMandatory(BOI bo, AttributeI attr)
This method checks whether the specified attribute is mandatory for the provided "BOI" in the current form input panel. It considers various factors, such as the attribute's definition, the state of the BO, the editability of the panel, and whether a value has already been provided for the attribute.
The method returns true if the attribute is mandatory and no value is currently
assigned, indicating that the user must provide a value. It returns false if the
attribute is not mandatory, the BO is deleted, the panel is not editable, or a value has
already been assigned.
calculateMandatory in interface FormInputPanelMandatoryIbo - The BOI for which to check the attribute's mandatory status.attr - The attribute to check.true if the attribute is mandatory and no value is assigned, false otherwise.AttributeI.isMandatory(BOI),
getAlsoMandatoryIf()Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.