com.altair.hwm.toolkit.utils
Class HWMToolBarContainer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JToolBar
                  extended by com.altair.hwm.guilibrary.AltairJToolBar
                      extended by com.altair.hwm.toolkit.utils.HWMToolBarContainer
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.SwingConstants

public class HWMToolBarContainer
extends AltairJToolBar

Title: HWMToolBarContainer

Description: The toolbar that will contain sub-toolbars. THis will take care of wrapping the sub toolbars

Company: Altair Engineering, Inc.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JToolBar
javax.swing.JToolBar.Separator
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
static java.lang.String PROP_TOOLBAR_SHOW
          These statics represent the properties fired by the frame model
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
HWMToolBarContainer()
          Constructor
 
Method Summary
 void AddToolBar(AltairJToolBar jToolBar)
          Add a toolbar with given name
 void EnableComponent(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 EnableComponents(java.lang.String strToolBarName, java.lang.String[] arrstrCompNames, boolean bEnable)
          Enable/disable components in the toolbar, only if the toolbar is of type HWMToolBar
 void EnableToolBar(java.lang.String strName, boolean bEnable)
          Enable/disable the toolbar with given title
 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.
 boolean IsVisisble()
          Returns boolean to signify if any toolbar is visible
 void ShowComponent(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 ShowComponents(java.lang.String strToolBarName, java.lang.String[] arrstrCompNames, boolean bShow)
          Show/hide components in the toolbar, only if the toolbar is of type HWMToolBar
 void ShowToolBar(java.lang.String strName, boolean bShow)
          Show the toolbar with given title
 
Methods inherited from class javax.swing.JToolBar
add, addSeparator, addSeparator, getAccessibleContext, getComponentAtIndex, getComponentIndex, getMargin, getOrientation, getUI, getUIClassID, isBorderPainted, isFloatable, isRollover, setBorderPainted, setFloatable, setLayout, setMargin, setOrientation, setRollover, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROP_TOOLBAR_SHOW

public static final java.lang.String PROP_TOOLBAR_SHOW
These statics represent the properties fired by the frame model

See Also:
Constant Field Values
Constructor Detail

HWMToolBarContainer

public HWMToolBarContainer()
Constructor

Method Detail

AddToolBar

public void AddToolBar(AltairJToolBar jToolBar)
Add a toolbar with given name

Parameters:
jToolBar - The toolbar to be added

GetToolBar

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

Parameters:
strName - The name of the toolbar to return
Returns:
JToolBar The toolbar with given name or null if it does not exist.

EnableToolBar

public void EnableToolBar(java.lang.String strName,
                          boolean bEnable)
Enable/disable the toolbar with given title

Parameters:
strName - The name of the toolbar to return
bEnable - If true, the toolbar is enabled else disabled

ShowToolBar

public void ShowToolBar(java.lang.String strName,
                        boolean bShow)
Show the toolbar with given title

Parameters:
strName - The name of the toolbar to return
bShow - If true, the toolbar is shown else hidden

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

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

EnableComponent

public void EnableComponent(java.lang.String strToolBarName,
                            java.lang.String strCompName,
                            boolean bEnable)
                     throws java.lang.Exception
Enable/disable a component in the toolbar, only if the toolbar is of type HWMToolBar

Parameters:
strToolBbarName - The name of the toolbar
strCompName - The name of the component to enable/disable
bEnable - If true, the comp is enabled else disabled
Throws:
java.lang.Exception

EnableComponents

public void EnableComponents(java.lang.String strToolBarName,
                             java.lang.String[] arrstrCompNames,
                             boolean bEnable)
                      throws java.lang.Exception
Enable/disable components in the toolbar, only if the toolbar is of type HWMToolBar

Parameters:
strToolBbarName - The name of the toolbar
arrstrCompNames - The array of names of the components to enable/disable
bEnable - If true, the comp is enabled else disabled
Throws:
java.lang.Exception

ShowComponent

public void ShowComponent(java.lang.String strToolBarName,
                          java.lang.String strCompName,
                          boolean bShow)
                   throws java.lang.Exception
Show/hide a component in the toolbar, only if the toolbar is of type HWMToolBar

Parameters:
strToolBbarName - The name of the toolbar
strCompName - The name of the component to show/hide
bShow - If true, the comp is shown else hidden
Throws:
java.lang.Exception

ShowComponents

public void ShowComponents(java.lang.String strToolBarName,
                           java.lang.String[] arrstrCompNames,
                           boolean bShow)
                    throws java.lang.Exception
Show/hide components in the toolbar, only if the toolbar is of type HWMToolBar

Parameters:
strToolBbarName - The name of the toolbar
arrstrCompNames - The array of names of the components to show/hide
bShow - If true, the comp is shown else hidden
Throws:
java.lang.Exception

IsVisisble

public boolean IsVisisble()
Returns boolean to signify if any toolbar is visible

Returns:
boolean true if any toolbar is visible else false