class TableWidget view source

Table widget.

Constructor

new TableWidget(opts : any)

Parameters

opts any Options passed to the constructor
Instance members

addClass(className : string)
[inherits from WidgetBase]

Add the given class to element

Parameters

className string class to add

adoptChildWidget(widget : WidgetBase, options : Object)
[inherits from WidgetGroupBase]

Add a child widget which has already a parent to the widget

Parameters

widget WidgetBase the widget to add
options Object possible options
options.noDOMInsert boolean won't add child to DOM
options.position number insert position
options.ordered string auto order item by unique auiID
options.tag string context tag
options.mode string context mode : null|"replace"

detach()
[inherits from WidgetBase]

Detach the widget from the dom

domFocus(noScroll : boolean)
[inherits from TableWidgetBase]

Set the DOM focus to the widget

Parameters

noScroll boolean if true try to disable auto scroll

emit(type : string, arguments… : any)
[inherits from EventListener]

Emit an event

Parameters

type string event type to emit
arguments any arguments (excluding type) will be set in event.data

empty()
[inherits from WidgetGroupBase]

Remove all children

getApplicationIdentifier() : (string)
[inherits from WidgetBase]

Get the unique identifier of the application

Returns

(string) the unique identifier of the application

getApplicationWidget() : (ApplicationWidget)
[inherits from WidgetBase]

Get Application Widget related to the widget

Returns

(ApplicationWidget) ApplicationWidget

getBackgroundColor() : (string)
[inherits from ColoredWidgetBase]

Returns the background color

Returns

(string) a color definition as an RGB function ('rgb(128, 255, 0)')

getBuildParameters() : (Object)
[inherits from WidgetBase]

Returns build parameters

Returns

(Object) build parameters

getChildren() : (Array)
[inherits from WidgetGroupBase]

Get all children of this widget

Returns

(Array) the list of children of this widget group

getClassName() : (string)
[inherits from WidgetBase]

Get the main class name of the widget

Returns

(string) the main class name

getColor() : (string)
[inherits from ColoredWidgetBase]

Returns the fore color

Returns

(string) a color definition as an RGB function ('rgb(128, 255, 0)')

getColorFromStyle() : (string)
[inherits from ColoredWidgetBase]

Returns the fore color (directly from style css)

Returns

(string) a color definition as an RGB function ('rgb(128, 255, 0)')

getColumns() : (Array)

Returns column widgets (vm aui tree order)

Returns

(Array) array of column widgets

getColumnsContainer() : (HTMLElement)

Returns columns container DOM Element

Returns

(HTMLElement) columns container DOM Element

getColumnsFooter() : (HTMLElement)

Returns columns footer DOM Element

Returns

(HTMLElement) columns footer DOM Element

getColumnsHeaders() : (HTMLElement)

Returns columns headers DOM Element

Returns

(HTMLElement) columns headers DOM Element

getContainerElement() : (HTMLElement)
[inherits from WidgetGroupBase]

Get the container Element

Returns

(HTMLElement) the element

getCurrentChildren() : (WidgetBase)
[inherits from WidgetGroupBase]

Returns current widget (flagged with 'current' class)

Returns

(WidgetBase) The current child

getCurrentRow() : (number)
[inherits from TableWidgetBase]

Returns current row

Returns

(number) current row

getCurrentWidget() : (WidgetBase)

Returns the current widget

Returns

(WidgetBase) current widget

getDialogType() : (string)
[inherits from WidgetBase]

return widget current dialog type

Returns

(string) values can be : Input, InputArray, Display, DisplayArray or Construct

getElement() : (HTMLElement)
[inherits from WidgetBase]

Get the root element of the widget

Returns

(HTMLElement) the root element of the widget

getEnd() : (string)
[inherits from WidgetBase]

Get end (for reversed mode)

Returns

(string) end keyword for rtl

getFontColor() : (string)
[inherits from TextWidgetBase]

Get the font color used by this widget

Returns

(string) a CSS font color value

getFontFamily() : (string)
[inherits from TextWidgetBase]

Get the font-family used by this widget

Returns

(string) the used font family

getFontSize() : (string)
[inherits from TextWidgetBase]

Get the font-size used by this widget

Returns

(string) a CSS font size value

getFontStyle() : (string)
[inherits from TextWidgetBase]

Get the font-style used by this widget

Returns

(string) a CSS font style value

getFontWeight() : (string)
[inherits from TextWidgetBase]

Get the font-family used by this widget

Returns

(string) a CSS font weight value

