Class BasicRenderControlInventory.Inventory

java.lang.Object
com.levigo.jadice.web.client.settings.BasicRenderControlInventory.Inventory
All Implemented Interfaces:
RenderControlInventory
Enclosing class:
BasicRenderControlInventory

public static class BasicRenderControlInventory.Inventory extends Object implements RenderControlInventory
  • Constructor Details

    • Inventory

      public Inventory()
      Default Constructor.
    • Inventory

      public Inventory(com.levigo.jadice.web.client.util.internal.Provider<DefaultRenderControls> renderControlsFactory)
      Constructs an Inventory by performing the following actions:
      Parameters:
      renderControlsFactory - the factory used for creating new RenderControls instances
  • Method Details

    • getDocumentRenderControls

      public RenderControls getDocumentRenderControls()
      Returns the document specific render controls.
      Specified by:
      getDocumentRenderControls in interface RenderControlInventory
      Returns:
      the document specific render controls.
    • getPageRenderControl

      public RenderControls getPageRenderControl(Page page)
      Returns the render controls for the given page.

      If the given page does not have its own render controls, the document based render controls will be returned.

      Specified by:
      getPageRenderControl in interface RenderControlInventory
      Parameters:
      page - the page for which the page render control lookup is demanded
      Returns:
      the RenderControls
    • getPageRenderControl

      public RenderControls getPageRenderControl(Page page, boolean create)
      Returns the render controls for the given page.

      If the given page does not have its own render controls and the second parameter is true a new instance is created and returned.

      If the given page does not have its own render controls and the second parameter is false the document render controls instance is returned.

      Specified by:
      getPageRenderControl in interface RenderControlInventory
      Parameters:
      page - the page for which the page render control lookup is demanded
      create - controls whether to return a new RenderControls instance or the document specific instance
      Returns:
      the corresponding RenderControls
    • addInventorySettingsHandler

      public void addInventorySettingsHandler(InventoryRenderSettingsEvent.Handler handler)
      Adds a listener to this BasicRenderControlInventory.

      The listener will be notified about modifications of the managed render controls.

      Parameters:
      handler - the listener to be added
    • removeInventoryRenderSettingsHandler

      public void removeInventoryRenderSettingsHandler(InventoryRenderSettingsEvent.Handler handler)
      Removes the given listener from this BasicRenderControlInventory.
      Parameters:
      handler - the listener to be removed
    • clear

      public void clear()
      Description copied from interface: RenderControlInventory
      Clear/remove references on Pages to ensure all references on Pages of a closed document are removed.
      Specified by:
      clear in interface RenderControlInventory