com.altair.hwm.toolkit.page
Class HWMMenuToolBarCustomizerAdapter

java.lang.Object
  extended by com.altair.hwm.toolkit.page.HWMMenuToolBarCustomizerAdapter
All Implemented Interfaces:
IMenuToolBarCustomizer

public class HWMMenuToolBarCustomizerAdapter
extends java.lang.Object
implements IMenuToolBarCustomizer

Title: HWMMenuToolBarCustomizerAdapter

Description: Adapter class which implements the IMEnuToolBarCustomizer

Company: Altair Engineering, Inc.


Field Summary
 
Fields inherited from interface com.altair.hwm.interfaces.IMenuToolBarCustomizer
MENU_TOOLBAR_EDIT, MENU_TOOLBAR_EDIT_COPY, MENU_TOOLBAR_EDIT_CUT, MENU_TOOLBAR_EDIT_DELETE, MENU_TOOLBAR_EDIT_DESELETCTALL, MENU_TOOLBAR_EDIT_PASTE, MENU_TOOLBAR_EDIT_SELETCTALL, MENU_TOOLBAR_FILE, MENU_TOOLBAR_FILE_SAVEAS, MENU_TOOLBAR_FILECLOSE, MENU_TOOLBAR_FILEEXIT, MENU_TOOLBAR_FILENEW, MENU_TOOLBAR_FILEOPEN, MENU_TOOLBAR_FILEPREVIEW, MENU_TOOLBAR_FILEREOPEN, MENU_TOOLBAR_FILESAVE, MENU_TOOLBAR_HELP, MENU_TOOLBAR_HELPABOUT, MENU_TOOLBAR_HWM_WINDOWSLYAOUT_OPEN_PERSPECTIVE, MENU_TOOLBAR_LOOKANDFEEL, MENU_TOOLBAR_OPTIONS, MENU_TOOLBAR_PLAY, MENU_TOOLBAR_PLAYFROM, MENU_TOOLBAR_RUN, MENU_TOOLBAR_RUNBREAK, MENU_TOOLBAR_RUNSTOP, MENU_TOOLBAR_SHOWDMVIEWER, MENU_TOOLBAR_TOOLS, MENU_TOOLBAR_TOOLSMIGRATE, MENU_TOOLBAR_TOOLSTPLPREF, MENU_TOOLBAR_VALIDATETPL, MENU_TOOLBAR_VIEW, MENU_TOOLBAR_VIEW_CONTORL_VIEW, MENU_TOOLBAR_VIEW_DATAMODEL_VIEWER, MENU_TOOLBAR_VIEW_GRAPH_VIEW, MENU_TOOLBAR_VIEW_LAYOUT_VIEW, MENU_TOOLBAR_VIEW_PAGE_VIEW, MENU_TOOLBAR_VIEW_PROCESS_VIEW, MENU_TOOLBAR_VIEW_PROPERTY_VIEW, MENU_TOOLBAR_VIEWFILE, MENU_TOOLBAR_VIEWMSGLOG, MENU_TOOLBAR_VIEWRUN, MENU_TOOLBAR_VIEWWORKFLOW, MENU_TOOLBAR_WINDOWS, MENU_TOOLBAR_WINDOWSLAYOUT
 
Constructor Summary
HWMMenuToolBarCustomizerAdapter()
          Constructor
 
Method Summary
 void EnableMenu(java.lang.String strName, boolean bEnable)
          Enable/disable menu with given name
 void EnableMenuItem(java.lang.String strMenuName, java.lang.String strMenuItemName, boolean bEnable)
          Enable/Disable menuitem with given name in the menu with given name
 void EnableMenuItems(java.lang.String strMenuName, java.lang.String[] arrstrMenuItemName, boolean bEnable)
          Enable/Disable array of menuitem with given names present in the menu
 void EnableToolBar(java.lang.String strName, boolean bEnable)
          Enable/disable the toolbar with given title
 void EnableToolBarComponent(java.lang.String strToolBarName, java.lang.String strCompName, boolean bEnable)
          Enable/disable a component in the toolbar, only if the toolbar is of type HWMToolBar
 void EnableToolBarComponents(java.lang.String strToolBarName, java.lang.String[] arrstrCompNames, boolean bEnable)
          Enable/disable components in the toolbar, only if the toolbar is of type HWMToolBar
 javax.swing.JMenu GetMenu(java.lang.String strName)
          Get the menu with given title
 HWMMenuBarContainer GetMenuBar()
          Returns the instance's menubar
 java.awt.Component GetMenuComponent(java.lang.String strMenuName, java.lang.String strCompName)
          Return a component in the menu with given name.
 HWMMenuToolBarHandler GetMenuToolBarHandler()
          Gets a ref to the MenuToolBarHandler for customization.
 HWMToolBarContainer GetToolBar()
          Returns the instance's toolbar
 AltairJToolBar GetToolBar(java.lang.String strName)
          Get the toolbar with given title
 java.awt.Component GetToolBarComponent(java.lang.String strToolBarName, java.lang.String strCompName)
          Return a component in the toolbar with given name.
 void InitMenuBar(HWMMenuBarContainer barMenu)
          Customizes the menubar.
 void InitToolBar(HWMToolBarContainer barTool)
          Adds a shortcut bar if required.
 void SetMenuToolBarHandler(HWMMenuToolBarHandler handlerMenuTool)
          Sets a ref to the MenuToolBarHandler for customization.
 void ShowMenu(java.lang.String strName, boolean bShow)
          Show/hide menu with given name
 void ShowMenuItem(java.lang.String strMenuName, java.lang.String strMenuItemName, boolean bShow)
          Show/hide menuitem with given name in the menu with given name
 void ShowMenuItems(java.lang.String strMenuName, java.lang.String[] arrstrMenuItemName, boolean bShow)
          Enable/Disable array of menuitem with given names present in the menu
 void ShowToolBar(java.lang.String strName, boolean bShow)
          Show the toolbar with given title
 void ShowToolBarComponent(java.lang.String strToolBarName, java.lang.String strCompName, boolean bShow)
          Show/hide a component in the toolbar, only if the toolbar is of type HWMToolBar
 void ShowToolBarComponents(java.lang.String strToolBarName, java.lang.String[] arrstrCompNames, boolean bShow)
          Show/hide components in the toolbar, only if the toolbar is of type HWMToolBar
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HWMMenuToolBarCustomizerAdapter

