com.altair.hwm.toolkit.binding
Class HWMBindingInfoMgr

java.lang.Object
  extended by com.altair.hwm.toolkit.binding.HWMBindingInfoMgr
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class HWMBindingInfoMgr
extends java.lang.Object
implements java.awt.event.ActionListener

Title: HWMBindingMgrModel

Description: Handles all binding functionality from displaying the popup menus for beans to writing the adapter class

Company: Altair Engineering, Inc.


Field Summary
static java.lang.String VERSION_HWMBINDINGINFOMGR
           
 
Constructor Summary
HWMBindingInfoMgr(HWMModelInstance modelInstance)
          Constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent eventAction)
          Handles events generated by binding popup menus.
 void AddToolkitEventListener(HWMToolkitEventListener listenerEvent)
          Adds a ToolkitEventListener
 void ClearAll()
          Clears the important members vars
 void DoBinding(java.awt.Component compSource, int nXPos, int nYPos)
          Handles the popup trigger mouse event fired by a BeanWrapper.
 java.util.Vector GetBindingInfo()
          Returns the list of binding infos
 void InitAdapters()
          Loops through all the binding info and instantiate the adapter classes
 void LoadTemplate1_0(java.io.ObjectInputStream objTemplateStream)
          Retrieve the template file.
 void LoadTemplateGreaterThan1_0(java.io.ObjectInputStream objInputStream)
          This is invoked by the model instance for new versions of the template
 void ReadOldProject(java.io.ObjectInputStream objInputStream)
          Reads the old versions where the last adapter id was stored in the prj This is invoked by the model instance
 void RemoveBindingInfo(HWMBindingInfo hwmBindingInfo)
          Removes binding info.(Used by BindingInfo property classes)
 void RemoveBindingInfo(int nPageID)
          If a page gets deleted, all the binding info related to any bean in that page (every binding to beans in that page as source or as target) need to be deleted also.
 void RemoveBindingInfo(int nPageID, int nBeanID)
          If a bean gets deleted, all the binding info related to that bean (every binding to that bean as source or as target) need to be deleted also
 void RemoveToolkitEventListener(HWMToolkitEventListener listenerEvent)
          Removes a ToolkitEventListener
 void SaveTemplate(java.io.ObjectOutputStream objTemplateStream)
          Save the template file.
 void SetBindingInfo(java.util.Vector vectBindingInfo)
          Sets the list of binding infos
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION_HWMBINDINGINFOMGR

public static final java.lang.String VERSION_HWMBINDINGINFOMGR
See Also:
Constant Field Values
Constructor Detail

HWMBindingInfoMgr

public HWMBindingInfoMgr(HWMModelInstance modelInstance)
Constructor.

Parameters:
modelIntance - A ref to the model instance this belongs to.
Method Detail

DoBinding

public void DoBinding(java.awt.Component compSource,
                      int nXPos,
                      int nYPos)
Handles the popup trigger mouse event fired by a BeanWrapper.

Parameters:
compSource - The source component
nXPos - The x coord of the mouse click
nXPos - The y coord of the mouse click

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent eventAction)
Handles events generated by binding popup menus.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
eventAction - Generated by the popupmenu

RemoveBindingInfo

public void RemoveBindingInfo(int nPageID,
                              int nBeanID)
If a bean gets deleted, all the binding info related to that bean (every binding to that bean as source or as target) need to be deleted also

Parameters:
nPageID - The ID of the page containing the bean
nBeanID - The bean ID

RemoveBindingInfo

public void RemoveBindingInfo(int nPageID)
If a page gets deleted, all the binding info related to any bean in that page (every binding to beans in that page as source or as target) need to be deleted also.

Parameters:
nPageID - The ID of the page containing the bean
nBeanID - The bean ID

RemoveBindingInfo

public void RemoveBindingInfo(HWMBindingInfo hwmBindingInfo)
Removes binding info.(Used by BindingInfo property classes)

Parameters:
HWMBindingInfo - The binding info to remove

AddToolkitEventListener

public void AddToolkitEventListener(HWMToolkitEventListener listenerEvent)
Adds a ToolkitEventListener

Parameters:
listenerEvent - The new listener

RemoveToolkitEventListener

public void RemoveToolkitEventListener(HWMToolkitEventListener listenerEvent)
Removes a ToolkitEventListener

Parameters:
listenerEvent - The listener to remove

GetBindingInfo

public java.util.Vector GetBindingInfo()
Returns the list of binding infos

Returns:
Vector The binding infos

SetBindingInfo

public void SetBindingInfo(java.util.Vector vectBindingInfo)
Sets the list of binding infos


ClearAll

public void ClearAll()
Clears the important members vars


SaveTemplate

public void SaveTemplate(java.io.ObjectOutputStream objTemplateStream)
                  throws java.io.FileNotFoundException,
                         java.io.IOException
Save the template file. The template file has all the information regarding the Binding Info

Throws:
FileNotFoundException, - IOException
java.io.FileNotFoundException
java.io.IOException

ReadOldProject

public void ReadOldProject(java.io.ObjectInputStream objInputStream)
                    throws java.io.IOException,
                           java.io.FileNotFoundException,
                           java.lang.ClassNotFoundException
Reads the old versions where the last adapter id was stored in the prj This is invoked by the model instance

Parameters:
objInputStream - The input stream for the prj file.
Throws:
java.io.IOException
java.io.FileNotFoundException
java.lang.ClassNotFoundException

LoadTemplate1_0

public void LoadTemplate1_0(java.io.ObjectInputStream objTemplateStream)
                     throws java.io.IOException,
                            java.io.FileNotFoundException,
                            java.lang.ClassNotFoundException
Retrieve the template file. The template file has all the information regarding the Binding Info.

Throws:
IOException, - FileNotFoundException, ClassNotFoundException
java.io.IOException
java.io.FileNotFoundException
java.lang.ClassNotFoundException

LoadTemplateGreaterThan1_0

public void LoadTemplateGreaterThan1_0(java.io.ObjectInputStream objInputStream)
                                throws java.io.IOException,
                                       java.io.FileNotFoundException,
                                       java.lang.ClassNotFoundException
This is invoked by the model instance for new versions of the template

Throws:
java.io.IOException
java.io.FileNotFoundException
java.lang.ClassNotFoundException

InitAdapters

public void InitAdapters()
Loops through all the binding info and instantiate the adapter classes