getFormWidget() : (FormWidget)
[inherits from WidgetBase]

Get the Form Widget related to the widget

Returns

(FormWidget) FormWidget

getIndexOfChild(widget : WidgetBase) : (number)
[inherits from WidgetGroupBase]

Get the child widget position

Parameters

widget WidgetBase the widget

Returns

(number) widget position

getLastOrderedColumn(visible : boolean) : (TableColumnWidget)

Returns last ordered column

Parameters

visible boolean if true return the last visible ordered columns

Returns

(TableColumnWidget) last column widget

getLayoutEngine() : (LayoutEngineBase)
[inherits from WidgetBase]

Get the widget's layout engine

Returns

(LayoutEngineBase) the widget's layout engine

getLayoutInformation() : (LayoutInformation)
[inherits from WidgetBase]

Get the widget's layout information

Returns

(LayoutInformation) the widget's layout information

getLeftColumnsContainer() : (HTMLElement)

Returns left frozen columns container DOM Element

Returns

(HTMLElement) left frozen columns container DOM Element

getLeftColumnsFooter() : (HTMLElement)

Returns left columns footer DOM Element

Returns

(HTMLElement) left columns footer DOM Element

getLeftColumnsHeaders() : (HTMLElement)

Returns left frozen columns headers DOM Element

Returns

(HTMLElement) left frozen columns headers DOM Element

getLeftContainer() : (HTMLElement)

Returns left container DOM Element (contains left frozen columns/headers/footers elements)

Returns

(HTMLElement) left container DOM Element

getLeftFrozenColumns() : (number)

Returns number of left frozen columns

Returns

(number) number of left frozen columns

getName() : (string)
[inherits from WidgetBase]

Get the name of the widget class

Returns

(string) the widget class name

getOffset() : (number)
[inherits from TableWidgetBase]

Returns table offset

Returns

(number) the table offset

getOrderedColumns() : (Array)

Returns column widgets (visual order)

Returns

(Array) array of column widgets

getPageSize() : (number)
[inherits from TableWidgetBase]

Returns page size

Returns

(number) the page size

getParentWidget() : (WidgetGroupBase)
[inherits from WidgetBase]

Get the parent widget

Returns

(WidgetGroupBase) the parent widget

getRightColumnsContainer() : (HTMLElement)

Returns right frozen columns container DOM Element

Returns

(HTMLElement) right frozen columns container DOM Element

getRightColumnsFooter() : (HTMLElement)

Returns right columns footer DOM Element

Returns

(HTMLElement) right columns footer DOM Element

getRightColumnsHeaders() : (HTMLElement)

Returns right frozen columns headers DOM Element

Returns

(HTMLElement) right frozen columns headers DOM Element

getRightContainer() : (HTMLElement)

Returns right container DOM Element (contains right frozen columns/headers/footers elements)

Returns

(HTMLElement) right container DOM Element

getRightFrozenColumns() : (number)

Returns number of right frozen columns

Returns

(number) number of right frozen columns

getRowHeight() : (number)
[inherits from TableWidgetBase]

Returns the row height in pixels

Returns

(number) row height

getSize() : (number)
[inherits from TableWidgetBase]

Returns table size

Returns

(number) the table size

getStart() : (string)
[inherits from WidgetBase]

Get start (for reversed mode)

Returns

(string) start keyword for rtl

getStyle(selector : string, property : string, appliesOnRoot : boolean) : (any)
[inherits from WidgetBase]

Get widget style property value

Parameters

selector string additional sub selector
property string property name
appliesOnRoot boolean true if the returned selector should match the root too.

Returns

(any) property value if set, undefined otherwise

getTableWidgetBase() : (TableWidgetBase)
[inherits from WidgetBase]

Get the table Widget base class related to the widget

Returns

(TableWidgetBase) TableWidgetBase

getTextAlign() : (string)
[inherits from TextWidgetBase]

Get the text-align used by this widget

Returns

(string) a text alignment

getTextDecoration() : (string)
[inherits from TextWidgetBase]

Get the text-decoration used by this widget

Returns

(string) a CSS text decoration

getTextTransform() : (string)
[inherits from TextWidgetBase]

Get the text-transform used by this widget

Returns

(string) a CSS text transform

getTitle() : (string)
[inherits from WidgetBase]

Get the title of the widget

Returns

(string) the tooltip text

getUniqueIdentifier() : (string)
[inherits from WidgetBase]

Get the unique identifier of the widget

Returns

(string) the unique identifier of the widget