public HWMMenuToolBarCustomizerAdapter()
Constructor

Method Detail

GetMenuBar

public HWMMenuBarContainer GetMenuBar()
Returns the instance's menubar

Returns:
HWMMenuBarContainer

GetToolBar

public HWMToolBarContainer GetToolBar()
Returns the instance's toolbar

Returns:
HWMtoolBarContainer

InitMenuBar

public void InitMenuBar(HWMMenuBarContainer barMenu)
Customizes the menubar.

Parameters:
barMenu -

InitToolBar

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

Parameters:
barTool - The toolbar container to customize

SetMenuToolBarHandler

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

Parameters:
handlerMenuTool -

GetMenuToolBarHandler

public HWMMenuToolBarHandler GetMenuToolBarHandler()
Gets a ref to the MenuToolBarHandler for customization.

Returns:
HWMMenuToolBarHandler

ShowMenu

public void ShowMenu(java.lang.String strName,
                     boolean bShow)
              throws java.lang.Exception
Description copied from interface: IMenuToolBarCustomizer
Show/hide menu with given name

Specified by:
ShowMenu in interface IMenuToolBarCustomizer
Parameters:
strName - The name of the menu to show/hide
bShow - If true, the menu is shown else hidden
Throws:
java.lang.Exception

ShowMenuItem

public void ShowMenuItem(java.lang.String strMenuName,
                         java.lang.String strMenuItemName,
                         boolean bShow)
                  throws java.lang.Exception
Description copied from interface: IMenuToolBarCustomizer
Show/hide menuitem with given name in the menu with given name

Specified by:
ShowMenuItem in interface IMenuToolBarCustomizer
Parameters:
strMenuName - The name of the menu in which the menu item is present
strMenuItemName - The name of the menu item to Show/hide
bShow - If true, the menu item is shown else hidden
Throws:
java.lang.Exception

ShowMenuItems

public void ShowMenuItems(java.lang.String strMenuName,
                          java.lang.String[] arrstrMenuItemName,
                          boolean bShow)
                   throws java.lang.Exception
Description copied from interface: IMenuToolBarCustomizer
Enable/Disable array of menuitem with given names present in the menu

Specified by:
ShowMenuItems in interface IMenuToolBarCustomizer
Parameters:
strMenuName - The name of the menu in which the menu items are present
arrstrMenuItemName - The array of names of the menu items to enable/disable
bShow - If true, the menu is shown else hidden
Throws:
java.lang.Exception

EnableMenu

public void EnableMenu(java.lang.String strName,
                       boolean bEnable)
                throws java.lang.Exception
Description copied from interface: IMenuToolBarCustomizer
Enable/disable menu with given name

Specified by:
EnableMenu in interface IMenuToolBarCustomizer
Parameters:
strName - The name of the menu to enable/disable
bEnable - If true, the menu is enabled else disabled
Throws:
java.lang.Exception

EnableMenuItem

public void EnableMenuItem(java.lang.String strMenuName,
                           java.lang.String strMenuItemName,
                           boolean bEnable)
                    throws java.lang.Exception
Description copied from interface: IMenuToolBarCustomizer
Enable/Disable menuitem with given name in the menu with given name

Specified by:
EnableMenuItem in interface IMenuToolBarCustomizer
Parameters:
strMenuName - The name of the menu in which the menu item is present
strMenuItemName - The name of the menu item to enable/disable
bEnable - If true, the menu is enabled else disabled
Throws:
java.lang.Exception

EnableMenuItems

