|
Ontimize 5.2072EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ontimize.gui.InteractionManager
InteractionManager is the class that manages the Form basic events.
The FormManager sets an InteractionManager to every Form. When a
specific InteractionManager is needed, this class must be extended, and the
relation between the Form to manage and the implemented Interaction Manager
must be done in the way specified by the FormManager
Important
In order to make this Manager to work right, the buttons (see Button)
must have the following standard keys:
| Nested Class Summary | |
protected class |
InteractionManager.DeleteFieldsListener
Class that implements the lister to the button 'delete fields' which set a initial mode to the form (QueryInsert mode setQueryInsertMode()) and delete the contents
of all the fields in the form. |
protected class |
InteractionManager.InteractionManagerAction
This class implements the normal behavior buttons in the InteractionManager must
have. |
protected class |
InteractionManager.PrintingThread
Class that creates a thread which prints the form contents using a HTMLProcessor |
| Field Summary | |
protected InteractionManagerAction |
actionHandler
|
static java.lang.String |
ADVANCED_QUERY_KEY
|
static boolean |
CHECK_MODIFIED_DATA_CHANGED_DEFAULT_VALUE
|
protected boolean |
checkModifiedDataChangeEvent
Enables or disables checking the modified data when performing a navigation operation in the application, for example, changing the record when a field was modified. |
protected ClientMessenger_Impl |
client
|
int |
currentMode
The form current mode. |
protected boolean |
dataChangedEventProcessing
|
static boolean |
DEBUG
Activates the DEBUG mode, which prints some useful information about the execution of this class. |
static java.lang.String |
DELETE_KEY
|
protected InteractionManager.DeleteFieldsListener |
deleteFieldsListener
|
protected java.lang.String |
f11Button
|
protected java.lang.String |
f12Button
|
protected java.lang.String |
f7Button
|
protected java.lang.String |
f9Button
|
FormManager |
formManager
The form manager related to the InteractionManager |
static java.lang.String |
HELP_KEY
|
static int |
INSERT
|
static java.lang.String |
INSERT_KEY
|
protected java.util.ArrayList |
interactionManagerModeListenerList
|
Form |
managedForm
The form managed by this InteractionManager |
protected java.util.Vector |
modifiedFieldAttributes
|
static boolean |
NEWMODE
Activates a new state diagram, in which in QUERYINSERT state you can
either insert or query directly. |
protected java.lang.Thread |
printThread
|
static int |
QUERY
|
static java.lang.String |
QUERY_INSERT_KEY
|
static java.lang.String |
QUERY_KEY
|
static int |
QUERYINSERT
|
static java.lang.String |
selectionPrintingKey
|
protected boolean |
setDefaultFocusEnabled
|
static int |
UPDATE
|
static int |
UPDATE_ALL
|
static int |
UPDATE_CHANGED
|
static java.lang.String |
UPDATE_KEY
|
protected int |
updateMethod
|
protected java.util.Vector |
valueChangedListenerAttributes
|
protected boolean |
valueChangeListenerEnabled
|
protected static java.lang.String |
warningBirthdayMessage
|
| Constructor Summary | |
InteractionManager()
Constructs an InteractionManager |
|
| Method Summary | |
void |
addInteractionManagerModeListener(InteractionManagerModeListener listener)
Register a listener that will be notified of the changes of mode in the Interaction Manager. |
boolean |
checkBirthday(java.lang.String attr)
Checks that the field in the managed form identified by the attr Strings is a Date and, if so, checks that the Date is before than the actual Date. |
InteractionManager |
cloneInteractionManager()
Clones this InteractionManager. |
void |
dataChanged(DataNavigationEvent e)
Method invoked when the register shown in the form changes. |
boolean |
dataWillChange(DataNavigationEvent e)
Method invoked when the register shown in the form is going to change. |
protected void |
finalize()
|
protected void |
fireInteractionManagerModeChanged(InteractionManagerModeEvent event)
Notifies all the registered listeners that the form mode has changed. |
void |
free()
Removes all the references that this InteractionManager has in order to free the memory. |
InteractionManagerAction |
getActionHandler()
|
boolean |
getCheckModifiedDataChangeEvent()
Checks whether the verification of modified data is enabled or not. |
int |
getCurrentMode()
Returns the actual mode of the form |
boolean |
getDataChangedEventProcessing()
Checks whether the execution of the method dataChanged(DataNavigationEvent)
is enabled or not. |
boolean |
getDefaultActiveFocus()
Returns the current focus configuration. |
java.util.Hashtable |
getFieldValues(Form form)
Gets field values included in form that are inserted when template is filled. |
java.util.Hashtable |
getImageValues(Form form,
boolean insertEmptyImages)
Gets image values included in form that are inserted when template is filled. |
java.util.Vector |
getModifiedFieldAttributes()
Returns a Vector with the atributes of the fields that have been modified. |
java.util.Hashtable |
getTableValues(Form form)
Gets table values included in form that are inserted when template is filled. |
java.util.Hashtable |
getTemplateFields(Form form)
Gets fields included in form that are inserted when template is created. |
java.util.Hashtable |
getTemplateImages(Form form)
Gets images included in form that are inserted when template is created. |
java.util.Hashtable |
getTemplateTables(Form form)
Gets tables included in form that are inserted when template is created. |
boolean |
isValueChangeListenerEnabled()
|
void |
loadActionHandler(java.lang.String resource)
|
void |
print()
Method that responds to the print button keystroke. |
protected void |
registerFormKeyBindings()
Called when creating the InteractionManager, this method registers all the keystrokes for the form. |
void |
registerInteractionManager(Form form,
FormManager formManager)
Registers the InteractionManager as form event listener. |
void |
removeInteractionManagerModeListener(InteractionManagerModeListener listener)
Removes a listener from the ones sets to listen to the InteractionManager mode changes. |
void |
setCheckModifiedDataChangeEvent(boolean check)
Enables or disables the verification of modified data. |
void |
setDataChangedEventProcessing(boolean enable)
Enables or disables the execution of the method dataChanged(DataNavigationEvent). |
void |
setDefaultFocusEnabled(boolean enable)
Enables or not the focus strategy in which the focus is set to the first form component. |
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. |
protected void |
setUpdateMethodVersion(int method)
Sets the update method. |
void |
setUpdateMode()
Sets the mode of the form in Update. |
void |
setValueChangedEventListener(java.lang.Object attr,
boolean listen)
Register elements as valuechanged listeners, so in the case that they are a valuechangeevent source the InteractionManager will process that events. |
void |
setValueChangeEventListenerEnabled(boolean enabled)
|
void |
setWarningBirthdayMessage(java.lang.String message)
Deprecated. |
void |
valueChanged(ValueEvent e)
Invoked when a value in some of the form elements has changed. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static boolean DEBUG
public static boolean NEWMODE
QUERYINSERT state you can
either insert or query directly.
public static java.lang.String selectionPrintingKey
public static boolean CHECK_MODIFIED_DATA_CHANGED_DEFAULT_VALUE
public static final int QUERYINSERT
public static final int QUERY
public static final int INSERT
public static final int UPDATE
public static final java.lang.String HELP_KEY
public static final java.lang.String QUERY_KEY
public static final java.lang.String QUERY_INSERT_KEY
public static final java.lang.String INSERT_KEY
public static final java.lang.String UPDATE_KEY
public static final java.lang.String DELETE_KEY
public static final java.lang.String ADVANCED_QUERY_KEY
protected java.lang.String f7Button
protected java.lang.String f9Button
protected java.lang.String f11Button
protected java.lang.String f12Button
protected java.util.ArrayList interactionManagerModeListenerList
protected boolean dataChangedEventProcessing
protected static java.lang.String warningBirthdayMessage
protected boolean setDefaultFocusEnabled
protected boolean checkModifiedDataChangeEvent
protected java.util.Vector valueChangedListenerAttributes
protected boolean valueChangeListenerEnabled
public static final int UPDATE_ALL
public static final int UPDATE_CHANGED
protected java.util.Vector modifiedFieldAttributes
protected int updateMethod
public FormManager formManager
public Form managedForm
InteractionManager
public int currentMode
protected InteractionManagerAction actionHandler
protected ClientMessenger_Impl client
protected java.lang.Thread printThread
protected InteractionManager.DeleteFieldsListener deleteFieldsListener
| Constructor Detail |
public InteractionManager()
| Method Detail |
protected void setUpdateMethodVersion(int method)
method - -
the update method to setpublic void setInitialState()
public void registerInteractionManager(Form form,
FormManager formManager)
FormManager when a Form is loaded.
If new listeners wants to be added to some objects of the managed form,
this must be done by overwriting this method.
In this basic implementation of the method, only the form and the form manager are assigned and stored by the InteractionManager in order to have references to these classes later. A basic way of overwriting this must call the super.registerInteractionManager(form, FormsManager)
This method links a key stroke to the standard buttons:
form - -
the form to be associated with this managerformManager - -
the form manager that rules the associationpublic void setQueryInsertMode()
public void setInsertMode()
public void setUpdateMode()
public void setQueryMode()
public void print()
throws java.lang.Exception
java.lang.Exceptionpublic InteractionManager cloneInteractionManager()
public void free()
throws java.lang.Exception
free in interface Freeablejava.lang.Exception
protected void finalize()
throws java.lang.Throwable
java.lang.Throwablepublic boolean getCheckModifiedDataChangeEvent()
public void setCheckModifiedDataChangeEvent(boolean check)
check - public java.util.Vector getModifiedFieldAttributes()
public void valueChanged(ValueEvent e)
valueChanged in interface ValueChangeListenere - Event with the previous value and the new onepublic int getCurrentMode()
public boolean dataWillChange(DataNavigationEvent e)
dataWillChange in interface DataNavigationListenere -
public void dataChanged(DataNavigationEvent e)
If there's no match between the register in the form and the organizational node's child (this could happen because the tree is not refreshed yet) the organizational node is selected. In this case the update button is disabled and the list of modified fields is removed.
dataChanged in interface DataNavigationListenere - public void setDataChangedEventProcessing(boolean enable)
dataChanged(DataNavigationEvent).
enable - public boolean getDataChangedEventProcessing()
dataChanged(DataNavigationEvent)
is enabled or not.
public void setWarningBirthdayMessage(java.lang.String message)
message - public boolean checkBirthday(java.lang.String attr)
attr - =
the field which has to be compared to
public void setValueChangedEventListener(java.lang.Object attr,
boolean listen)
attr - the attribute of the element that wants to be registered. This
object should be a String in the text fields or integer fields,
but it can be a different object in other fields like reference
fieldslisten - if the value is true, the element will be added, is false, the
element will be removedpublic void setValueChangeEventListenerEnabled(boolean enabled)
public boolean isValueChangeListenerEnabled()
protected void registerFormKeyBindings()
public void setDefaultFocusEnabled(boolean enable)
enable - public boolean getDefaultActiveFocus()
public java.util.Hashtable getTemplateTables(Form form)
form - Form that is source to create template
Hashtable with tables included in templatepublic java.util.Hashtable getTemplateFields(Form form)
form - Form that is source to create template
Hashtable with fields included in templatepublic java.util.Hashtable getTemplateImages(Form form)
form - Form that is source to create template
Hashtable with tables included in templatepublic java.util.Hashtable getFieldValues(Form form)
form - Form that is source to fill template
Hashtable with field values included in templatepublic java.util.Hashtable getTableValues(Form form)
form - Form that is source to fill template
Hashtable with table values included in template
public java.util.Hashtable getImageValues(Form form,
boolean insertEmptyImages)
form - Form that is source to fill template
Hashtable with image values included in templatepublic void addInteractionManagerModeListener(InteractionManagerModeListener listener)
listener - the listener to addpublic void removeInteractionManagerModeListener(InteractionManagerModeListener listener)
listener - the listener to be removedprotected void fireInteractionManagerModeChanged(InteractionManagerModeEvent event)
event - public InteractionManagerAction getActionHandler()
public void loadActionHandler(java.lang.String resource)
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||