|
Ontimize 5.2071EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ontimize.gui.InteractionManager
com.ontimize.gui.BasicInteractionManager
BasicInteractionManager is the class that manages the 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:
| Nested Class Summary | |
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. |
| Nested classes inherited from class com.ontimize.gui.InteractionManager |
InteractionManager.DeleteFieldsListener, InteractionManager.InteractionManagerAction, InteractionManager.PrintingThread |
| Field Summary | |
protected boolean |
addColumnsToTableView
|
protected boolean |
afterUpdate
|
protected java.util.Vector |
attributes
|
protected java.util.Hashtable |
attributesValues
|
static boolean |
AVANCED_QUERY_DEFAULT_VALUE
The advanced query mode. |
BasicInteractionManager.AvancedQueryListener |
avancedQueryListener
|
static boolean |
CLOSE_DETAIL_FORM_AFTER_INSERT_DEFAULT_VALUE
When true, closes the detail form after performing an insertion. |
protected boolean |
closeDetailFormAfterInsert
|
static boolean |
CONFIRM_DELETE_DEFAULT_VALUE
When true, shows a message prior performing any deletion. |
static java.lang.String |
defaultInteractionScriptManagerClassName
|
static boolean |
defaultScriptEnabled
|
BasicInteractionManager.DeleteListener |
deleteListener
|
protected boolean |
detailForm
|
protected QueryExpression |
expression
|
protected java.awt.Window |
formAncestor
|
protected IFormInteractionScriptManager |
formInteractionScriptManager
|
BasicInteractionManager.InsertListener |
insertListener
|
protected java.util.Hashtable |
keysValues
|
protected java.util.Hashtable |
keysValuesLastQuery
|
static java.lang.String |
M_DELETE_CONFIRM
|
static java.lang.String |
M_FILL_ALL_REQUIRED_FIELDS
|
static java.lang.String |
M_MODIFIED_DATA_APPLY_CHANGES
|
static java.lang.String |
M_UPDATE_CONFIRM
|
BasicInteractionManager.QueryListener |
queryListener
|
static java.lang.String |
S_CORRECT_DELETE
|
static java.lang.String |
S_CORRECT_INSERT
|
static java.lang.String |
S_CORRECT_UPDATE
|
static java.lang.String |
S_INCORRECT_DELETE
|
static java.lang.String |
S_INCORRECT_INSERT
|
static java.lang.String |
S_INCORRECT_UPDATE
|
protected boolean |
scriptEnabled
|
protected boolean |
searchBetweenResults
|
protected boolean |
showDeleteConfirmMessage
Makes the InteractionManager to show a message prior performing the deletion, asking to the user to do so. |
protected boolean |
stayInRecordAfterInsert
|
BasicInteractionManager.UpdateListener |
updateListener
|
| Constructor Summary | |
|
BasicInteractionManager()
Constructs a BasicInterationManager. |
|
BasicInteractionManager(boolean update)
Constructs a BasicInterationManager. |
protected |
BasicInteractionManager(boolean update,
boolean detailForm)
Constructs a BasicInteractionManager. |
| Method Summary | |
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(java.awt.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 java.util.List |
getAncestorsTo(java.awt.Component component,
java.lang.Class parentClass)
|
protected java.util.Hashtable |
getAttributesValuesUpdateForm()
Returns the attributes and the values that changed in the form to perform the update. |
protected java.lang.String |
getEmptyRequiredFieldsMessage(java.util.Vector emptyFields)
Create the message to show when you are trying to insert or update a record with empty required fields. |
IFormInteractionScriptManager |
getFormInteractionScriptManager()
|
protected java.util.Hashtable |
getFormKeyValues()
Returns the form keys and its values, to identify the record. |
protected java.util.Hashtable |
getInsertAttributesValues()
Returns all the attributes that will be inserted and the values that will be inserted in that attributes. |
protected java.util.Vector |
getQueryAttributes()
Returns the attributes that must be queried. |
boolean |
isScriptEnabled()
|
void |
print()
Method that responds to the print button keystroke. |
protected EntityResult |
query(java.util.Hashtable keysValues,
java.util.Vector attributes)
Performs a query to the entity configured in the managed form. |
void |
registerInteractionManager(Form form,
FormManager 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(java.util.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. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String S_CORRECT_INSERT
public static final java.lang.String S_INCORRECT_INSERT
public static final java.lang.String S_CORRECT_UPDATE
public static final java.lang.String S_INCORRECT_UPDATE
public static final java.lang.String S_CORRECT_DELETE
public static final java.lang.String S_INCORRECT_DELETE
public static final java.lang.String M_DELETE_CONFIRM
public static final java.lang.String M_UPDATE_CONFIRM
public static final java.lang.String M_FILL_ALL_REQUIRED_FIELDS
public static java.lang.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 java.util.Hashtable keysValuesLastQuery
protected java.util.Hashtable keysValues
protected QueryExpression expression
protected java.util.Hashtable attributesValues
protected java.util.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 java.awt.Window formAncestor
protected boolean stayInRecordAfterInsert
protected boolean closeDetailFormAfterInsert
protected boolean addColumnsToTableView
protected boolean scriptEnabled
protected IFormInteractionScriptManager formInteractionScriptManager
public static java.lang.String defaultInteractionScriptManagerClassName
| Constructor Detail |
public BasicInteractionManager()
public BasicInteractionManager(boolean update)
update - false if to refresh the trees and the tables from the
BasicInteractionManager is not desired
protected 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 Table| Method Detail |
public void setInsertMode()
InteractionManager
setInsertMode in class InteractionManagerpublic IFormInteractionScriptManager getFormInteractionScriptManager()
public void setStayInRecordAfterInsert(boolean stayInRecordAfterInsert)
stayInRecordAfterInsert - if true, the form will show a record after its insertionpublic void setQueryInsertMode()
InteractionManager
setQueryInsertMode in class InteractionManagerpublic void setQueryMode()
InteractionManager
setQueryMode in class InteractionManagerpublic void setUpdateMode()
InteractionManager
setUpdateMode in class InteractionManagerpublic boolean checkQuery()
protected java.util.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(java.util.Vector emptyRequiredDataField)
emptyRequiredDataField - List of all the empty required field names (String attr)protected void ensureComponentVisible(java.awt.Component component)
component -
protected java.util.List getAncestorsTo(java.awt.Component component,
java.lang.Class parentClass)
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 java.lang.String getEmptyRequiredFieldsMessage(java.util.Vector emptyFields)
emptyFields -
public boolean checkDelete()
This standard implementations returns always true, but can be changed calling the method setShowDeleteConfirmMessage.
public InteractionManager cloneInteractionManager()
InteractionManager
cloneInteractionManager in class InteractionManagerpublic boolean dataWillChange(DataNavigationEvent e)
InteractionManager
dataWillChange in interface DataNavigationListenerdataWillChange in class InteractionManager
public void registerInteractionManager(Form form,
FormManager 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, FormManager)
method.
public void removeQueryListener()
registerInteractionManager(Form, FormManager) method.
public void removeInsertListener()
registerInteractionManager(Form, FormManager)
method.
public void removeUpdateListener()
registerInteractionManager(Form, FormManager)
method.
public void free()
throws java.lang.Exception
InteractionManager
free in interface Freeablefree in class InteractionManagerjava.lang.Exception
public void print()
throws java.lang.Exception
InteractionManager
print in class InteractionManagerjava.lang.Exceptionpublic void setShowDeleteConfirmMessage(boolean show)
show - if true, a message will appear before performing operations
protected EntityResult query(java.util.Hashtable keysValues,
java.util.Vector attributes)
keysValues - the keysValues that filter the queryattributes - the attributes to query
protected java.util.Hashtable getFormKeyValues()
protected java.util.Hashtable getInsertAttributesValues()
protected java.util.Hashtable getAttributesValuesUpdateForm()
public void setInitialState()
InteractionManager
setInitialState in class InteractionManagerprotected void setDetailForm(boolean f)
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||