com.altair.hwm.toolkit.frame
Class HWMDsgnFrameView

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by com.jidesoft.docking.DefaultDockableHolder
                          extended by com.jidesoft.action.DefaultDockableBarDockableHolder
                              extended by com.jidesoft.templates.SampleFrame
                                  extended by com.altair.hwm.guilibrary.AltairJFrame
                                      extended by com.altair.hwm.toolkit.frame.HWMFrameView
                                          extended by com.altair.hwm.toolkit.frame.HWMDsgnFrameView
All Implemented Interfaces:
com.altair.hw.common.HWSEventListener, IHWMFrame, HWMToolkitEventListener, com.jidesoft.action.DockableBarDockableHolder, com.jidesoft.action.DockableBarHolder, com.jidesoft.docking.DockableHolder, java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.HyperlinkListener, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class HWMDsgnFrameView
extends HWMFrameView
implements java.awt.event.ActionListener, java.beans.PropertyChangeListener, IHWMFrame, HWMToolkitEventListener, com.altair.hw.common.HWSEventListener, javax.swing.event.HyperlinkListener

Title: HWMDsgnFrameView

Description: The main frame view class for the builder mode of EPIC. This will be used for java based apps.

Company: Altair Engineering, Inc.

See Also:
Serialized Form

Field Summary
 boolean bFullScreenMode
           
 
Fields inherited from class javax.swing.JFrame
EXIT_ON_CLOSE
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
HWMDsgnFrameView()
          Constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent actEvt)
          The listener for all action events
 void ClearAll()
           
 void CloseInstance(boolean bSave, boolean bAskUser)
          Close the currently active process instance.
 void CloseTemplate()
          Close the template
 void CloseTemplate(boolean bSave, boolean bPromptUser)
          Close the template
 void CopyInstance()
          Create a new instance as a copy of an existing instance
 void createAllDockableWindows()
           
 void createAllTabbedWindows()
           
 void CreateInstance()
          Create a new process instance.
 void CreateInstance(java.lang.String strProjectFile)
          Create a new process instance in the given location.
 void EventPerformed(HWMToolkitEvent eventToolkit)
          The toolkit event listener
 void Exit()
          Exit the application.
 java.awt.Component GetMainFrame()
          Get the main component (Frame or Window) for this application
 void hyperlinkUpdate(javax.swing.event.HyperlinkEvent ev)
           
 void InitializeView(java.lang.String[] arrstrArgs)
          Initialize the UI
static void main(java.lang.String[] arrstrArgs)
          The main method for the app mode of EPIC
 void NewFile(java.lang.String strFileName, int nAppType)
          Create the given process definition file
 boolean OnExit(java.lang.Object objSrc, boolean bSave, boolean bPromptUser)
          Callback for the File-Exit button.
 void OnHelpTopics()
          Show the pmgr HW help
 void OnPreviewEnded(java.awt.Frame frmApp)
          Called when preview is ended
 void OnServerExit(int nCode)
          The interface method for the security listener - com.altair.hw.common.HWSEventListener
 void OnStart()
          This is called in InitializeView and by PM native to checkout license everytime we start studio.
 void OpenFile(java.lang.String strFileName)
          Opens the give process definition file
 void OpenInstance()
          Open an existing process instance.
 void OpenInstance(java.lang.String strProjectFile)
          Open the specified process instance.
 void ProcessCmdLineArgs(java.lang.String[] arrstrArgs)
          Process the cmd args
 void propertyChange(java.beans.PropertyChangeEvent propChgEvt)
          Fired when any property changes
 void SaveAsInstance(java.lang.String fileName, boolean bShowDialog)
          Save the current active instance as a new one.
 void SaveAsIntance(java.lang.String fileCurrInstanceName)
           
 void SaveInstance()
          Save an existing process instance.
 void SetDefaultTemplate(java.lang.String strNewPMTemplate, boolean bShowNewOpenDialog)
          Set the default template as strNewPMTemplate.
 void showHelpInBrowser(java.lang.String filename)
           
 void showPropertyView()
          show property view
 
Methods inherited from class com.altair.hwm.toolkit.frame.HWMFrameView
AddMessageToDebugLog, AddMessageToMessageLog, BringToFront, ClearDebugLog, ClearMessageLog, GetFrameModel, getImageFullPath, getImageIconDir, LogStatus, ShowHelpForWorkflow, ShowMessageLog, ShowView
 
