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 Summary
ConstructorDescriptionDefault Constructor.Inventory
(com.levigo.jadice.web.client.util.internal.Provider<DefaultRenderControls> renderControlsFactory) Constructs an Inventory by performing the following actions: Sets the given factory Creates the document specificDefaultRenderControls
instance Adds a listener to the document specificDefaultRenderControls
instance -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a listener to thisBasicRenderControlInventory
.void
clear()
Clear/remove references onPage
s to ensure all references on Pages of a closed document are removed.Returns the document specific render controls.getPageRenderControl
(Page page) Returns the render controls for the given page.getPageRenderControl
(Page page, boolean create) Returns the render controls for the given page.void
Removes the given listener from thisBasicRenderControlInventory
.
-
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:- Sets the given factory
- Creates the document specific
DefaultRenderControls
instance - Adds a listener to the document specific
DefaultRenderControls
instance
- Parameters:
renderControlsFactory
- the factory used for creating newRenderControls
instances
-
-
Method Details
-
getDocumentRenderControls
Returns the document specific render controls.- Specified by:
getDocumentRenderControls
in interfaceRenderControlInventory
- Returns:
- the document specific render controls.
-
getPageRenderControl
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 interfaceRenderControlInventory
- Parameters:
page
- the page for which the page render control lookup is demanded- Returns:
- the
RenderControls
-
getPageRenderControl
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 interfaceRenderControlInventory
- Parameters:
page
- the page for which the page render control lookup is demandedcreate
- controls whether to return a newRenderControls
instance or the document specific instance- Returns:
- the corresponding
RenderControls
-
addInventorySettingsHandler
Adds a listener to thisBasicRenderControlInventory
.The listener will be notified about modifications of the managed render controls.
- Parameters:
handler
- the listener to be added
-
removeInventoryRenderSettingsHandler
Removes the given listener from thisBasicRenderControlInventory
.- Parameters:
handler
- the listener to be removed
-
clear
public void clear()Description copied from interface:RenderControlInventory
Clear/remove references onPage
s to ensure all references on Pages of a closed document are removed.- Specified by:
clear
in interfaceRenderControlInventory
-