com.altair.hwm.toolkit.page
Class HWMDsgnModelInstance

java.lang.Object
  extended by com.altair.hwm.toolkit.page.HWMModelInstance
      extended by com.altair.hwm.toolkit.page.HWMDsgnModelInstance
All Implemented Interfaces:
IHWMFrameWork

public class HWMDsgnModelInstance
extends HWMModelInstance

Title: HWMDsgnModelInstance

Description: The model instance for the design mode

Company: Altair Engineering, Inc.


Field Summary
 
Fields inherited from class com.altair.hwm.toolkit.page.HWMModelInstance
APPTYPE_APP, APPTYPE_TODO, PROP_MODEL_PRJNAME, PROP_MODEL_TPLNAME, PROP_TPLDISPLAY_NAME, VERSION_PRJ, VERSION_TPL
 
Constructor Summary
HWMDsgnModelInstance(java.awt.Component frameEPIC, IHWMFrame iHWMFrame)
          Constructor
 
Method Summary
 void ExportPage(java.lang.String strFilename)
          Export the current page onto the given filename
 java.lang.String GetInstanceName()
          Will return the complete path of the pmt file
 HWMPage ImportPage(java.lang.String strFilename)
          Import the page that has been saved as the given file
 void InitMenuBar(HWMMenuBarContainer barMenu)
          Customizes the menubar.
 void InitToolBar(HWMToolBarContainer barTool)
          Adds a shortcut bar if required.
 boolean IsDesignMode()
          This is invoked by a bean when it needs to know if its being used in design mode or app mode.
 void IsTemplateValid()
          Check if the tpl is valid.
 void OnCloseInstance()
          Close this instance
 void OnNewInstance(java.io.File fileTpl, int nAppType)
          Create a new instance
 void OnOpenInstance(java.io.File fileTpl)
          Open an instance
 void OnSaveAsInstance(java.lang.String sSaveAsfilename)
          SaveAs the pmt file
 void OnSaveInstance()
          Saves the pmt file
 void SetMenuToolBarHandler(HWMMenuToolBarHandler handlerMenuTool)
          Sets a ref to the MenuToolBarHandler for customization.
 
Methods inherited from class com.altair.hwm.toolkit.page.HWMModelInstance
AddHWMEventListener, addPropertyChangeListener, AddToolkitEventListener, AppendToTitle, ApplyTemplateProperties, BringToFront, ClearAll, CloseInstance, ExecuteJavaScript, Exit, ExportPageTCL, GetAppTypeFromFile, GetAppTypeFromTplPrefs, GetBeans, GetBindingInfoMgr, GetCommMgr, GetDataModel, GetDefaultPrjName, GetEPICFrame, GetFrame, GetHWPMInteraction, GetInteraction, GetMenuToolBarCustomizer, GetPageMgrModel, GetPmdFile, GetPrjVersion, GetProjectDir, GetProjectFileName, GetProjectName, GetProjectVersion, GetTemplateDir, GetTemplateFileBasedOn, GetTemplateFileName, GetTemplateName, GetTemplatePreferenceValue, GetTemplateVersion, GetTplProperties, GetTplVer, GetTplVersion, GetWorkflow, GetWorkflowModel, HandleSessionMessages, HideView, Initialize, InvokeRun, IsHWPMMode, IsProjectNew, LogStatus, ReadBindingsFromTpl, ReadPmdFile, ReadPrjVersion1_0, ReadPrjVersion6_0, ReadProject, ReadTemplate, ReadTemplatePreference, ReadTpl6_0, ReadTplPrjVersion2_0, ReadXMLProject, RemoveAllJavaScriptContexts, RemoveHWMEventListener, removePropertyChangeListener, RemoveToolkitEventListener, SaveAndCloseInstance, SaveAndExit, SendPmgrTclCommand, SendPmgrTCLCommandWOException, SendToBack, SetAppTypeInTplPrefs, SetInteraction, SetProject, SetTemplate, SetTplProperties, ShowView, WritePmdFile, WriteTpl, WriteXMLProject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HWMDsgnModelInstance

public HWMDsgnModelInstance(java.awt.Component frameEPIC,
                            IHWMFrame iHWMFrame)
Constructor

Parameters:
frameEPIC - The main frame for EPIC
iHWMFrame - The frame interface allows to create/close/save etc. process instances with user exits.
Method Detail

IsTemplateValid

public void IsTemplateValid()
                     throws java.lang.Exception
Check if the tpl is valid. Currently it checks if every task in the workflow model is associated either with a page or tcl module

Throws:
java.lang.Exception - Throws an exception if the template is not valid.

OnNewInstance

public void OnNewInstance(java.io.File fileTpl,
                          int nAppType)
                   throws java.lang.Exception
Create a new instance

Parameters:
File - fileTpl The file for which an instance should be created
nAppType - The type of application. Should be one of HWMModelInstance.APPTYPE_XXX
Throws:
java.lang.Exception

OnOpenInstance

public void OnOpenInstance(java.io.File fileTpl)
                    throws java.lang.Exception
Open an instance

Parameters:
File - fileTpl The file for which an instance should be opened
Throws:
java.lang.Exception

ExportPage

public void ExportPage(java.lang.String strFilename)
                throws java.lang.Exception
Export the current page onto the given filename

Parameters:
strFilename - The file to export the current page
Throws:
java.lang.Exception

ImportPage

public HWMPage ImportPage(java.lang.String strFilename)
                   throws java.lang.Exception
Import the page that has been saved as the given file

Parameters:
strFilename - The file to import
Returns:
The HWMPage instance that was created
Throws:
java.lang.Exception

OnCloseInstance

public void OnCloseInstance()
                     throws java.lang.Exception
Close this instance

Specified by:
OnCloseInstance in class HWMModelInstance
Throws:
java.lang.Exception

OnSaveInstance

public void OnSaveInstance()
                    throws java.lang.Exception
Saves the pmt file

Specified by:
OnSaveInstance in class HWMModelInstance
Throws:
java.lang.Exception

OnSaveAsInstance

public void OnSaveAsInstance(java.lang.String sSaveAsfilename)
                      throws java.lang.Exception
SaveAs the pmt file

Specified by:
OnSaveAsInstance in class HWMModelInstance
Throws:
java.lang.Exception

GetInstanceName

public java.lang.String GetInstanceName()
Will return the complete path of the pmt file

Specified by:
GetInstanceName in class HWMModelInstance
Parameters:
String - The complete path of the pmt file

SetMenuToolBarHandler

public void SetMenuToolBarHandler(HWMMenuToolBarHandler handlerMenuTool)
Sets a ref to the MenuToolBarHandler for customization.

Specified by:
SetMenuToolBarHandler in class HWMModelInstance
Parameters:
handlerMenuTool -

InitMenuBar

public void InitMenuBar(HWMMenuBarContainer barMenu)
Customizes the menubar.

Specified by:
InitMenuBar in class HWMModelInstance
Parameters:
barMenu -

InitToolBar

public void InitToolBar(HWMToolBarContainer barTool)
Adds a shortcut bar if required.

Specified by:
InitToolBar in class HWMModelInstance
Parameters:
barTool - The toolbar container to customize

IsDesignMode

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

Specified by:
IsDesignMode in interface IHWMFrameWork
Overrides:
IsDesignMode in class HWMModelInstance
Returns:
boolean If design mode, then true else false