Have any questions?

+44 (20) 3540 6226

hello@appshed.com

Screen (Class)

Screen Class

Defined in: app.js:5372

An object of this class is created for each screen in the app.

Constructor

Screen

()

Defined in app.js:5372

 

Methods

addIconRow

(
  • rowHTML
  • index
  • data
)
... Object

Defined in app.js:5405

Adds a row of Icons by inserting rowHTML into the table

Parameters:

  • rowHTML ...String

    If rowHTML is ommitted then the HTML is generated using data.

  • index ...String

    index specifies the row where to insert. Defaults to -1 (bottom of the table).

  • data ...String

    data contains the values to be used for the Icons.

Returns:

... Object:

Returns this.

addIconRows

(
  • numRows
  • data
)
... Object

Defined in app.js:5438

adds numRows rows of icons

Parameters:

  • numRows ...String

    Describe...

  • data ...String

    Uses data to populate the rows.

Returns:

... Object:

Returns this.

clearItemsCache

() ... Object

Defined in app.js:5597

...

Returns:

... Object:

Returns this.

clearItemsCache

() ... Object

Defined in app.js:5629

Clears the items hash (local cache)

Returns:

... Object:

Returns this.

countColumns

() ... Object

Defined in app.js:5651

...

Returns:

... Object:

Returns the number of columns (for Icon screen types)

disableScroll

() ... Object

Defined in app.js:5667

Disables the defult scrolling of the screen. All the content is at fixed position, and content below the fold remains hidden.

Returns:

... Object:

Returns this.

enableScroll

() ... Object

Defined in app.js:5691

Enables the defult scrolling of the screen.

Returns:

... Object:

Returns this

getBackgroundColor

() ... Object

Defined in app.js:5707

...

Returns:

... Object:

Returns the backgroundColor of this Screen

getData

(
  • Name...
)
... Object

Defined in app.js:5725

...

Parameters:

  • Name... ... String Number

    Describe...

Returns:

... Object:

Returns the Data object for this screen

getIconAbove

(
  • iconId
)
... Object

Defined in app.js:5744

...

Parameters:

  • iconId ...Number

    Describe...

Returns:

... Object:

returns the icon in the row above this icon

getIconBelow

(
  • iconId
)
... Object

Defined in app.js:5772

...

Parameters:

  • iconId ...Number

    Describe...

Returns:

... Object:

returns the icon in the row below this icon

getIconLeft

(
  • iconId
)
... Object

Defined in app.js:5801

...

Parameters:

  • iconId ...Number

    Describe...

Returns:

... Object:

returns the icon on the left of this icon

getIconRight

(
  • iconId
)
... Object

Defined in app.js:5828

...

Parameters:

  • iconId ...Number

    Describe...

Returns:

... Object:

returns the icon on the left of this icon

getIconRowHTML

(
  • idStart
  • cols
  • data
)
... Object

Defined in app.js:5857

...

Parameters:

  • idStart ...Number

    Describe...

  • cols ...String

    Describe...

  • data ...String

    Describe...

Returns:

... Object:

returns the HTML for a row of (cols) Icons

getIcons

(
  • Name...
)
... Object

Defined in app.js:5888

The object has rows and columns corresponding to the icons on the screen

Parameters:

  • Name... ... String Number

    Describe...

Returns:

... Object:

Returns an object of items. Returns null if not an Icons screen

getItems

(
  • clearCache
)
... Object

Defined in app.js:5933

...

Parameters:

  • clearCache ... String Number

    Describe...

Returns:

... Object:

return all the items on this screen as objects.

getLocalProperty

(
  • property
)
... Object

Defined in app.js:5969

...

Parameters:

  • property ...String

    Describe...

Returns:

... Object:

Returns the value for property from localStorage for this screen

getLocalStorage

(
  • Name...
)
... Object

Defined in app.js:5985

...

Parameters:

  • Name... ... String Number

    Describe...

Returns:

... Object:

Returns the object stored in localStorage for this screen.

getNextId

(
  • testId
)
... Object

Defined in app.js:6006

...

Parameters:

  • testId ...Number

    The first ID for a screen is the Screen.id + 1.

Returns:

... Object:

Returns the next valid (unused) id. Used when creating Items dynamically.

getTable

() ... Object

Defined in app.js:6047

...

Returns:

... Object:

Returns this.

getTitle

(
  • str
)
... Object

Defined in app.js:6062

...

Parameters:

  • str ...String

    Describe...

Returns:

... Object:

Returns the Title of the screen

getType

(
  • Name...
)
... Object

Defined in app.js:6078

...

Parameters:

  • Name... ... String Number

    Describe...

Returns:

... Object:

Returns the type of Screen (list,icon,gallery,map)

setBackgroundColor

(
  • color
)
... Object

Defined in app.js:6106

Sets the backgroundColor of this Screen to color

Parameters:

  • color ...String

    Describe...

Returns:

... Object:

Returns this.

setBackgroundImage

(
  • src
  • method
)
... Object

Defined in app.js:6131

Sets the backgroundImage of this Screen to src.

Parameters:

  • src ...String

    Special case: if src is omitted, sets the background to the original background image.

  • method ...String

    Optional method determines the layout. One of: fit | fill | stretch | center | tile. method defaults to fit

Returns:

... Object:

Returns this.

setLocalProperty

(
  • Name...
)
... Object

Defined in app.js:6184

Saves the value for property in localStorage for this screen

Parameters:

  • Name... ... String Number

    Describe...

Returns:

... Object:

Returns bool true if successful

setLocalStorage

(
  • obj
)
... Object

Defined in app.js:6203

Saves the obj to in localStorage for this screen

Parameters:

  • obj ... String Number

    obj must have a valid format. Required: ScreenId (int) Required: data (Array)

Returns:

... Object:

Returns bool true if the process was successful

setTitle

(
  • str
)
... Object

Defined in app.js:6242

Sets the Title of the screen to str.

Parameters:

  • str ...String

    Describe...

Returns:

... Object:

Returns the Screen object

setTitleBackgroundColor

(
  • color
)
... Object

Defined in app.js:6260

Sets the backgroundColor of this Screen Title to color

Parameters:

  • color ...String

    Describe...

Returns:

... Object:

Returns this.

setTitleColor

(
  • color
)
... Object

Defined in app.js:6281

Sets the backgroundColor of this Screen Title to color

Parameters:

  • color ...String

    Describe...

Returns:

... Object:

Returns this.

toString

() ... Object

Defined in app.js:6300

...

Returns:

... Object:

Returns a string represenation of the Screen

  • Wednesday, 24 January 2018

appshed name white text 250

Copyright © 2017 AppShed Limited