com.altair.hwm.toolkit.frame
Class HWMDsgnFrameModel

java.lang.Object
  extended by com.altair.hwm.toolkit.frame.HWMFrameModel
      extended by com.altair.hwm.toolkit.frame.HWMDsgnFrameModel
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener

public class HWMDsgnFrameModel
extends HWMFrameModel

Title: HWMDsgnFrameModel

Description: The model for the dsgn frame

Company: Altair Engineering, Inc.


Field Summary
 
Fields inherited from class com.altair.hwm.toolkit.frame.HWMFrameModel
PROP_FRAME_MODELACTIVE
 
Constructor Summary
HWMDsgnFrameModel(java.awt.Component frameEPIC, IHWMFrame ihwmFrame)
          Constructor
 
Method Summary
 HWMModelInstance createNewInstance(java.io.File file)
          Method createNewInstance create a new instance for this file and set it as the active one
 javax.swing.tree.DefaultTreeModel GetMandatoryCategories()
          Returns this mandatory categories provided with EPIC
 void Init()
          Initialize the app frame model Construct the tree model for mandatory beans
 boolean IsDesignerMode()
          Returns a flag if its designer or app mode.
 HWMModelInstance OnNewFile(java.lang.String strFileName, int nAppType)
          Creates the new file
 HWMModelInstance OnOpenFile(java.lang.String strFileName)
          Open the file with given name
 
Methods inherited from class com.altair.hwm.toolkit.frame.HWMFrameModel
addPropertyChangeListener, ClearAll, GetActiveModelInstance, GetActiveTplProps, GetEPICFrame, GetHWPMInteraction, GetIHWMFrame, GetInstance, GetInstanceIndex, GetModelInstances, GetNumModelInstances, GetTplProps, Initialize, IsPMMode, OnCloseFile, OnExit, OnSaveAsFile, OnSaveFile, propertyChange, Quit, removePropertyChangeListener, SetActiveInstance, SetActiveInstance, SetActiveInstance, SetHWPMInteraction
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HWMDsgnFrameModel

public HWMDsgnFrameModel(java.awt.Component frameEPIC,
                         IHWMFrame ihwmFrame)
                  throws java.lang.Exception
Constructor

Parameters:
frameEPIC - The main frame for EPIC
ihwmFrame - The handle to IHWMFrame interface
Throws:
java.lang.Exception
Method Detail

Init

public void Init()
          throws java.lang.Exception
Initialize the app frame model Construct the tree model for mandatory beans

Throws:
java.lang.Exception

GetMandatoryCategories

public javax.swing.tree.DefaultTreeModel GetMandatoryCategories()
Returns this mandatory categories provided with EPIC

Returns:
DefaultTreeModel The mandatory categories & beans in them

OnNewFile

public HWMModelInstance OnNewFile(java.lang.String strFileName,
                                  int nAppType)
                           throws java.lang.Exception
Creates the new file

Parameters:
strFileName - The name of the new file to create
nAppType - The type of application - Can be one of HWMModelInstance.APPTYPE_XXX
Returns:
HWMModelInstance The newly created model instance
Throws:
java.lang.Exception

OnOpenFile

public HWMModelInstance OnOpenFile(java.lang.String strFileName)
                            throws java.io.FileNotFoundException,
                                   java.lang.Exception
Open the file with given name

Parameters:
strFileName - The name of the file to open
Returns:
HWMModelInstance The newly created model instance
Throws:
java.io.FileNotFoundException - - Thrown when the pmt file cannot be found Exception - when any other error occurs
java.lang.Exception

createNewInstance

public HWMModelInstance createNewInstance(java.io.File file)
                                   throws java.io.FileNotFoundException,
                                          java.lang.Exception
Method createNewInstance create a new instance for this file and set it as the active one

Parameters:
file -
Returns:
Throws:
java.io.FileNotFoundException
java.lang.Exception - if the file is already opened in studio, just puts warns user on same, allows user to open as fresh file.... -By Surya

IsDesignerMode

public boolean IsDesignerMode()
Returns a flag if its designer or app mode. Implemented by derived classes

Specified by:
IsDesignerMode in class HWMFrameModel
Returns:
boolean true if designer else false