org.ejtools.adwt.service
Class MenuBarServiceProvider

java.lang.Object
  |
  +--java.beans.beancontext.BeanContextChildSupport
        |
        +--java.beans.beancontext.BeanContextSupport
              |
              +--java.beans.beancontext.BeanContextServicesSupport
                    |
                    +--org.ejtools.beans.beancontext.CustomBeanContextServicesSupport
                          |
                          +--org.ejtools.beans.beancontext.CustomBeanContextServiceProvider
                                |
                                +--org.ejtools.adwt.service.MenuBarServiceProvider
All Implemented Interfaces:
java.beans.beancontext.BeanContext, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextContainerProxy, java.beans.beancontext.BeanContextServiceProvider, java.beans.beancontext.BeanContextServiceRevokedListener, java.beans.beancontext.BeanContextServices, java.beans.beancontext.BeanContextServicesListener, java.util.Collection, java.beans.DesignMode, java.util.EventListener, MenuBarService, java.beans.PropertyChangeListener, java.io.Serializable, org.ejtools.util.state.Storable, ToolBarService, java.beans.VetoableChangeListener, java.beans.Visibility

public class MenuBarServiceProvider
extends org.ejtools.beans.beancontext.CustomBeanContextServiceProvider
implements MenuBarService

Description of the Class

Version:
$Revision: 1.5 $
Author:
Laurent Etiemble
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.ejtools.adwt.service.MenuBarService
MenuBarService.Listener
 
Field Summary
protected  java.util.Vector listeners
          Description of the Field
protected  javax.swing.JMenuBar menuBar
          Description of the Field
protected  java.util.Vector requestors
          Description of the Field
protected  MenuBarService service
          Description of the Field
 
Fields inherited from class java.beans.beancontext.BeanContextServicesSupport
bcsListeners, proxy, serializable, services
 
Fields inherited from class java.beans.beancontext.BeanContextSupport
bcmListeners, children, designTime, locale, okToUseGui
 
Fields inherited from class java.beans.beancontext.BeanContextChildSupport
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport
 
Fields inherited from interface org.ejtools.adwt.service.MenuBarService
NO_LAYOUT, SEPARATOR_AFTER, SEPARATOR_BEFORE
 
Fields inherited from interface java.beans.beancontext.BeanContext
globalHierarchyLock
 
Fields inherited from interface java.beans.DesignMode
PROPERTYNAME
 
Constructor Summary
MenuBarServiceProvider()
          Constructor for the MenuBarServiceProvider object
 
Method Summary
protected  javax.swing.JMenu addMenu(java.util.ResourceBundle res, java.lang.String menuName)
          Adds a feature to the Menu attribute of the MenuBarServiceProvider object
 void addMenuBarListener(MenuBarService.Listener mbsl)
          Adds a feature to the MenuBarListener attribute of the MenuBarServiceProvider object
protected  void addMenuItem(CommandAction action, javax.swing.JMenu menu)
          Adds a feature to the MenuItem attribute of the MenuBarServiceProvider object
protected  javax.swing.JMenu findMenu(java.lang.String menuName)
          Description of the Method
 java.awt.Container getContainer()
          Gets the container attribute of the MenuBarServiceProvider object
 java.util.Iterator getCurrentServiceSelectors(java.beans.beancontext.BeanContextServices bcs, java.lang.Class serviceClass)
          Gets the currentServiceSelectors attribute of the ApplicationServiceProvider object
 java.lang.Object getService(java.beans.beancontext.BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector)
          Gets the service attribute of the ApplicationServiceProvider object
protected  java.lang.Class[] getServiceClass()
           
 void register(CommandAction action)
          Description of the Method
 void releaseService(java.beans.beancontext.BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service)
          Description of the Method
 void removeMenuBarListener(MenuBarService.Listener mbsl)
          Description of the Method
protected  void removeMenuItem(CommandAction action, javax.swing.JMenu menu)
          Description of the Method
 void unregister(CommandAction action)
          Description of the Method
protected  void update()
          Description of the Method
 
Methods inherited from class org.ejtools.beans.beancontext.CustomBeanContextServiceProvider
initializeBeanContextResources, releaseBeanContextResources
 
Methods inherited from class org.ejtools.beans.beancontext.CustomBeanContextServicesSupport
accept, clear, getService
 
Methods inherited from class java.beans.beancontext.BeanContextServicesSupport
addBeanContextServicesListener, addService, addService, bcsPreDeserializationHook, bcsPreSerializationHook, childJustRemovedHook, createBCSChild, createBCSSServiceProvider, fireServiceAdded, fireServiceAdded, fireServiceRevoked, fireServiceRevoked, getBeanContextServicesPeer, getChildBeanContextServicesListener, getCurrentServiceClasses, getCurrentServiceSelectors, hasService, initialize, releaseService, removeBeanContextServicesListener, revokeService, serviceAvailable, serviceRevoked
 
Methods inherited from class java.beans.beancontext.BeanContextSupport
add, addAll, addBeanContextMembershipListener, avoidingGui, bcsChildren, childDeserializedHook, childJustAddedHook, classEquals, contains, containsAll, containsKey, copyChildren, deserialize, dontUseGui, fireChildrenAdded, fireChildrenRemoved, getBeanContextPeer, getChildBeanContextChild, getChildBeanContextMembershipListener, getChildPropertyChangeListener, getChildSerializable, getChildVetoableChangeListener, getChildVisibility, getLocale, getResource, getResourceAsStream, instantiateChild, isDesignTime, isEmpty, isSerializing, iterator, needsGui, okToUseGui, propertyChange, readChildren, remove, remove, removeAll, removeBeanContextMembershipListener, retainAll, serialize, setDesignTime, setLocale, size, toArray, toArray, validatePendingAdd, validatePendingRemove, vetoableChange, writeChildren
 
