com.altair.hwm.interfaces
Interface IHWMFrameWork

All Known Implementing Classes:
HWMAppModelInstance, HWMDsgnModelInstance, HWMModelInstance

public interface IHWMFrameWork

Title: IHWMFrameWork

Description: This interface will be implemented by the HWM application. This along with the IHWMControl interface (which will be implemented by beans) will facilitate the communication between beans and the container(HWM application).

Company: Altair Engineering, Inc.


Method Summary
 void AddHWMEventListener(HWMEventListener hwmEventListener)
          Add a bean as an HWMEventListener
 void AppendToTitle(java.lang.String strTitleSuffix)
          Append to the title of the application.
 void BringToFront()
          This gets the application's view to the front
 void CloseInstance()
          Close this instance
 java.lang.Object ExecuteJavaScript(java.lang.Object objScope, java.lang.String strScript)
          Execute a JavaScript ("this" modelinstance will be the scope) and return the result
 void Exit()
          This is invoked by a bean when the application should exit.
 HWMCommMgr GetCommMgr()
          This gets the comm mgr class
 IHWMDataModel GetDataModel()
          This gets the data model for this framework.
 java.awt.Component GetEPICFrame()
          Returns the parent component.
 IHWMFrame GetFrame()
          Returns the IHWMFrame interface.
 IHWInteraction GetHWPMInteraction()
          This returns the HWPMInteraction for this framework.
 IMenuToolBarCustomizer GetMenuToolBarCustomizer()
          Returns the menu/toolbar customizer
 java.lang.String GetProjectDir()
          Gets the project directory name
 java.lang.String GetProjectFileName()
          Gets the project file name
 java.lang.String GetTemplateDir()
          Gets the template directory name
 java.lang.String GetTemplateFileName()
          Gets the template file name
 java.lang.Object GetTemplatePreferenceValue(java.lang.String strTemplatePrefKey)
          This method returns the template preference value associated with the template preference key specified.
 IHWMWorkflow GetWorkflow()
          Gets the workflow interface
 void HandleSessionMessages(HWMClientComm hwmSession, boolean bStart)
          Request the framework to handle/stop handling the HWPM script messages received by the comm session.
 void HideView()
          This hides the application's view
 boolean IsDesignMode()
          This is invoked by a bean when it needs to know if its being used in design mode or app mode
 void LogStatus(java.lang.String strMsg)
          This displays the given message in the status bar for the application
 void RemoveHWMEventListener(HWMEventListener hwmEventListener)
          Remove a bean as an HWMEventListener
 void SaveAndCloseInstance(boolean bAskUser)
          Save and close this instance
 void SaveAndExit(boolean bAskUser)
          This is invoked by a bean when the application should exit.
 void SendToBack()
          This sets the application's view to the back
 void ShowView()
          This shows the application's view
 

Method Detail

LogStatus

void LogStatus(java.lang.String strMsg)
This displays the given message in the status bar for the application

Parameters:
strMsg - The message to show

IsDesignMode

boolean IsDesignMode()
This is invoked by a bean when it needs to know if its being used in design mode or app mode

Returns:
boolean If design mode, then true else false

HideView

void HideView()
This hides the application's view


ShowView

void ShowView()
This shows the application's view


BringToFront

void BringToFront()
This gets the application's view to the front


SendToBack

void SendToBack()
This sets the application's view to the back


GetCommMgr

HWMCommMgr GetCommMgr()
This gets the comm mgr class

Returns:
HWMCommMgr The communication manager for the instance

GetDataModel

IHWMDataModel GetDataModel()
This gets the data model for this framework.

Returns:
IHWMDataModel The data model for the instance

GetHWPMInteraction

IHWInteraction GetHWPMInteraction()
This returns the HWPMInteraction for this framework.

Returns:
IHWInteraction The HWPMInteraction instance

AppendToTitle

void AppendToTitle(java.lang.String strTitleSuffix)
Append to the title of the application. This has no effect in design mode

Parameters:
strTitleSuffix - The suffix to append to the title

CloseInstance

void CloseInstance()
Close this instance


SaveAndCloseInstance

void SaveAndCloseInstance(boolean bAskUser)
Save and close this instance

Parameters:
bAskUser: - If bAskUser is true, then the user is asked if he/she wants to save the pmt/prj file. If bAskUser is false, then the template/prj is saved without prompting the user

Exit

void Exit()
This is invoked by a bean when the application should exit. The template/prj is not saved


SaveAndExit

void SaveAndExit(boolean bAskUser)
This is invoked by a bean when the application should exit.

Parameters:
bAskUser: - If bAskUser is true, then the user is asked if he/she wants to save the pmt/prj file. If bAskUser is false, then the template/prj is saved without prompting the user

GetMenuToolBarCustomizer

IMenuToolBarCustomizer GetMenuToolBarCustomizer()
Returns the menu/toolbar customizer

Returns:
IMenuToolBarCustomizer The menu toolbar customizer interface

GetTemplateFileName

java.lang.String GetTemplateFileName()
Gets the template file name

Returns:
String The template file name

GetProjectFileName

java.lang.String GetProjectFileName()
Gets the project file name

Returns:
String The project file name

GetTemplateDir

java.lang.String GetTemplateDir()
Gets the template directory name

Returns:
String The template directory name

GetProjectDir

java.lang.String GetProjectDir()
Gets the project directory name

Returns:
String The project directory name

GetWorkflow

IHWMWorkflow GetWorkflow()
Gets the workflow interface

Returns:
IHWMWorkflow The workflow interface. It may be null.

GetEPICFrame

java.awt.Component GetEPICFrame()
Returns the parent component. Use this as the parent for displaying any dialogs so that it will acquire the icon from this component.

Returns:
Component The parent component. This can be any of the top level containers like frame, window etc.

GetFrame

IHWMFrame GetFrame()
Returns the IHWMFrame interface.

Returns:
IHWMFrame The IHWMFrame interface which allows closing/opening/ creation of instances, changing defailt template and exiting application.

AddHWMEventListener

void AddHWMEventListener(HWMEventListener hwmEventListener)
Add a bean as an HWMEventListener

Parameters:
hwmEventListener - The listener object

RemoveHWMEventListener

void RemoveHWMEventListener(HWMEventListener hwmEventListener)
Remove a bean as an HWMEventListener

Parameters:
hwmEventListener - The listener object

ExecuteJavaScript

java.lang.Object ExecuteJavaScript(java.lang.Object objScope,
                                   java.lang.String strScript)
                                   throws java.lang.Exception
Execute a JavaScript ("this" modelinstance will be the scope) and return the result

Parameters:
strScript - The Java script to execute
Returns:
The result of executing the script
Throws:
java.lang.Exception

GetTemplatePreferenceValue

java.lang.Object GetTemplatePreferenceValue(java.lang.String strTemplatePrefKey)
                                            throws java.lang.Exception
This method returns the template preference value associated with the template preference key specified.

Parameters:
strTemplatePrefKey - The template preference key.
Returns:
The template preference value or null if none found. NOTE: The different templete preference keys are defined as constants in HWMTplPreferences.
Throws:
java.lang.Exception

HandleSessionMessages

void HandleSessionMessages(HWMClientComm hwmSession,
                           boolean bStart)
Request the framework to handle/stop handling the HWPM script messages received by the comm session.

Parameters:
hwmSession - The session for which the framework should start or stop handling the incoming messages
bStart - If true, it starts handling else stops handling