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
ConstructorsConstructorDescriptionDefault 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 specificDefaultRenderControlsinstance Adds a listener to the document specificDefaultRenderControlsinstance -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a listener to thisBasicRenderControlInventory.voidclear()Clear/remove references onPages 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.voidRemoves 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
DefaultRenderControlsinstance - Adds a listener to the document specific
DefaultRenderControlsinstance
- Parameters:
renderControlsFactory- the factory used for creating newRenderControlsinstances
-
-
Method Details
-
getDocumentRenderControls
Returns the document specific render controls.- Specified by:
getDocumentRenderControlsin 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:
getPageRenderControlin 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:
getPageRenderControlin interfaceRenderControlInventory- Parameters:
page- the page for which the page render control lookup is demandedcreate- controls whether to return a newRenderControlsinstance 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:RenderControlInventoryClear/remove references onPages to ensure all references on Pages of a closed document are removed.- Specified by:
clearin interfaceRenderControlInventory
-