getUserInterfaceWidget() : (UserInterfaceWidget)
[inherits from WidgetBase]

Get the UI widget related to the widget

Returns

(UserInterfaceWidget) UserInterfaceWidget

getWidgetAt(column : number, row : number) : (WidgetBase)

Returns the widget at the specified column/row

Parameters

column number column index
row number row index

Returns

(WidgetBase) item widget

getWindowWidget() : (WindowWidget)
[inherits from WidgetBase]

Get the Window Widget related to the widget

Returns

(WindowWidget) WindowWidget

hasChildWebComponent() : (boolean)
[inherits from WidgetGroupBase]

returns true if a WebComponent is contained in any sublevel child

Returns

(boolean) true if the widget has webcomponent, false otherwise

hasClass(className : string)
[inherits from WidgetBase]

Checks if the widget element has the given class

Parameters

className string class to check

hasFocus() : (boolean)
[inherits from WidgetBase]

Check if widget node has focus (class gbc_Focus)

Returns

(boolean) true if widget node has focus

hasLeftFrozenColumns() : (boolean)

Returns true if table has left frozen columns

Returns

(boolean) true if there are left frozen columns

hasRightFrozenColumns() : (boolean)

Returns true if table has right frozen columns

Returns

(boolean) true if there are right frozen columns

hasVMFocus() : (boolean)
[inherits from WidgetBase]

Check if widget node has VM focus

Returns

(boolean) true if widget node has VM focus

ignoreLayout() : (boolean)
[inherits from WidgetBase]

Does the widget ignore layouting

Returns

(boolean) true if the widget ignore all layout.

isChildOf(parent : WidgetBase) : (boolean)
[inherits from WidgetBase]

Check if this widget is a child of a given one

Parameters

parent WidgetBase the reference parent widget

Returns

(boolean) true if is a child, false otherwise

isCurrentRowVisible() : (boolean)

Returns if current row is visible

Returns

(boolean) true if current row is visible

isDestroyed() : (boolean)
[inherits from EventListener]

Returns if the node is destroyed

Returns

(boolean) true if node is destroyed

isDisplayMode() : (boolean)
[inherits from TableWidgetBase]

Returns if table is in display mode.

Returns

(boolean) true if display mode

isEnabled() : (boolean)
[inherits from WidgetBase]

Check if widget is enabled

Returns

(boolean) true if the widget allows user interaction, false otherwise.

isFixedPageSize() : (boolean)
[inherits from TableWidgetBase]

Returns if pageSize is fixed

Returns

(boolean) true if pageSize is fixed

isFocusable() : (boolean)
[inherits from WidgetBase]

Returns if the widget is focusable

Returns

(boolean) State of focusable

isFrozenTable() : (boolean)

Returns true if table can have frozen columns

Returns

(boolean) true if table can have frozen columns

isHidden() : (boolean)
[inherits from WidgetBase]

Check if the widget is hidden

Returns

(boolean) true if the widget is hidden, false otherwise

isHighlightCurrentCell() : (boolean)

Return if the current cell must be highlighted

Returns

(boolean) true if current cell must be highlighted

isHighlightCurrentRow() : (boolean)
[inherits from TableWidgetBase]

Return if the current row must be highlighted

Returns

(boolean) true if current row must be highlighted

isInMatrix() : (boolean)
[inherits from WidgetBase]

Check if the widget is in a matrix

Returns

(boolean) true if the widget is in a matrix, false otherwise.

isInputMode() : (boolean)
[inherits from TableWidgetBase]

Returns if table is in input mode.

Returns

(boolean) true if input mode

isInTable() : (boolean)
[inherits from WidgetBase]

Check if the widget is in a table

Returns

(boolean) true if the widget is in a table, false otherwise.

isMultiRowSelectionEnabled() : (boolean)

Returns if multi-row selection is enabled

Returns

(boolean) true if the table allow multi-row selection, false otherwise

isNoBorder() : (boolean)
[inherits from WidgetBase]

Check if the widget is displayed without border

Returns

(boolean) true if the widget has no border class, false otherwise

isResizeFillsEmptySpace() : (boolean)

Indicates if the last visible column should fill the empty space.

Returns

(boolean) true if last column fills empty space

isReversed() : (boolean)
[inherits from WidgetBase]

Check if arabic mode is enabled

Returns

(boolean) true if enabled

isVisible() : (boolean)
[inherits from WidgetBase]

Check if the widget is visible

Returns

(boolean) true if visible, false otherwise

loseFocus()
[inherits from WidgetBase]

Called before setFocus to notify previous focused widget

