public interface FormContextI
These contexts can be hierarchically linked together. This allows for the representation of complex data connections. For example, it can be used for true sub-forms within their own windows.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
$0 |
Modifier and Type | Method and Description |
---|---|
void |
addFormContextListener(FormContextListenerI l) |
void |
addSubContext(FormContextI a) |
void |
afterSave() |
void |
appendThisAndAllSubContexts(java.util.List l) |
void |
beforeSave() |
boolean |
boWasChangedExternally() |
VisibilityI |
cacheVisibility(VisibilityI v) |
void |
clearCachedVisibility() |
void |
clearTransaction() |
void |
close() |
FormContextI |
createSubFormContext() |
void |
disableConflictCheckDuringSave()
Don't ignore conflicts during saving anymore if previously enabled.
|
void |
enableConflictCheckDuringSave()
Registers a default
FormContextSaveHandlerI that doesn't ignore conflicts during saving. |
default FormElementI |
findOnlyFormElement(java.lang.Class<? extends FormElementI> ofType)
Find and return the only form element of the given type in the entire form context.
|
java.util.LinkedHashMap |
getAllActionsOfKind(int kind) |
FormElementI |
getAt(java.lang.String n) |
Transaction.Savepoint |
getBeforeUserChangesSavepoint() |
BO |
getBO() |
BO |
getBO(boolean _synchronized) |
BOLoaderI |
getBOLoader() |
BO[] |
getBOs() |
ClientContextI |
getCtx() |
DBManEventProviderI |
getEventProvider() |
FormElementI |
getFormElement() |
default javax.swing.ImageIcon |
getIcon(java.lang.String name) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
java.awt.Color color) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
java.awt.Color color,
boolean allowUnderlay) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
de.ipcon.swing.IconDisplayContext context) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
de.ipcon.swing.IconDisplayContext context,
java.awt.Color color) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
de.ipcon.swing.IconDisplayContext context,
java.awt.Color color,
boolean allowUnderlay) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
de.ipcon.swing.IconDisplayContext context,
java.lang.String configuration) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
de.ipcon.swing.IconDisplayContext context,
java.lang.String configuration,
java.awt.Color color) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
de.ipcon.swing.IconDisplayContext context,
java.lang.String configuration,
java.awt.Color color,
boolean allowUnderlay) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
java.lang.String configuration) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
java.lang.String configuration,
java.awt.Color color) |
default javax.swing.ImageIcon |
getIcon(java.lang.String name,
java.lang.String configuration,
java.awt.Color color,
boolean allowUnderlay) |
java.awt.Component |
getIconContextObject() |
javax.swing.JRootPane |
getJRootPane() |
EntityI |
getLowestCommonDenominateEntity() |
FormElementI |
getNamedElement(java.lang.String n) |
FormContextI |
getParent() |
java.lang.String |
getPath() |
void |
getPath(java.lang.StringBuilder s) |
FormContextI |
getRoot() |
javax.swing.RootPaneContainer |
getRootPaneContainer() |
FormContextSaveHandlerI |
getSaveHandler() |
BeanShellScript |
getScript() |
java.util.Map |
getScriptParameters() |
java.util.List |
getSubContexts() |
java.util.Iterator |
getSubContextsIterator() |
FormContextI[] |
getThisAndAllSubContextsAsArray() |
Transaction |
getTransaction() |
VisibilityI |
getVisibility() |
boolean |
hasCachedVisibility() |
boolean |
hasScript() |
boolean |
hasUnsavedFormData() |
boolean |
hasUnsavedUserData() |
void |
initScript() |
void |
invalidateAllSubContextsCache() |
boolean |
isClosed() |
boolean |
isRoot() |
boolean |
isSyncEventHandlingPaused()
If true, then {link #sync()} calls for this element should be ignored, e.g. because the form is currently saving.
|
void |
mdiActivate(MDIElementI me) |
void |
mdiClose(MDIElementI me) |
void |
mdiDeactivate(MDIElementI me) |
void |
mdiOpen(MDIElementI me) |
boolean |
pauseFiringNewProcs()
Creates a token to pause updating the GUI with changes in the Transaction for a while.
|
void |
refreshBO(FormContextI _realFtx,
java.lang.String _propertyname,
boolean _transactionControl,
boolean _autoCreate,
electric.xml.Element _confRoot) |
void |
refreshForms()
Refreshes the form-parts that belong to this FormContextI and all subforms that belong to
any subcontext of this FormContextI.
|
void |
refreshForms(boolean forceRefreshRelation)
Refreshes the form-parts that belong to this FormContextI and all subforms that belong to
any subcontext of this FormContextI.
|
void |
refreshForms(boolean forceRefreshRelation,
int from)
Refreshes the form-parts that belong to this FormContextI and all subforms that belong to
any subcontext of this FormContextI.
|
void |
refreshForms(boolean forceRefreshRelation,
int from,
long onlyBOId)
Refreshes the form-parts that belong to this FormContextI and all subforms that belong to
any subcontext of this FormContextI.
|
void |
refreshForms(boolean forceRefreshRelation,
int from,
long onlyBOId,
long ifNotSince)
Refreshes the form-parts that belong to this FormContextI and all subforms that belong to
any subcontext of this FormContextI.
|
void |
refreshView()
Only refreshes the window titles and other 'outside' stuff, not the form itself or parts of it.
|
void |
removeAllFormContextListeners() |
void |
removeFormContextListener(FormContextListenerI l) |
void |
removeSubContext(FormContextI a) |
void |
resetBOWasChangedExternally() |
boolean |
resumeFiringNewProcs()
Resumes updates to the GUI after a previous call of pauseFiringNewProcs(),
unless updates are inh, due to changes in the Transaction for a while.
|
boolean |
saveFormData() |
boolean |
saveFormData(boolean willCloseRightAfter) |
void |
setBeforeUserChangesSavepoint(Transaction.Savepoint _sp) |
boolean |
setBO(BO bo) |
void |
setBOLoader(BOLoaderI bol) |
void |
setEditable(boolean b) |
void |
setEditable(boolean b,
boolean dontRefresh) |
void |
setFormElement(FormElementI j) |
void |
setJRootPane(javax.swing.JRootPane rp) |
void |
setLowestCommonDenominateEntity(EntityI ent) |
void |
setNamedElement(java.lang.String n,
FormElementI e) |
void |
setParent(FormContextI a) |
void |
setRootPaneContainer(javax.swing.RootPaneContainer rpc) |
void |
setSaveHandler(FormContextSaveHandlerI sh) |
void |
setScript(BeanShellScript b) |
void |
setScriptParameters(java.util.Map m) |
void |
setTransaction(Transaction tx) |
void |
setVisibilityTransient() |
void |
startListeningNewProcs()
internal
|
void |
sync()
Synchronize the data of the form and the model
|
void |
toast(java.lang.String text) |
void |
toast(java.lang.String text,
int delay) |
void |
toastError(java.lang.String text) |
void |
toastError(java.lang.String text,
int delay) |
boolean |
tryFocus()
Attempts to set the keyboard focus to an appropriate component within this
form context.
|
static final java.lang.String $0
ClientContextI getCtx()
default javax.swing.ImageIcon getIcon(java.lang.String name)
default javax.swing.ImageIcon getIcon(java.lang.String name, java.awt.Color color)
default javax.swing.ImageIcon getIcon(java.lang.String name, java.awt.Color color, boolean allowUnderlay)
default javax.swing.ImageIcon getIcon(java.lang.String name, de.ipcon.swing.IconDisplayContext context)
default javax.swing.ImageIcon getIcon(java.lang.String name, de.ipcon.swing.IconDisplayContext context, java.awt.Color color)
default javax.swing.ImageIcon getIcon(java.lang.String name, de.ipcon.swing.IconDisplayContext context, java.awt.Color color, boolean allowUnderlay)
default javax.swing.ImageIcon getIcon(java.lang.String name, java.lang.String configuration)
default javax.swing.ImageIcon getIcon(java.lang.String name, java.lang.String configuration, java.awt.Color color)
default javax.swing.ImageIcon getIcon(java.lang.String name, java.lang.String configuration, java.awt.Color color, boolean allowUnderlay)
default javax.swing.ImageIcon getIcon(java.lang.String name, de.ipcon.swing.IconDisplayContext context, java.lang.String configuration)
default javax.swing.ImageIcon getIcon(java.lang.String name, de.ipcon.swing.IconDisplayContext context, java.lang.String configuration, java.awt.Color color)
default javax.swing.ImageIcon getIcon(java.lang.String name, de.ipcon.swing.IconDisplayContext context, java.lang.String configuration, java.awt.Color color, boolean allowUnderlay)
java.awt.Component getIconContextObject()
FormContextI getParent()
void setParent(FormContextI a)
boolean isRoot()
FormContextI getRoot()
java.lang.String getPath()
void getPath(java.lang.StringBuilder s)
FormElementI getNamedElement(java.lang.String n)
void setNamedElement(java.lang.String n, FormElementI e)
FormElementI getAt(java.lang.String n)
FormContextI createSubFormContext()
void addSubContext(FormContextI a)
void removeSubContext(FormContextI a)
java.util.List getSubContexts()
java.util.Iterator getSubContextsIterator()
FormContextI[] getThisAndAllSubContextsAsArray()
void appendThisAndAllSubContexts(java.util.List l)
void invalidateAllSubContextsCache()
EntityI getLowestCommonDenominateEntity()
void setLowestCommonDenominateEntity(EntityI ent)
BO getBO()
BO getBO(boolean _synchronized)
boolean setBO(BO bo)
BO[] getBOs()
void setEditable(boolean b)
void setEditable(boolean b, boolean dontRefresh)
javax.swing.JRootPane getJRootPane()
void setJRootPane(javax.swing.JRootPane rp)
void setRootPaneContainer(javax.swing.RootPaneContainer rpc)
javax.swing.RootPaneContainer getRootPaneContainer()
void setFormElement(FormElementI j)
FormElementI getFormElement()
default FormElementI findOnlyFormElement(java.lang.Class<? extends FormElementI> ofType)
ofType
- the type of form element to look forVisibilityI cacheVisibility(VisibilityI v)
void setVisibilityTransient()
boolean hasCachedVisibility()
VisibilityI getVisibility()
void clearCachedVisibility()
void mdiOpen(MDIElementI me)
void mdiClose(MDIElementI me)
void mdiActivate(MDIElementI me)
void mdiDeactivate(MDIElementI me)
java.util.LinkedHashMap getAllActionsOfKind(int kind)
void initScript()
void setScript(BeanShellScript b)
BeanShellScript getScript()
boolean hasScript()
void setScriptParameters(java.util.Map m)
java.util.Map getScriptParameters()
void setTransaction(Transaction tx)
Transaction getTransaction()
void clearTransaction()
void setBOLoader(BOLoaderI bol)
BOLoaderI getBOLoader()
boolean pauseFiringNewProcs()
boolean resumeFiringNewProcs()
void startListeningNewProcs()
FormContextSaveHandlerI getSaveHandler()
void setSaveHandler(FormContextSaveHandlerI sh)
boolean hasUnsavedFormData()
boolean hasUnsavedUserData()
boolean boWasChangedExternally()
void resetBOWasChangedExternally()
void sync()
boolean isSyncEventHandlingPaused()
void beforeSave()
void afterSave()
boolean saveFormData(boolean willCloseRightAfter)
boolean saveFormData()
with parameter false
void enableConflictCheckDuringSave()
FormContextSaveHandlerI
that doesn't ignore conflicts during saving. Activate ins forms with [Tabbed]View conflictPolicy="ASK"
void disableConflictCheckDuringSave()
void refreshView()
void refreshForms()
void refreshForms(boolean forceRefreshRelation)
forceRefreshRelation
- A boolean. If true
, forces tables representing a relation
to be refreshed even if their displayed values do not seem to match
the current contents of the displayed relation.
Defaults to false
.void refreshForms(boolean forceRefreshRelation, int from)
forceRefreshRelation
- A boolean. If true
, forces tables representing a relation
to be refreshed even if their displayed values do not seem to match
the current contents of the displayed relation.
Defaults to false
.from
- An integer representing the source of the refreshForms request.
May be one of FormElementI.REFRESH_FROM_USER
or
FormElementI.REFRESH_FROM_TRANSACTION
.
Defaults to FormElementI.REFRESH_FROM_USER
.void refreshForms(boolean forceRefreshRelation, int from, long onlyBOId)
forceRefreshRelation
- A boolean. If true
, forces tables representing a relation
to be refreshed even if their displayed values do not seem to match
the current contents of the displayed relation.
Defaults to false
.from
- An integer representing the source of the refreshForms request.
May be one of FormElementI.REFRESH_FROM_USER
or
FormElementI.REFRESH_FROM_TRANSACTION
.
Defaults to FormElementI.REFRESH_FROM_USER
.onlyBOId
- A long. If specified and positive, the refresh will only be done for
the Business Object (BO) having the given Id.
Defaults to 0, meaning no specific BO ID filter.void refreshForms(boolean forceRefreshRelation, int from, long onlyBOId, long ifNotSince)
forceRefreshRelation
- A boolean. If true
, forces tables representing a relation
to be refreshed even if their displayed values do not seem to match
the current contents of the displayed relation.
Defaults to false
.from
- An integer representing the source of the refreshForms request.
May be one of FormElementI.REFRESH_FROM_USER
or
FormElementI.REFRESH_FROM_TRANSACTION
.
Defaults to FormElementI.REFRESH_FROM_USER
.onlyBOId
- A long. If specified and positive, the refresh will only be done for
the Business Object (BO) having the given Id.
Defaults to 0, meaning no specific BO ID filter.ifNotSince
- A long specifying a point in time (in milliseconds since epoch).
A refresh will only be performed if the internally stored last refresh
time is earlier (smaller) than this given time.
Defaults to System.currentTimeMillis()
.boolean tryFocus()
The specific component that receives focus (if any) and the criteria for success are determined by the implementation. This method might recursively delegate the focus attempt to sub-contexts.
true
if focus was successfully requested by a component
within this context, false
otherwise.void close()
boolean isClosed()
void addFormContextListener(FormContextListenerI l)
void removeFormContextListener(FormContextListenerI l)
void removeAllFormContextListeners()
DBManEventProviderI getEventProvider()
Transaction.Savepoint getBeforeUserChangesSavepoint()
void setBeforeUserChangesSavepoint(Transaction.Savepoint _sp)
void refreshBO(FormContextI _realFtx, java.lang.String _propertyname, boolean _transactionControl, boolean _autoCreate, electric.xml.Element _confRoot)
void toastError(java.lang.String text, int delay)
void toastError(java.lang.String text)
void toast(java.lang.String text, int delay)
void toast(java.lang.String text)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.