public class BasicInteractionManager extends InteractionManager
Form instances,
extending the default behavior provided by the InteractionManager
class. The BasicInteractionManager manages the events related to the default
buttons, that is, the query, insert, delete and update buttons. The keys of
these buttons must be the following ones:
| Modifier and Type | Class and Description |
|---|---|
class |
BasicInteractionManager.AvancedQueryListener
Class that implements the listener to the standard feature AdvancedQuery.
|
class |
BasicInteractionManager.DeleteListener
This class implements the delete button default behavior.
|
class |
BasicInteractionManager.InsertListener
Default insertion listener.
|
class |
BasicInteractionManager.QueryListener
Query button default listener.
|
class |
BasicInteractionManager.UpdateListener
Update button default listener.
|
InteractionManager.DeleteFieldsListener, InteractionManager.InteractionManagerAction, InteractionManager.PrintingThreadactionHandler, ADVANCED_QUERY_KEY, CHECK_MODIFIED_DATA_CHANGED_DEFAULT_VALUE, checkModifiedDataChangeEvent, currentMode, dataChangedEventProcessing, DELETE_KEY, deleteFieldsListener, f11Button, f12Button, f7Button, f9Button, formManager, HELP_KEY, INSERT, INSERT_KEY, interactionManagerModeListenerList, managedForm, modifiedFieldAttributes, NEWMODE, printThread, QUERY, QUERY_INSERT_KEY, QUERY_KEY, QUERYINSERT, selectionPrintingKey, setDefaultFocusEnabled, UPDATE, UPDATE_ALL, UPDATE_CHANGED, UPDATE_KEY, updateMethod, valueChangedListenerAttributes, valueChangeListenerEnabled, warningBirthdayMessage| Modifier | Constructor and Description |
|---|---|
|
BasicInteractionManager()
Constructs a BasicInterationManager.
|
|
BasicInteractionManager(boolean update)
Constructs a BasicInterationManager.
|
protected |
BasicInteractionManager(boolean update,
boolean detailForm)
Constructs a BasicInteractionManager.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkDelete()
Performs basic checks in order to process the delete order.
|
boolean |
checkInsert()
Performs basic checks in order to process the insert order.
|
boolean |
checkQuery()
Performs the logical checks prior to execute the query action.
|
boolean |
checkSearchInResults()
Sets the right values to the
keysValues vector and also to the
attributes one, getting those values from the managed form. |
boolean |
checkUpdate()
Checks whether an update can be done or no.
|
InteractionManager |
cloneInteractionManager()
Clones this InteractionManager.
|
protected void |
createScriptManager(Form form) |
boolean |
dataWillChange(DataNavigationEvent e)
Method invoked when the register shown in the form is going to change.
|
protected void |
ensureComponentVisible(Component component)
Ensure that the component is visible in the form, if the component is in
a Tab or CollapsiblePanel or SplitPane
|
void |
free()
Removes all the references that this InteractionManager has in order to
free the memory.
|
protected List |
getAncestorsTo(Component component,
Class parentClass) |
protected Hashtable |
getAttributesValuesUpdateForm()
Returns the attributes and the values that changed in the form to perform
the update.
|
protected String |
getEmptyRequiredFieldsMessage(Vector emptyFields)
Create the message to show when you are trying to insert or update a
record with empty required fields.
|
IFormInteractionScriptManager |
getFormInteractionScriptManager() |
protected Hashtable |
getFormKeyValues()
Returns the form keys and its values, to identify the record.
|
protected Hashtable |
getInsertAttributesValues()
Returns all the attributes that will be inserted and the values that will
be inserted in that attributes.
|
protected Vector |
getQueryAttributes()
Returns the attributes that must be queried.
|
boolean |
isScriptEnabled() |
void |
print()
Method that responds to the print button keystroke.
|
protected EntityResult |
query(Hashtable keysValues,
Vector attributes)
Performs a query to the entity configured in the managed form.
|
void |
registerInteractionManager(Form form,
IFormManager formManager)
Registers the basic listener for the basic operations that can be
performed by an interaction manager.
|
void |
removeDeleteListener()
Removes the listener associated to the Delete button.
|
void |
removeInsertListener()
Removes the listener associated to the Insert button.
|
void |
removeQueryListener()
Removes the listener associated to the Query button.
|
void |
removeUpdateListener()
Removes the listener associated to the Update button.
|
protected void |
requestFocusForEmptyRequiredComponent(Vector emptyRequiredDataField)
Request the focus for the first element in the list and ensures that this
component is visible in the form
|
protected void |
setDetailForm(boolean f) |
void |
setInitialState()
Establishes the initial state of the managed form, and sets the form
states in QueryInsert mode that implies that by default the query button
and the insert button will be enables.
|
void |
setInsertMode()
Sets the mode of the form in Insert.
|
void |
setQueryInsertMode()
Sets the mode of the form in QueryInsert.
|
void |
setQueryMode()
Sets the mode of the form in Query.
|
void |
setShowDeleteConfirmMessage(boolean show)
Configures the confirm message before performing operations.
|
void |
setStayInRecordAfterInsert(boolean stayInRecordAfterInsert)
This method determines whether the form will remain in a record after
being inserted, to check the new record information, or it will be remain
in insert mode to make another insertion.
|
void |
setUpdateMode()
Sets the mode of the form in Update.
|
addInteractionManagerModeListener, checkBirthday, dataChanged, finalize, fireInteractionManagerModeChanged, getActionHandler, getCheckModifiedDataChangeEvent, getCurrentMode, getDataChangedEventProcessing, getDefaultActiveFocus, getFieldValues, getImageValues, getModifiedFieldAttributes, getTableValues, getTemplateFields, getTemplateImages, getTemplateTables, injectAnnotatedFields, isValueChangeListenerEnabled, loadActionHandler, registerFormKeyBindings, registerRuleEngineFor, removeInteractionManagerModeListener, setCheckModifiedDataChangeEvent, setDataChangedEventProcessing, setDefaultFocusEnabled, setUpdateMethodVersion, setValueChangedEventListener, setValueChangeEventListenerEnabled, setWarningBirthdayMessage, valueChangedpublic static final String S_CORRECT_INSERT
public static final String S_INCORRECT_INSERT
public static final String S_CORRECT_UPDATE
public static final String S_INCORRECT_UPDATE
public static final String S_CORRECT_DELETE
public static final String S_INCORRECT_DELETE
public static final String M_DELETE_CONFIRM
public static final String M_UPDATE_CONFIRM
public static final String M_FILL_ALL_REQUIRED_FIELDS
public static String M_MODIFIED_DATA_APPLY_CHANGES
public static boolean CONFIRM_DELETE_DEFAULT_VALUE
public static boolean AVANCED_QUERY_DEFAULT_VALUE
public static boolean defaultScriptEnabled
public static boolean CLOSE_DETAIL_FORM_AFTER_INSERT_DEFAULT_VALUE
protected Hashtable keysValuesLastQuery
protected Hashtable keysValues
protected QueryExpression expression
protected Hashtable attributesValues
protected Vector attributes
protected boolean detailForm
protected boolean afterUpdate
protected boolean showDeleteConfirmMessage
protected boolean searchBetweenResults
public BasicInteractionManager.QueryListener queryListener
public BasicInteractionManager.AvancedQueryListener avancedQueryListener
public BasicInteractionManager.InsertListener insertListener
public BasicInteractionManager.UpdateListener updateListener
public BasicInteractionManager.DeleteListener deleteListener
protected Window formAncestor
protected boolean stayInRecordAfterInsert
protected boolean closeDetailFormAfterInsert
protected boolean addColumnsToTableView
protected boolean scriptEnabled
protected IFormInteractionScriptManager formInteractionScriptManager
public static String defaultInteractionScriptManagerClassName
public BasicInteractionManager()
public BasicInteractionManager(boolean update)
update - false if to refresh the trees and the tables from the
BasicInteractionManager is not desiredprotected BasicInteractionManager(boolean update,
boolean detailForm)
update - false if to refresh the trees and the tables from the
BasicInteractionManager is not desireddetailForm - when true indicates that the form comes from a Tablepublic void setInsertMode()
InteractionManagersetInsertMode in class InteractionManagerpublic IFormInteractionScriptManager getFormInteractionScriptManager()
public void setStayInRecordAfterInsert(boolean stayInRecordAfterInsert)
stayInRecordAfterInsert - if true, the form will show a record after its insertionpublic void setQueryInsertMode()
InteractionManagersetQueryInsertMode in class InteractionManagerpublic void setQueryMode()
InteractionManagersetQueryMode in class InteractionManagerpublic void setUpdateMode()
InteractionManagersetUpdateMode in class InteractionManagerpublic boolean checkQuery()
protected Vector getQueryAttributes()
public boolean checkSearchInResults()
keysValues vector and also to the
attributes one, getting those values from the managed form.public boolean checkInsert()
protected void requestFocusForEmptyRequiredComponent(Vector emptyRequiredDataField)
emptyRequiredDataField - List of all the empty required field names (String attr)protected void ensureComponentVisible(Component component)
component - public boolean checkUpdate()
attributes and
keysValues variables from the managed form. This method must be
overwritten in order to set a check that can avoid to perform the update.protected String getEmptyRequiredFieldsMessage(Vector emptyFields)
emptyFields - public boolean checkDelete()
This standard implementations returns always true, but can be changed calling the method setShowDeleteConfirmMessage.
public InteractionManager cloneInteractionManager()
InteractionManagercloneInteractionManager in class InteractionManagerpublic boolean dataWillChange(DataNavigationEvent e)
InteractionManagerdataWillChange in interface DataNavigationListenerdataWillChange in class InteractionManagerpublic void registerInteractionManager(Form form, IFormManager formManager)
registerInteractionManager in class InteractionManagerform - - the form to be associated with this managerformManager - - the form manager that rules the associationpublic boolean isScriptEnabled()
protected void createScriptManager(Form form)
public void removeDeleteListener()
registerInteractionManager(Form, IFormManager)
method.public void removeQueryListener()
registerInteractionManager(Form, IFormManager)
method.public void removeInsertListener()
registerInteractionManager(Form, IFormManager)
method.public void removeUpdateListener()
registerInteractionManager(Form, IFormManager)
method.public void free()
throws Exception
InteractionManagerfree in interface Freeablefree in class InteractionManagerExceptionpublic void print()
throws Exception
InteractionManagerprint in class InteractionManagerExceptionpublic void setShowDeleteConfirmMessage(boolean show)
show - if true, a message will appear before performing operationsprotected EntityResult query(Hashtable keysValues, Vector attributes)
keysValues - the keysValues that filter the queryattributes - the attributes to queryprotected Hashtable getFormKeyValues()
protected Hashtable getInsertAttributesValues()
protected Hashtable getAttributesValuesUpdateForm()
public void setInitialState()
InteractionManagersetInitialState in class InteractionManagerprotected void setDetailForm(boolean f)
Copyright © 2016 Imatia Innovation S.L.. All rights reserved.