loseVMFocus()
[inherits from WidgetBase]

Called before setting VM focus to notify previous VM focused widget

removeClass(className : string)
[inherits from WidgetBase]

Remove the given class from element

Parameters

className string class to delete

removeTextTransform()
[inherits from TextWidgetBase]

Remove both class which cause text-transform

replaceChildWidget(oldWidget : WidgetBase, newWidget : WidgetBase)
[inherits from WidgetGroupBase]

Remove a child widget to use another widget instead

Parameters

oldWidget WidgetBase the widget to replace
newWidget WidgetBase the widget to add

replaceWith(widget : WidgetBase)
[inherits from WidgetBase]

Replace the current widget with a given one

Parameters

widget WidgetBase the new widget

setColor(color : string)
[inherits from ColoredWidgetBase]

Set the fore color

Parameters

color string a CSS color definition. Can be a color name ('red', 'blue'), an hex code ('#f5d48a') or a color function ('rgb(128, 255, 0)'). null restores the default value.

setDialogType(dialogType : string)
[inherits from WidgetBase]

Set widget current dialog type. Can be Input, Input Array, Display, Display Array or Construct

Parameters

dialogType string Dialog type

setFocusable(focusable : boolean)
[inherits from WidgetBase]

Defines if the widget is focusable

Parameters

focusable boolean State of focusable

setFontColor() : (string)
[inherits from TextWidgetBase]

Set the font color used by this widget

Returns

(string) a CSS font color value

setFontFamily(fontFamily : string)
[inherits from TextWidgetBase]

Set the font-family used for this widget

Parameters

fontFamily string the font family to use. null restores the default value.

setFontSize(size : string)
[inherits from TextWidgetBase]

Set the font-size used for this widget

Parameters

size string a CSS font size value. null restores the default value.

setFontStyle(style : string)
[inherits from TextWidgetBase]

Set the font-style used for this widget

Parameters

style string a CSS font style value. null restores the default value.

setFontWeight(weight : string)
[inherits from TextWidgetBase]

Set the font weight used for this widget

Parameters

weight string a CSS font weight value. null restores the default value.

setHidden(hidden : boolean)
[inherits from WidgetBase]

Defines if the widget should be hidden or not

Parameters

hidden boolean true if the widget is hidden, false otherwise

setInputMode(b : boolean)
[inherits from TableWidgetBase]

Sets if table is in "input" mode.

Parameters

b boolean input mode

setLeftFrozenColumns(n : number)

Sets the number of left frozen columns.

Parameters

n number number of left frozen columns

setNoBorder(noBorder : boolean)
[inherits from WidgetBase]

Remove or add borders to the widget

Parameters

noBorder boolean true if the widget has no border class, false otherwise

setParentWidget(widget : WidgetGroupBase, options : Object)
[inherits from WidgetBase]

Defines the parent widget

Parameters

widget WidgetGroupBase the widget to use as parent
options Object possible options
options.noLayoutInvalidation boolean won't affect parent layout

setReverse(rtl : boolean)
[inherits from WidgetBase]

Set Arabic mode

Parameters

rtl boolean true if widget is right to left

setRightFrozenColumns(n : number)

Sets the number of right frozen columns.

Parameters

n number number of right frozen columns

setStyle(selector : string|Object, style : Object)
[inherits from WidgetBase]

Updates widget style with new rules

Parameters

selector string|Object additional sub selector
style Object style properties to set

setTextAlign(align : string)
[inherits from TextWidgetBase]

Set the text-align used for this widget

Parameters

align string a CSS text alignment. null restores the default value.

setTextDecoration()
[inherits from TextWidgetBase]

Set the text-decoration used for this widget

setTextTransform(transform : string)
[inherits from TextWidgetBase]

Set the text-transform used for this widget

Parameters

transform string a CSS text transform. null restores the default value.

setTitle(title : string)
[inherits from WidgetBase]

Set the title of the widget

Parameters

title string the tooltip text

toggleClass(className : string, switcher : boolean)
[inherits from WidgetBase]

Toggle the given class to element

Parameters

className string class to toggle
switcher boolean forced new state

translate()
[inherits from WidgetBase]

Translate the widget

when(type : string, handler : Hook, once : boolean) : (HandleRegistration)
[inherits from EventListener]

Registers a handler for this event type

Parameters

type string event type (e.g. "attribute changed")
handler Hook handler to trigger when the event type is emitted
once boolean if true, will only fire once

Returns

(HandleRegistration) a registration handle (for unbind purpose)