Class SAGE2DisplayUI
Class defined in:public/src/SAGE2_DisplayUI.js:22
User interface drawn using Canvas2D
addAppWindow
( data
)
public/src/SAGE2_DisplayUI.js:377
Add an application with its icon and draw
Parameters:-
data
<Object>contains .icon image of the application
addPartitionBorder
( data
)
public/src/SAGE2_DisplayUI.js:497
Add ui element showing partition
Parameters:-
data
<Object>- contains partition information
deleteApp
( id
)
public/src/SAGE2_DisplayUI.js:625
Delete an application and draw
Parameters:-
id
<String>application id
deletePartition
( id
)
public/src/SAGE2_DisplayUI.js:639
Delete a partition and draw
Parameters:-
id
<String>partition id
drawRoundedRect
( ctx, x, y, width, height, radius, fillFlag, strokeFlag
)
public/src/SAGE2_DisplayUI.js:703
Draw a rounded rectangle
Parameters:generateMediaStreamIcon
( title, color
)
public/src/SAGE2_DisplayUI.js:300
Generate an image icon for media stream apps
Parameters:highlightApplication
( x, y
)
public/src/SAGE2_DisplayUI.js:827
Highlight the top most application under the cursor
Parameters:keyDown
( keyCode
)
public/src/SAGE2_DisplayUI.js:913
Handler for key down
Parameters:-
keyCode
<Number>character code
keyPress
( charCode
)
public/src/SAGE2_DisplayUI.js:950
Handler for key press
Parameters:-
charCode
<Number>character code
keyUp
( keyCode
)
public/src/SAGE2_DisplayUI.js:936
Handler for key up
Parameters:-
keyCode
<Number>character code
pointerPress
( btn
)
public/src/SAGE2_DisplayUI.js:791
Handler for mouse up
Parameters:-
btn
<String>mouse button name (left, right, middle)
pointerRelease
( btn
)
public/src/SAGE2_DisplayUI.js:803
Handler for mouse up
Parameters:-
btn
<String>mouse button name (left, right, middle)
pointerScroll
( value
)
public/src/SAGE2_DisplayUI.js:882
Handler for scrolling
Parameters:-
value
<Number>scroll amount
resize
( ratio
)
public/src/SAGE2_DisplayUI.js:166
Callback when the browser is resize, adjust the position of UI elements
Parameters:-
ratio
<Number>scale factor
setItemPosition
( position_data
)
public/src/SAGE2_DisplayUI.js:557
Move an application and redraw
Parameters:-
position_data
<Object>oject with .elemId .elemLeft .elemTop .elemWidth .elemHeight fields
setItemPositionAndSize
( position_data
)
public/src/SAGE2_DisplayUI.js:573
Move and scale an application and redraw
Parameters:-
position_data
<Object>oject with .elemId .elemLeft .elemTop .elemWidth .elemHeight fields
setPartitionPositionAndSize
( data
)
public/src/SAGE2_DisplayUI.js:600
Move and scale a partition and redraw
Parameters:-
data
<Object>oject with .id .left .top .width .height fields
setUploadPercent
( percent
)
public/src/SAGE2_DisplayUI.js:367
Update the upload progress bar
Parameters:-
percent
<Number>progress [0.0 - 1.0]
textLineCount
( ctx, text, maxWidth
)
public/src/SAGE2_DisplayUI.js:736
Count the number of lines for a given maximum width
Parameters:updateItemOrder
( order
)
public/src/SAGE2_DisplayUI.js:541
Reorder the application list and draw
Parameters:-
order
<Object>contains the application ids and zIndex
wrapText
( ctx, text, x, y, maxWidth, lineHeight
)
public/src/SAGE2_DisplayUI.js:762
Draw some text, and wrap it over multiple lines if necessary
Parameters: