public interface FormElementI extends L10nApplicatorI
| Modifier and Type | Field and Description |
|---|---|
static int |
ALL_ACTIONS |
static int |
AVAILABLE_ACTION_KIND |
static int |
CONTEXTMENU_ACTION_KIND |
static int |
LOCAL_ACTION_KIND |
static org.apache.log4j.Logger |
log |
static int |
MENU_ACTION_KIND |
static int |
NO_LOCAL_ACTION_KIND |
static int |
NO_TOPMDI_ONLY_ACTION_KIND |
static int |
NOT_AVAILABLE_ACTION_KIND |
static int |
REFRESH_FROM_TRANSACTION |
static int |
REFRESH_FROM_USER |
static int |
SHORTCUT_ACTION_KIND |
static int |
TOOLBAR_ACTION_KIND |
static int |
TOPMDI_ONLY_ACTION_KIND |
| Modifier and Type | Method and Description |
|---|---|
static void |
addBeanA(java.lang.Class<? extends FormElementI> clazz,
java.util.Map<java.lang.String,MethodLocalizationWrapper> m,
java.lang.String attributeName,
boolean localizable)
Searches for a static setter method on the given
clazz corresponding to
the attributeName. |
default void |
addBeanA(java.util.Map<java.lang.String,MethodLocalizationWrapper> m,
java.lang.String attributeName,
boolean localizable) |
void |
addFormElementListener(FormElementListenerI l) |
static void |
addHandleA(java.lang.Class<? extends FormElementI> clazz,
java.util.Map<java.lang.String,MethodLocalizationWrapper> m,
java.lang.String attributeName,
boolean localizable)
Searches for a handler method on the given
clazz corresponding to the attributeName. |
default void |
addHandleA(java.util.Map<java.lang.String,MethodLocalizationWrapper> m,
java.lang.String attributeName,
boolean localizable) |
static void |
addHandleE(java.lang.Class<? extends FormElementI> clazz,
java.util.Map<java.lang.String,java.lang.reflect.Method> m,
java.lang.String elementName)
Searches for a handler method on the given
clazz corresponding to the elementName. |
default void |
addHandleE(java.util.Map<java.lang.String,java.lang.reflect.Method> m,
java.lang.String elementName) |
void |
afterSave() |
void |
afterSetValue(java.lang.Object old,
java.lang.Object newO) |
default java.lang.String |
applyL10n(java.lang.String s) |
void |
beforeSave() |
void |
beforeSetValue(java.lang.Object old,
java.lang.Object newO) |
void |
close() |
java.util.LinkedHashMap |
getActions() |
java.util.LinkedHashMap |
getActionsOfKind(int kind) |
java.util.HashMap<java.lang.String,MethodLocalizationWrapper> |
getAttributeMap() |
electric.xml.Element |
getConfRoot() |
ClientContextI |
getCtx() |
java.lang.String |
getDebugName() |
default DefinitionErrorHandlerI |
getDefinitionErrorHandler() |
static electric.xml.Element |
getElementConsideringIgnored(electric.xml.Element root,
java.lang.String name)
Searches for a child
Element with the specified name under the root element. |
java.util.HashMap |
getElementMap() |
FormContextI |
getFtx() |
java.lang.String |
getName() |
SchemaI |
getSchema() |
default void |
handleAttributes(java.util.Map<java.lang.String,MethodLocalizationWrapper> attrName2MethodWrapper)
Handles configuration attributes for this form element, performing type conversion
and reflection method invocation.
|
default boolean |
handleElement(java.util.Map<java.lang.String,java.lang.reflect.Method> elementName2MethodWrapper,
electric.xml.Element el)
Handles processing an XML element by invoking a reflective method
based on the element's name.
|
default void |
handleElements(electric.xml.Element root,
java.util.Map<java.lang.String,java.lang.reflect.Method> elementName2MethodWrapper,
boolean subsPossible,
java.lang.String implyElement,
java.lang.String implyPrefix)
Recursively processes configuration elements within a root element.
|
default void |
handleElements(java.util.HashMap elementName2MethodWrapper,
boolean subsPossible) |
default void |
handleElements(java.util.HashMap elementName2MethodWrapper,
boolean subsPossible,
java.lang.String implyElement) |
default void |
handleElements(java.util.HashMap elementName2MethodWrapper,
boolean subsPossible,
java.lang.String implyElement,
java.lang.String implyPrefix) |
default void |
handleError(java.lang.String msg,
electric.xml.Element el,
java.lang.Throwable cause,
boolean mayContinue) |
default FormElementI |
handleNewElement(electric.xml.Element el) |
default FormElementI |
handleNewElement(electric.xml.Element el,
java.lang.String aka) |
default FormElementI |
handleNewElement(electric.xml.Element el,
java.lang.String aka,
FormContextI preparedFtx) |
boolean |
isClosed() |
boolean |
isDebug() |
boolean |
isEditable() |
boolean |
isGUIBuilt() |
static boolean |
isIgnored(electric.xml.Element el)
Checks if the given
Element should be ignored during element retrieval operations. |
boolean |
isInputPossible() |
boolean |
isShown() |
void |
mdiActivate(MDIElementI me)
Invoked when this form element is activated within an MDI environment.
|
void |
mdiClose(MDIElementI me) |
void |
mdiDeactivate(MDIElementI me)
Invoked when this form element is deactivated within an MDI environment.
|
void |
mdiOpen(MDIElementI me) |
default void |
performAdditionalFormElementDefinitionChecks() |
void |
postInit() |
void |
postRefresh(int from) |
void |
refresh() |
void |
refresh(int from) |
void |
removeFormElementListener(FormElementListenerI l) |
void |
requestFocus() |
boolean |
setEditable(boolean isEditable) |
default void |
showError(java.lang.String message) |
default void |
showError(java.lang.String message,
java.lang.Throwable t) |
void |
sync() |
static java.lang.String |
toDebugName(java.lang.Object o)
A helper method to create a human-readable string representation of an object, typically a Frame or Component like FPanel.
|
boolean |
willCareForChildActions() |
boolean |
willCareForChildRefresh() |
static final org.apache.log4j.Logger log
static final int ALL_ACTIONS
static final int TOOLBAR_ACTION_KIND
static final int MENU_ACTION_KIND
static final int CONTEXTMENU_ACTION_KIND
static final int SHORTCUT_ACTION_KIND
static final int LOCAL_ACTION_KIND
static final int NO_LOCAL_ACTION_KIND
static final int TOPMDI_ONLY_ACTION_KIND
static final int NO_TOPMDI_ONLY_ACTION_KIND
static final int AVAILABLE_ACTION_KIND
static final int NOT_AVAILABLE_ACTION_KIND
static final int REFRESH_FROM_USER
static final int REFRESH_FROM_TRANSACTION
electric.xml.Element getConfRoot()
FormContextI getFtx()
ClientContextI getCtx()
SchemaI getSchema()
java.lang.String getName()
default java.lang.String applyL10n(java.lang.String s)
applyL10n in interface L10nApplicatorIjava.util.HashMap<java.lang.String,MethodLocalizationWrapper> getAttributeMap()
java.util.HashMap getElementMap()
default void addBeanA(java.util.Map<java.lang.String,MethodLocalizationWrapper> m, java.lang.String attributeName, boolean localizable)
static void addBeanA(java.lang.Class<? extends FormElementI> clazz, java.util.Map<java.lang.String,MethodLocalizationWrapper> m, java.lang.String attributeName, boolean localizable)
clazz corresponding to
the attributeName.
The method name is constructed by translating hyphens ('-') to underscores ('_'),
capitalizing the first letter of the attributeName
and prefixing it with "set" (e.g., "name-bla" -> "setName_bla").
The search is restricted to methods with exactly one parameter.clazz - The Class to search for the setter method.m - The map to store the found method wrapper (key: attributeName).attributeName - The property name (e.g., "title", "description").localizable - Whether the property supports localization.default void addHandleA(java.util.Map<java.lang.String,MethodLocalizationWrapper> m, java.lang.String attributeName, boolean localizable)
static void addHandleA(java.lang.Class<? extends FormElementI> clazz, java.util.Map<java.lang.String,MethodLocalizationWrapper> m, java.lang.String attributeName, boolean localizable)
clazz corresponding to the attributeName.
The method name is constructed by:
1. Translating hyphens ('-') to underscores ('_').
2. Capitalizing the first letter of the translated name.
3. Prefixing the result with "handle" and suffixing it with "A" (e.g., "user-name" -> "handleUser_nameA").
The method must take exactly one parameter of type String.clazz - The Class to search for the handler method.m - The map to store the found method wrapper (key: attributeName).attributeName - The property name (e.g., "title", "description").localizable - Whether the property supports localization.default void addHandleE(java.util.Map<java.lang.String,java.lang.reflect.Method> m,
java.lang.String elementName)
static void addHandleE(java.lang.Class<? extends FormElementI> clazz, java.util.Map<java.lang.String,java.lang.reflect.Method> m, java.lang.String elementName)
clazz corresponding to the elementName.
The method name is constructed by:
1. Translating hyphens ('-') to underscores ('_').
2. Capitalizing the first letter of the translated name.
3. Prefixing the result with "handle" and suffixing it with "E" (e.g. "user-click" -> "handleUser_clickE").
The method must take exactly one parameter of type electric.xml.Element.clazz - The Class to search for the handler method.m - The map to store the found method (key: elementName).elementName - The element attribute name.default void handleAttributes(java.util.Map<java.lang.String,MethodLocalizationWrapper> attrName2MethodWrapper)
attrName2MethodWrapper - A map of attribute names to method wrappers.default void performAdditionalFormElementDefinitionChecks()
default void handleElements(java.util.HashMap elementName2MethodWrapper,
boolean subsPossible)
default void handleElements(java.util.HashMap elementName2MethodWrapper,
boolean subsPossible,
java.lang.String implyElement)
default void handleElements(java.util.HashMap elementName2MethodWrapper,
boolean subsPossible,
java.lang.String implyElement,
java.lang.String implyPrefix)
default void handleElements(electric.xml.Element root,
java.util.Map<java.lang.String,java.lang.reflect.Method> elementName2MethodWrapper,
boolean subsPossible,
java.lang.String implyElement,
java.lang.String implyPrefix)
root - The current root element whose children are being processed.elementName2MethodWrapper - A map of element names to the Method object that handles them.subsPossible - If true, allows the creation of new elements via o.handleNewElement.implyElement - The name of the element to use for implication, or null.implyPrefix - The prefix for attributes to move to the implied element.default boolean handleElement(java.util.Map<java.lang.String,java.lang.reflect.Method> elementName2MethodWrapper,
electric.xml.Element el)
elementName2MethodWrapper - A map of element names to the Method object that handles them.el - The configuration element to process.default FormElementI handleNewElement(electric.xml.Element el)
default FormElementI handleNewElement(electric.xml.Element el, java.lang.String aka)
default FormElementI handleNewElement(electric.xml.Element el, java.lang.String aka, FormContextI preparedFtx)
void postInit()
void mdiOpen(MDIElementI me) throws java.lang.Exception
java.lang.Exceptionvoid mdiClose(MDIElementI me) throws java.lang.Exception
java.lang.Exceptionvoid mdiActivate(MDIElementI me) throws java.lang.Exception
This method is called when the form element becomes the active, or currently selected, component in its MDI parent. Implementations should handle any necessary updates, refreshes, or setup that needs to occur when the element is brought into focus.
me - The MDIElementI that is being activated.java.lang.Exception - if an error occurs during activation.void mdiDeactivate(MDIElementI me) throws java.lang.Exception
This method is called when the form element is no longer the active component in its MDI parent. Implementations should handle any necessary cleanup, state saving, or resource release that needs to occur when the element loses focus.
me - The MDIElementI that is being deactivated.java.lang.Exception - if an error occurs during deactivation.void addFormElementListener(FormElementListenerI l)
void removeFormElementListener(FormElementListenerI l)
void sync()
void beforeSave()
void afterSave()
void refresh(int from)
void refresh()
void postRefresh(int from)
boolean willCareForChildRefresh()
void beforeSetValue(java.lang.Object old,
java.lang.Object newO)
void afterSetValue(java.lang.Object old,
java.lang.Object newO)
java.util.LinkedHashMap getActions()
boolean willCareForChildActions()
java.util.LinkedHashMap getActionsOfKind(int kind)
boolean setEditable(boolean isEditable)
boolean isEditable()
boolean isShown()
boolean isInputPossible()
boolean isGUIBuilt()
void requestFocus()
void close()
boolean isClosed()
boolean isDebug()
java.lang.String getDebugName()
static java.lang.String toDebugName(java.lang.Object o)
o - The Object to format.String with the object's simple class name and other relevant details.static boolean isIgnored(electric.xml.Element el)
Element should be ignored during element retrieval operations.
Ignored elements are typically "Include" containers which should be transparent, i.e. traversed
to find the requested child elements.el - The Element to check. May be null (though ideally shouldn't be).static electric.xml.Element getElementConsideringIgnored(electric.xml.Element root,
java.lang.String name)
Element with the specified name under the root element.
The search recursively descends into any elements identified as 'ignored' by the
IgnoredElementChecker#isIgnored(Element) method.
This effectively treats ignored elements as transparent containers.
The search is performed depth-first and returns the first match found.root - The root Element to start the search from.name - The name of the child element to find (case-sensitive).Element, or null if no element is found or if input is invalid.default DefinitionErrorHandlerI getDefinitionErrorHandler()
default void handleError(java.lang.String msg,
electric.xml.Element el,
java.lang.Throwable cause,
boolean mayContinue)
default void showError(java.lang.String message)
default void showError(java.lang.String message,
java.lang.Throwable t)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.