Attributes | Name and Description |
---|---|
|
caplin.menu.control.Control(caplin.menu.model.Item any, HTMLElement containerElement)
|
Attributes | Name and Description |
---|---|
|
void
addControl(caplin.menu.control.DefaultItemControl control, String type)
This method is used as an extension point to the MenuControl. |
|
void
append(caplin.menu.model.Item any, HTMLElement containerElement)
Appends the provided model into a container element. |
|
void
render()
Renders any {@caplin.menu.model.Item} onto the screen. |
►
caplin.menu.control.Control(caplin.menu.model.Item any, HTMLElement containerElement)
caplin.menu.model.Item | any | instance of caplin.menu.model.Item. |
HTMLElement | containerElement | Container element. |
►
void
addControl(caplin.menu.control.DefaultItemControl control, String type)
This method is used as an extension point to the MenuControl. It will allow you to define your own controls to render custom items. They will be linked by the item's type returned by caplin.menu.model.Item#getType. This controls will need to extend caplin.menu.control.DefaultItemControl.
caplin.menu.control.DefaultItemControl | control | Control class which will render elements of the given type. |
String | type | String representation of the item type the control registered will be in charge of rendering. |
►
void
append(caplin.menu.model.Item any, HTMLElement containerElement)
Appends the provided model into a container element.
caplin.menu.model.Item | any | instance of caplin.menu.model.Item. |
HTMLElement | containerElement | Container element in which the menu will be rendered to. |
►
void
render()
Renders any {@caplin.menu.model.Item} onto the screen.