Class DefaultMenuToolPrototypeProvisionStrategy

  • All Implemented Interfaces:
    java.io.Serializable, java.util.concurrent.locks.ReadWriteLock

    public class DefaultMenuToolPrototypeProvisionStrategy
    extends AbstractMenuToolCompositeComponentPrototypeProvisionStrategy
    The default strategy for keeping track of prototype providers and working with provisioned prototypes, merging them into a menu and/or a toolbar. When the prototype providers change provided prototypes, those provided prototypes are processed. This version monitors the parent composite component children and automatically uses top-level prototype providers added to or removed from the hierarchy. Prototype provisions are not processed initially; this strategy should be initialized after construction by calling AbstractPrototypeProvisionStrategy.processPrototypeProvisions(). This class is thread safe based upon its exposed read and write locks.
    Author:
    Garret Wilson
    See Also:
    Serialized Form
    • Constructor Detail

      • DefaultMenuToolPrototypeProvisionStrategy

        public DefaultMenuToolPrototypeProvisionStrategy​(CompositeComponent parentComponent,
                                                         Menu menu,
                                                         Toolbar toolbar,
                                                         PrototypeProvider... defaultPrototypeProviders)
        Parent component, menu, toolbar, and prototype providers constructor.
        Parameters:
        parentComponent - The composite component the top-level prototype provider children of which will be monitored.
        menu - The menu being managed, or null if no menu is being managed.
        toolbar - The toolbar being managed, or null if no toolbar is being managed.
        defaultPrototypeProviders - The default prototype providers that will provide prototypes for processing, outside the children of the composite component parent.
        Throws:
        java.lang.NullPointerException - if the given parent component, prototype providers, and/or one or more prototype provider is null.