Constructor
new module:caplin/menu/presenter/node/Menu(model)
Constructs a new instance of
PresentationNode
.
Parameters:
Name | Type | Description |
---|---|---|
model |
module:caplin/menu/model/Item | The model used for the by the control to render the menu. |
Methods
-
addGenerator(generator, type)
-
Allows the user to add custom generators into the
caplin.menu.Control
. Seemodule:caplin/menu/Control#addGenerator
for more details.Parameters:
Name Type Description generator
module:caplin/menu/Generator Generator class which will render elements of the given type. type
String String representation of the item type the control registered will be in charge of rendering. -
getGenerators()
-
Returns a map with the types as the keys and the generator instances as the values.
-
getMenuModel()
-
Returns the model.
-
hide()
-
Informs the control to hide the menu.
-
isVisible()
-
Returns the value of the visible property.
-
setMenuModel()
-
Sets the model.
-
show()
-
Informs the control to show the menu.