UI.WindowLocation
Index
Constructors
Properties
Methods
Constructors
constructor
Constructs new UI.WindowLocation instance with default position and size (fullscreen window).
Returns WindowLocation
Properties
forceScrollX
forceScrollY
globalScalesince: 2.3.1b115
Determines whether the interface needs to be resized based on its size or a global unit system should be used.
height
Window height.
scale
Window scale.
scrollX
Horizontal window scroll.
scrollY
Vertical window scroll.
width
Window width.
x
Window horizontal position.
y
Window vertical position.
zIndex
Window position on layers.
staticreadonlyPADDING_BOTTOM
Constant used to represent bottom padding.
staticreadonlyPADDING_LEFT
Constant used to represent left padding.
staticreadonlyPADDING_RIGHT
Constant used to represent right padding.
staticreadonlyPADDING_TOP
Constant used to represent top padding.
Methods
asScriptable
Returns IWindowLocation
Window location as a js object. Note that paddings are not included into the object.
copy
Creates a copy of current UI.WindowLocation object.
Returns WindowLocation
Newly created copy of the object.
getDrawingScale
Returns number
Unit size (in pixels) in the window's bounds.
getLayoutParams
Parameters
a1: number
a2: number
a3: number
Returns LayoutParams
getRect
Returns Rect
Window's rectangle in the android.graphics.Rect object.
getScale
Returns number
Unit size (in pixels) in the fullscreen context (
<screen width> / 1000).
getWindowHeight
Returns number
Window's height in units.
getWindowWidth
Returns 1000
Window's width in units (always 1000 by definition of the unit).
globalToWindow
Transforms dimension in fullscreen units to the dimension within window's bounds.
Parameters
val: number
value to be transformed
Returns number
removeScroll
Sets window's scroll size to the windows size to remove scroll.
Returns void
set
Sets window location parameters.
Parameters
x: number
X coordinate of the window
y: number
Y coordinate of the window
width: number
width of the window
height: number
height of the window
Returns void
setPadding
Sets padding of the window.
Parameters
padding: 0 | 1 | 2 | 3
value: number
value of the padding to be assigned to appropriate window bound
Returns void
setScroll
Sets scrollable window size. Should be greater then window width/height for the changes to take effect.
Parameters
x: number
scrollable window size along the X axis
y: number
scrollable window size along the Y axis
Returns void
setSize
Sets the size of the window.
Parameters
x: number
window's width
y: number
window's height
Returns void
setZ
Sets window's Z index. Z index determines how the window will be displayed when several windows are open.
Parameters
z: number
window Z index
Returns void
setupAndShowPopupWindow
Parameters
win: PopupWindow
Returns void
showPopupWindow
Parameters
win: PopupWindow
Returns void
updatePopupWindow
Parameters
win: PopupWindow
Returns void
windowToGlobal
Transforms dimension within window's bounds to the dimension in fullscreen units.
Parameters
val: number
value to be transformed
Returns number
Class representing window's location. All coordinates are defined in units (given screen's width is 1000 units).