Methods inherited from class com.jidesoft.templates.SampleFrame
load, load
 
Methods inherited from class com.jidesoft.action.DefaultDockableBarDockableHolder
dispose, getDockableBarManager, getJMenuBar, getLayoutPersistence
 
Methods inherited from class com.jidesoft.docking.DefaultDockableHolder
getDockingManager, setLayout
 
Methods inherited from class javax.swing.JFrame
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.altair.hwm.interfaces.IHWMFrame
AddMessageToDebugLog, AddMessageToMessageLog, ShowMessageLog
 
Methods inherited from interface com.jidesoft.docking.DockableHolder
getDockingManager
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

bFullScreenMode

public boolean bFullScreenMode
Constructor Detail

HWMDsgnFrameView

public HWMDsgnFrameView()
                 throws java.lang.Exception
Constructor

Throws:
java.lang.Exception
Method Detail

InitializeView

public void InitializeView(java.lang.String[] arrstrArgs)
Initialize the UI

Overrides:
InitializeView in class HWMFrameView
Parameters:
arrstrArgs - The cmd line arguments for the app mode

showPropertyView

public void showPropertyView()
show property view


createAllDockableWindows

public void createAllDockableWindows()
                              throws java.lang.Exception
Throws:
java.lang.Exception

createAllTabbedWindows

public void createAllTabbedWindows()
                            throws java.lang.Exception
Throws:
java.lang.Exception

ProcessCmdLineArgs

public void ProcessCmdLineArgs(java.lang.String[] arrstrArgs)
                        throws java.lang.Exception
Process the cmd args

Parameters:
arrstrArgs - The array of strings representing the cmd line args
Throws:
Exception<
java.lang.Exception

OnPreviewEnded

public void OnPreviewEnded(java.awt.Frame frmApp)
Called when preview is ended

Parameters:
frame - The app frame view

OpenFile

public void OpenFile(java.lang.String strFileName)
Opens the give process definition file

Parameters:
strFileName - The file to open

NewFile

public void NewFile(java.lang.String strFileName,
                    int nAppType)
Create the given process definition file

Parameters:
strFileName - The file to create
nAppType - The type of application - Can be one of HWMModelInstance.APPTYPE_XXX

OnExit

public boolean OnExit(java.lang.Object objSrc,
                      boolean bSave,
                      boolean bPromptUser)
Callback for the File-Exit button. The application exits. But before exiting, it checks if the process definition should be saved and also save the user prefernces.

Overrides:
OnExit in class HWMFrameView
Parameters:
objSrc - The src for this call. If its the PM interaction class, then we need to send an ack which will tell if its quitting or not[In case the user selects to cancel the close operation. Else we need to send PmgrCloseInstance signal to it
bSave - If true the pmt/prj saved
bPromptUser - If true, the user is prompted whether he wants to save the project/process definition and the bSave flag is ignored.
Returns:
boolean If the user chose to cancel the operation - false is returned else true

ClearAll

public void ClearAll()
Overrides:
ClearAll in class HWMFrameView

OnHelpTopics

public void OnHelpTopics()
Show the pmgr HW help


showHelpInBrowser

public void showHelpInBrowser(java.lang.String filename)
Parameters:
filename -

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent actEvt)
The listener for all action events

Specified by:
actionPerformed in interface java.awt.event.ActionListener

EventPerformed

public void EventPerformed(HWMToolkitEvent eventToolkit)
The toolkit event listener

Specified by:
EventPerformed in interface HWMToolkitEventListener
Overrides:
EventPerformed in class HWMFrameView
Parameters:
eventToolkit - The event object for toolkit events

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent propChgEvt)
Fired when any property changes

Specified by:
propertyChange in interface java.beans.PropertyChangeListener

OnServerExit

public void OnServerExit(int nCode)
The interface method for the security listener - com.altair.hw.common.HWSEventListener

Specified by:
OnServerExit in interface com.altair.hw.common.HWSEventListener
Parameters:
nCode - The error code.

OnStart

public void OnStart()
             throws java.lang.Exception
This is called in InitializeView and by PM native to checkout license everytime we start studio.

