CAPH.WUI.WIDGET.UICONTEXT
UIContext represents a group of containers which all widgets should be rendered on them, each uicontext has its own size and position on the screen. If not set the size and position, the size is as same as the window's screen size, and in the center of screen. One uicontext may have many widgets in its container, but one widget has only one uicontext.
Constructor
UIContext | ||
Description | ||
The constructor of UIContext , in order to create UIContext object. | ||
Emulator Support | Y | |
SDK Constraint | None | |
Example | ||
var UIContext = caph.wui.widget.UIContext; var uiContext = new UIContext(); |
Methods
show | ||
Description | ||
Repaint specific or all widgets on the UIContext. | ||
Parameters | ■Void | |
Return | ■Void | |
Emulator Support | Y | |
SDK Constraint | none | |
Example | ||
var UIContext = caph.wui.widget.UIContext; var Label = caph.wui.widget.Label; var uiContext = new UIContext(); var label = new Label(); label.render(UIContext); uiContext.show(); |
setRTL | ||
Description | ||
Set the RTL(Right-To-Left) flag. The true value indicates that all widgets which come with this UIContext should be sorted by the RTL(Right-To-Left) order. | ||
Parameters | ■flag - Boolean * true : all widgets which come with this UIContext should be sorted by the RTL(Right-To-Left) order * false : LTR. false is the default. | |
Return | ■void | |
Emulator Support | Y | |
SDK Constraint | Support from version 5.1 | |
Example | ||
var UIContext = window.caph.wui.widget.UIContext; var uiContext =new UIContext(); uiContext.setRTL(true); // Now this UIContext's i18n sort order is RTL . |
getRTL | ||
Description | ||
Get the RTL(Right-To-Left) flag. The true value indicates that all widgets which come with this UIContext should be sorted by the RTL(Right-To-Left) order. | ||
Parameters | ■void | |
Return | ■Boolean - true : all widgets which come with this UIContext should be sorted by the RTL(Right-To-Left) order - false : be sorted by LTR order | |
Emulator Support | Y | |
SDK Constraint | Support from version 5.1 | |
Example | ||
var UIContext = window.caph.wui.widget.UIContext; var uiContext =new UIContext(); uiContext.setRTL(true); // Now this UIContext's i18n sort order is RTL . var isRTL = uiContext.getRTL(); // Returns true. |
getBasePage | ||
Description | ||
UI context 의 basepage를 반환 합니다. | ||
Parameters | ■none | |
Return | ■object
- Instance of basePage | |
Emulator Support | Y | |
SDK Constraint | Support from version 5.1 | |
Example | ||
var UIContext = caph.wui.widget.UIContext;
var Label = caph.wui.widget.Label; var uiContext = new UIContext(); var label = new Label(); label.render(UIContext); var basePage = uiContext.getBasePage(); |