Methods inherited from class java.beans.beancontext.BeanContextChildSupport
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, isDelegated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, validatePendingSetBeanContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.beans.beancontext.BeanContext
addBeanContextMembershipListener, getResource, getResourceAsStream, instantiateChild, removeBeanContextMembershipListener
 
Methods inherited from interface java.beans.beancontext.BeanContextChild
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext
 
Methods inherited from interface java.util.Collection
add, addAll, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.beans.DesignMode
isDesignTime, setDesignTime
 
Methods inherited from interface java.beans.Visibility
avoidingGui, dontUseGui, needsGui, okToUseGui
 

Field Detail

listeners

protected java.util.Vector listeners
Description of the Field


menuBar

protected javax.swing.JMenuBar menuBar
Description of the Field


requestors

protected java.util.Vector requestors
Description of the Field


service

protected MenuBarService service
Description of the Field

Constructor Detail

MenuBarServiceProvider

public MenuBarServiceProvider()
Constructor for the MenuBarServiceProvider object

Method Detail

addMenuBarListener

public void addMenuBarListener(MenuBarService.Listener mbsl)
Adds a feature to the MenuBarListener attribute of the MenuBarServiceProvider object

Specified by:
addMenuBarListener in interface MenuBarService
Parameters:
mbsl - The feature to be added to the MenuBarListener attribute

getContainer

public java.awt.Container getContainer()
Gets the container attribute of the MenuBarServiceProvider object

Specified by:
getContainer in interface java.beans.beancontext.BeanContextContainerProxy
Returns:
The container value

getCurrentServiceSelectors

public java.util.Iterator getCurrentServiceSelectors(java.beans.beancontext.BeanContextServices bcs,
                                                     java.lang.Class serviceClass)
Gets the currentServiceSelectors attribute of the ApplicationServiceProvider object

Specified by:
getCurrentServiceSelectors in interface java.beans.beancontext.BeanContextServiceProvider
Specified by:
getCurrentServiceSelectors in class org.ejtools.beans.beancontext.CustomBeanContextServiceProvider
Parameters:
bcs - Description of Parameter
serviceClass - Description of Parameter
Returns:
The currentServiceSelectors value

getService

public java.lang.Object getService(java.beans.beancontext.BeanContextServices bcs,
                                   java.lang.Object requestor,
                                   java.lang.Class serviceClass,
                                   java.lang.Object serviceSelector)
Gets the service attribute of the ApplicationServiceProvider object

Specified by:
getService in interface java.beans.beancontext.BeanContextServiceProvider
Specified by:
getService in class org.ejtools.beans.beancontext.CustomBeanContextServiceProvider
Parameters:
bcs - Description of Parameter
requestor - Description of Parameter
serviceClass - Description of Parameter
serviceSelector - Description of Parameter
Returns:
The service value

register

public void register(CommandAction action)
Description of the Method

Specified by:
register in interface ToolBarService
Parameters:
action - Description of Parameter

releaseService

public void releaseService(java.beans.beancontext.BeanContextServices bcs,
                           java.lang.Object requestor,
                           java.lang.Object service)
Description of the Method

Specified by:
releaseService in interface java.beans.beancontext.BeanContextServiceProvider
Specified by:
releaseService in class org.ejtools.beans.beancontext.CustomBeanContextServiceProvider
Parameters:
bcs - Description of Parameter
requestor - Description of Parameter
service - Description of Parameter

removeMenuBarListener

public void removeMenuBarListener(MenuBarService.Listener mbsl)
Description of the Method

Specified by:
removeMenuBarListener in interface MenuBarService
Parameters:
mbsl - Description of Parameter

unregister

public void unregister(CommandAction action)
Description of the Method

Specified by:
unregister in interface ToolBarService
Parameters:
action - Description of Parameter

addMenu

protected javax.swing.JMenu addMenu(java.util.ResourceBundle res,
                                    java.lang.String menuName)
Adds a feature to the Menu attribute of the MenuBarServiceProvider object

Parameters:
menuName - The feature to be added to the Menu attribute
res - The feature to be added to the Menu attribute
Returns:
Description of the Returned Value

addMenuItem

protected void addMenuItem(CommandAction action,
                           javax.swing.JMenu menu)
Adds a feature to the MenuItem attribute of the MenuBarServiceProvider object

Parameters:
action - The feature to be added to the MenuItem attribute
menu - The feature to be added to the MenuItem attribute

findMenu

protected javax.swing.JMenu findMenu(java.lang.String menuName)
Description of the Method

Parameters:
menuName - Description of Parameter
Returns:
Description of the Returned Value

getServiceClass

protected java.lang.Class[] getServiceClass()
Specified by:
getServiceClass in class org.ejtools.beans.beancontext.CustomBeanContextServiceProvider
Returns:
The serviceClass value

removeMenuItem

protected void removeMenuItem(CommandAction action,
                              javax.swing.JMenu menu)
Description of the Method

Parameters:
action - Description of Parameter
menu - Description of Parameter

update

protected void update()
Description of the Method



Copyright © 2002-2003 EJTools Org.. All Rights Reserved.