Overrides:
OnStart in class HWMFrameView
Throws:
java.lang.Exception

CreateInstance

public void CreateInstance()
                    throws java.lang.Exception
Create a new process instance. NOTE: When the template is of "todo" type i.e. does not require saving of instance data, this call is ignored

Specified by:
CreateInstance in interface IHWMFrame
Throws:
java.lang.Exception

CreateInstance

public void CreateInstance(java.lang.String strProjectFile)
                    throws java.lang.Exception
Create a new process instance in the given location. If a file already exists, it will be overwritten NOTE: When the template is of "todo" type i.e. does not require saving of instance data, this call is ignored

Specified by:
CreateInstance in interface IHWMFrame
Parameters:
strProjectFile - The project file name
Throws:
java.lang.Exception

OpenInstance

public void OpenInstance()
                  throws java.lang.Exception
Open an existing process instance. NOTE: When the template is of "todo" type i.e. does not require saving of instance data, this call is ignored

Specified by:
OpenInstance in interface IHWMFrame
Throws:
java.lang.Exception

OpenInstance

public void OpenInstance(java.lang.String strProjectFile)
                  throws java.lang.Exception
Open the specified process instance.

Specified by:
OpenInstance in interface IHWMFrame
Parameters:
strProjectFile - The full path to the instance file to open
Throws:
java.lang.Exception

SaveInstance

public void SaveInstance()
                  throws java.lang.Exception
Save an existing process instance. NOTE: When the template is of "todo" type i.e. does not require saving of instance data, this call is ignored

Specified by:
SaveInstance in interface IHWMFrame
Throws:
java.lang.Exception

CloseInstance

public void CloseInstance(boolean bSave,
                          boolean bAskUser)
                   throws java.lang.Exception
Close the currently active process instance. NOTE: When the template is of "todo" type i.e. does not require saving of instance data, this call is closed

Specified by:
CloseInstance in interface IHWMFrame
Throws:
java.lang.Exception

CloseTemplate

public void CloseTemplate()
Close the template

Specified by:
CloseTemplate in interface IHWMFrame

CloseTemplate

public void CloseTemplate(boolean bSave,
                          boolean bPromptUser)
Close the template

Specified by:
CloseTemplate in interface IHWMFrame
Parameters:
bSave - If true, the prj is saved. It is ignored when the user needs to be prompted
bPromptUser - Prompt the user with a save dialog
Throws:
java.lang.Exception

SetDefaultTemplate

public void SetDefaultTemplate(java.lang.String strNewPMTemplate,
                               boolean bShowNewOpenDialog)
                        throws java.lang.Exception
Set the default template as strNewPMTemplate.

Specified by:
SetDefaultTemplate in interface IHWMFrame
Parameters:
strNewPMTemplate - The new process manager template to use.
bShowNewOpenDialog - If true, the dialog to create a project or open a project is shown
Throws:
java.lang.Exception

Exit

public void Exit()
          throws java.lang.Exception
Exit the application. This will prompt the user to save.

Specified by:
Exit in interface IHWMFrame
Throws:
java.lang.Exception

GetMainFrame

public java.awt.Component GetMainFrame()
Get the main component (Frame or Window) for this application

Specified by:
GetMainFrame in interface IHWMFrame
Returns:
Component main component (Frame or Window) for this application

main

public static void main(java.lang.String[] arrstrArgs)
The main method for the app mode of EPIC

Parameters:
arrstrArgs - The cmd line args

SaveAsInstance

public void SaveAsInstance(java.lang.String fileName,
                           boolean bShowDialog)
                    throws java.lang.Exception
Save the current active instance as a new one.

Specified by:
SaveAsInstance in interface IHWMFrame
Throws:
java.lang.Exception

SaveAsIntance

public void SaveAsIntance(java.lang.String fileCurrInstanceName)
                   throws java.lang.Exception
Throws:
java.lang.Exception

CopyInstance

public void CopyInstance()
Create a new instance as a copy of an existing instance

Specified by:
CopyInstance in interface IHWMFrame

hyperlinkUpdate

public void hyperlinkUpdate(javax.swing.event.HyperlinkEvent ev)
Specified by:
hyperlinkUpdate in interface javax.swing.event.HyperlinkListener