UI.TabbedWindow
Implements
Index
Constructors
Properties
Methods
- close
- frame
- getContainer
- getContent
- getDefaultTab
- getElements
- getGlobalTabSize
- getInnerWindowHeight
- getInnerWindowWidth
- getStyle
- getStyleSafe
- getWindowForTab
- getWindowTabSize
- invalidateDrawing
- invalidateElements
- isDynamic
- isInventoryNeeded
- isOpened
- onBackPressed
- onTabSelected
- open
- setBlockingBackground
- setCloseOnBackPressed
- setContainer
- setDebugEnabled
- setDefaultTab
- setEventListener
- setFakeTab
- setLocation
- setStyle
- setTab
- setTabEventListener
Constructors
constructor
Constructs new UI.TabbedWindow with specified location.
Parameters
loc: WindowLocation
location to be used for the tabbed window
Returns TabbedWindow
Properties
closeOnBackPressed
currentTab
Methods
close
Closes window without container. Use only if the window was opened without container.
Returns void
frame
Called up to 66 times a second to update window's content.
Parameters
time: number
current time in milliseconds
Returns void
getContainer
Returns UiAbstractContainer
New UI.Container that was used to open this window or null, if the window wasn't opened in container.
getContent
Returns TabbedWindowContent
Window's content object (usually specified in the window's constructor).
getDefaultTab
Returns number
Current default tab index. If no default tab was specified via UI.TabbedWindow.setDefaultTab, the first tab added becomes default.
getElements
getGlobalTabSize
Returns number
Tab selector window width in global units.
getInnerWindowHeight
Returns number
Tab content window height in units.
getInnerWindowWidth
Returns number
Tab content window width in units.
getStyle
Returns Style
Object containing current style of the window.
getStyleSafe
- since: 3.1.0b126 (availabled for all windows, before it appears to be only in
Returns Style
getWindowForTab
getWindowTabSize
Returns number
Tab selector window width in units.
invalidateDrawing
Forces ui drawables of the window to refresh.
Parameters
onCurrentThread: boolean
if
true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you passtrueas the parameter
Returns void
invalidateElements
Forces ui elements of the window to refresh.
Parameters
onCurrentThread: boolean
if
true, the drawables will be refreshed immediately, otherwise refresh event will be posted; ensure you are in the UI thread if you passtrueas the parameter
Returns void
isDynamic
Returns boolean
trueif the window can change it's contents position.
isInventoryNeeded
Returns boolean
trueif the window has an inventory that should be updated.
isOpened
Returns boolean
trueif the window is opened,falseotherwise.
onBackPressed
Returns boolean
Whether the window can be closed on pressing back navigation button.
onTabSelected
Parameters
index: number
Returns void
open
Opens window without container.
Returns void
setBlockingBackground
Specifies whether the window should darken and block background.
Parameters
enabled: boolean
pass
trueif you want the window to block background
Returns void
setCloseOnBackPressed
Parameters
cobp: boolean
Returns void
setContainer
Sets container for the current window. Be careful when calling it manually. You should prefer opening the window via UI.Container.openAs call.
Parameters
container: UiAbstractContainer
UI.Container to be associated with current window or null to associate no container with current window
Returns void
setDebugEnabled
Turns debug mode for the window on and off.
Parameters
debug: boolean
if
true, additional debug information will be drawn on the window canvas
Returns void
setDefaultTab
Sets default tab index.
Parameters
tab: number
index of the tab to be opened by default
Returns void
setEventListener
Sets listener to be notified about window opening/closing events.
Parameters
listener: WindowEventListener
Returns void
setFakeTab
Creates fake tab with no content.
Parameters
index: number
index of the tab, see UI.TabbedWindow.setTab for details
tabOverlay: ElementSet
content of the tab selector
Returns void
setLocation
Sets window location (bounds) to draw window within.
Parameters
location: WindowLocation
location to be used for the tabbed window
Returns void
setStyle
setTab
Sets content of the tab.
More about capabilitiesThe location of the tabs is as follows:
0 61 72 83 94 105 11Parameters
index: number
index of the tab; there are 12 tabs available, from 0 to 11
tabOverlay: ElementSet
content of the tab selector
tabContent: WindowContent
content of the window to be created for the tab
isAlwaysSelected: boolean
if
true, tab is always displayed as selected; default value isfalse
Returns void
setTabEventListener
Sets listener to be notified about tab with specified index opening/closing events.
Parameters
index: number
tab index
listener: WindowEventListener
object to be notified about the events
Returns void
Class used to create windows with multiple tabs.