API Docs for:
Show:

Item Class

Defined in: app.js:4424

An object of this class is created for each item on the screen.

Constructor

Item

()

Defined in app.js:4424

Methods

addAction

(
  • handler
)
... Object

Defined in app.js:4495

Add an Action for this Item

Parameters:

  • handler ...String

    handler is a function name or adhoc function. Items can contain multiple actions. The AppBuilder defines only the default action.

Returns:

... Object:

Returns this.

addBefore

() ... Object

Defined in app.js:4516

...

Returns:

... Object:

Returns this.

callActions

(
  • Name...
)
... Object

Defined in app.js:4526

calls all actions for this Item

Parameters:

  • Name... ... String Number

    Describe... The default Action is set in AppBuilder. Additional Actions can be set using app.addAction(). Actions can be identified using the itemId, DOM id, and all Classnames.

Returns:

... Object:

Returns this.

callEachAction

(
  • arr
)
... Object

Defined in app.js:4570

Loops through arr and calls the action for each element

Parameters:

  • arr ...String

    Describe...

Returns:

... Object:

Returns this.

containsClass

(
  • className
)
... Object

Defined in app.js:4587

...

Parameters:

  • className ...String

    Describe...

Returns:

... Object:

Returns true if this Item contains the custom class className

getBackgroundColor

() ... Object

Defined in app.js:4603

...

Returns:

... Object:

Returns the backgroundColor of this Item.

getDefaultValue

() ... Object

Defined in app.js:4618

...

Returns:

... Object:

Return the Default Value for this item.

getIconAbove

() ... Object

Defined in app.js:4640

...

Returns:

... Object:

returns the icon in the row above this icon

getIconBelow

() ... Object

Defined in app.js:4654

...

Returns:

... Object:

returns the icon in the row above this icon

getIconLeft

() ... Object

Defined in app.js:4667

...

Returns:

... Object:

returns the icon on the left of this icon

getIconRight

() ... Object

Defined in app.js:4680

...

Returns:

... Object:

returns the icon on the right of this icon

getImage

() ... Object

Defined in app.js:4693

...

Returns:

... Object:

returns the URL of the image for this item

getPosition This is only relevant when the item has been placed using `this.place()`;

() ... Object

Defined in app.js:4706

...

Returns:

... Object:

Returns an object with the x,y coordinates of the item

getSubTitle

(
  • str
)
... Object

Defined in app.js:4725

...

Parameters:

  • str ...String

    Describe...

Returns:

... Object:

Returns the Subtitle of the item

getText

(
  • str
)
... Object

Defined in app.js:4746

...

Parameters:

  • str ...String

    Describe...

Returns:

... Object:

Returns the Text of the item

getTitle

(
  • str
)
... Object

Defined in app.js:4771

...

Parameters:

  • str ...String

    Describe...

Returns:

... Object:

Returns the Title of the item

getVariable

() ... Object

Defined in app.js:4790

...

Returns:

... Object:

Returns app.getVariable() if this Item is a Form Item

getVariableName

() ... Object

Defined in app.js:4808

...

Returns:

... Object:

Returns the variable name if this is a Form Item

hide

() ... Object

Defined in app.js:4834

Hide this Item

Returns:

... Object:

Returns this

init

(
  • element
)
... Object

Defined in app.js:4480

...

Parameters:

  • element ...String

    Describe...

Returns:

... Object:

Returns this.

isAbove

(
  • otherId
)
... Object

Defined in app.js:4872

...

Parameters:

  • otherId ...Number

    Describe...

Returns:

... Object:

returns true this item is above the other Item

isBelow

(
  • otherId
)
... Object

Defined in app.js:4890

...

Parameters:

  • otherId ...Number

    Describe...

Returns:

... Object:

returns true this item is below the other Item

isFormItem

(
  • Name...
)
... Object

Defined in app.js:4851

...

Parameters:

  • Name... ... String Number

    Describe...

Returns:

... Object:

Returns true if this is a Form Item

isLeft

(
  • otherId
)
... Object

Defined in app.js:4908

...

Parameters:

  • otherId ...Number

    Describe...

Returns:

... Object:

returns true this item is left of the other Item

isRight

(
  • otherId
)
... Object

Defined in app.js:4926

...

Parameters:

  • otherId ...Number

    Describe...

Returns:

... Object:

returns true this item is right of the other Item

place

(
  • x
  • y
)
... Object

Defined in app.js:4944

place the item at a certain absolute x,y position

Parameters:

  • x ...String

    Describe...

  • y ...String

    Describe...

Returns:

... Object:

Returns this.

setAction

(
  • handler
)
... Object

Defined in app.js:4971

Sets the Action for this Item

Parameters:

  • handler ... String Number

    handler is a function name or adhoc function.

Returns:

... Object:

Returns this.

setBackgroundColor

(
  • color
)
... Object

Defined in app.js:4990

set the background color of this Item to color

Parameters:

  • color ...String

    Special case: color is 'random' will get a random color.

Returns:

... Object:

Returns this.

setBackgroundImage

(
  • src
  • method
)
... Object

Defined in app.js:5010

Sets the backgroundImage of this Item to src.

Parameters:

  • src ...String

    Describe...

  • method ...String

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

Returns:

... Object:

Returns this.

setHTML

(
  • str
)
... Object

Defined in app.js:5054

set the value of Html to str

Parameters:

  • str ...String

    Describe...

Returns:

... Object:

Returns this.

setImage

(
  • src
)
... Object

Defined in app.js:5071

set the image URL to src

Parameters:

  • src ...String

    Describe...

Returns:

... Object:

Returns this.

setLabel

(
  • str
)
... Object

Defined in app.js:5091

set the value of Label to str

Parameters:

  • str ...String

    Describe...

Returns:

... Object:

Returns this.

setLabelColor

(
  • color
)
... Object

Defined in app.js:5107

set the color of Label to color

Parameters:

  • color ...String

    Describe...

Returns:

... Object:

Returns this.

setSubTitle

(
  • str
)
... Object

Defined in app.js:5126

set the value of Sub Title to str

Parameters:

  • str ...String

    Describe...

Returns:

... Object:

Returns this.

setSubTitleColor

(
  • color
)
... Object

Defined in app.js:5141

set the color of SubTitle to color

Parameters:

  • color ...String

    Describe...

Returns:

... Object:

Returns this.

setText

(
  • str
)
... Object

Defined in app.js:5161

set the value of Text to str

Parameters:

  • str ...String

    Describe...

Returns:

... Object:

Returns this.

setTextColor

(
  • color
)
... Object

Defined in app.js:5187

set the color of Text to color

Parameters:

  • color ...String

    Describe...

Returns:

... Object:

Returns this.

setTitle

(
  • str
)
... Object

Defined in app.js:5212

set the value of Title to str

Parameters:

  • str ...String

    Describe...

Returns:

... Object:

Returns this.

Example:

paste example here

setTitleColor

(
  • color
)
... Object

Defined in app.js:5233

set the color of Title to color

Parameters:

  • color ...String

    Describe...

Returns:

... Object:

Returns this.

show

() ... Object

Defined in app.js:5254

Show this Item

Returns:

... Object:

Returns this.

swap

(
  • otherId
)
... Object

Defined in app.js:5273

swaps this icon with the other

Parameters:

  • otherId ...Number

    Describe...

Returns:

... Object:

Returns this.

toString

(
  • Name...
)
... Object

Defined in app.js:5301

...

Parameters:

  • Name... ... String Number

    Describe...

Returns:

... Object:

returns a string representation of the object

Properties

id

Int

Defined in app.js:4438

The id of the Item