public void EnableMenuItems(java.lang.String strMenuName,
                            java.lang.String[] arrstrMenuItemName,
                            boolean bEnable)
                     throws java.lang.Exception
Description copied from interface: IMenuToolBarCustomizer
Enable/Disable array of menuitem with given names present in the menu

Specified by:
EnableMenuItems in interface IMenuToolBarCustomizer
Parameters:
strMenuName - The name of the menu in which the menu items are present
arrstrMenuItemName - The array of names of the menu items to enable/disable
bEnable - If true, the menu is enabled else disabled
Throws:
java.lang.Exception

ShowToolBar

public void ShowToolBar(java.lang.String strName,
                        boolean bShow)
Description copied from interface: IMenuToolBarCustomizer
Show the toolbar with given title

Specified by:
ShowToolBar in interface IMenuToolBarCustomizer
Parameters:
strName - The name of the toolbar to return
bShow - If true, the toolbar is shown else hidden

ShowToolBarComponent

public void ShowToolBarComponent(java.lang.String strToolBarName,
                                 java.lang.String strCompName,
                                 boolean bShow)
                          throws java.lang.Exception
Description copied from interface: IMenuToolBarCustomizer
Show/hide a component in the toolbar, only if the toolbar is of type HWMToolBar

Specified by:
ShowToolBarComponent in interface IMenuToolBarCustomizer
strCompName - The name of the component to show/hide
bShow - If true, the comp is shown else hidden
Throws:
java.lang.Exception

ShowToolBarComponents

public void ShowToolBarComponents(java.lang.String strToolBarName,
                                  java.lang.String[] arrstrCompNames,
                                  boolean bShow)
                           throws java.lang.Exception
Description copied from interface: IMenuToolBarCustomizer
Show/hide components in the toolbar, only if the toolbar is of type HWMToolBar

Specified by:
ShowToolBarComponents in interface IMenuToolBarCustomizer
arrstrCompNames - The array of names of the components to show/hide
bShow - If true, the comp is shown else hidden
Throws:
java.lang.Exception

EnableToolBar

public void EnableToolBar(java.lang.String strName,
                          boolean bEnable)
Description copied from interface: IMenuToolBarCustomizer
Enable/disable the toolbar with given title

Specified by:
EnableToolBar in interface IMenuToolBarCustomizer
Parameters:
strName - The name of the toolbar to return
bEnable - If true, the toolbar is enabled else disabled

EnableToolBarComponent

public void EnableToolBarComponent(java.lang.String strToolBarName,
                                   java.lang.String strCompName,
                                   boolean bEnable)
                            throws java.lang.Exception
Description copied from interface: IMenuToolBarCustomizer
Enable/disable a component in the toolbar, only if the toolbar is of type HWMToolBar

Specified by:
EnableToolBarComponent in interface IMenuToolBarCustomizer
strCompName - The name of the component to enable/disable
bEnable - If true, the comp is enabled else disabled
Throws:
java.lang.Exception

EnableToolBarComponents

public void EnableToolBarComponents(java.lang.String strToolBarName,
                                    java.lang.String[] arrstrCompNames,
                                    boolean bEnable)
                             throws java.lang.Exception
Description copied from interface: IMenuToolBarCustomizer
Enable/disable components in the toolbar, only if the toolbar is of type HWMToolBar

Specified by:
EnableToolBarComponents in interface IMenuToolBarCustomizer
arrstrCompNames - The array of names of the components to enable/disable
bEnable - If true, the comp is enabled else disabled
Throws:
java.lang.Exception

GetToolBar

public AltairJToolBar GetToolBar(java.lang.String strName)
Get the toolbar with given title

Specified by:
GetToolBar in interface IMenuToolBarCustomizer
Parameters:
strName - The name of the toolbar to return
Returns:
JToolBar The toolbar with given name or null if it does not exist.

GetToolBarComponent

public java.awt.Component GetToolBarComponent(java.lang.String strToolBarName,
                                              java.lang.String strCompName)
                                       throws java.lang.Exception
Return a component in the toolbar with given name. This works only if the toolbar is of type HWMToolBar

Specified by:
GetToolBarComponent in interface IMenuToolBarCustomizer
Parameters:
strToolBbarName - The name of the toolbar
strCompName - The name of the component to return
Returns:
Component The component with the given name. May be null.
Throws:
java.lang.Exception

GetMenu

public javax.swing.JMenu GetMenu(java.lang.String strName)
                          throws java.lang.Exception
Get the menu with given title

Specified by:
GetMenu in interface IMenuToolBarCustomizer
Parameters:
strName - The name of the menubar to return
Returns:
JMenu The menu with given name or null if it does not exist.
Throws:
java.lang.Exception

GetMenuComponent

public java.awt.Component GetMenuComponent(java.lang.String strMenuName,
                                           java.lang.String strCompName)
Return a component in the menu with given name.

Specified by:
GetMenuComponent in interface IMenuToolBarCustomizer
Parameters:
strMenuName - The name of the menu
strCompName - The name of the component to return
Returns:
Component The component with the given name. May be null.