class Matrix
All Implemented Interfaces:
The Matrix control is the standard visual interface for the Common Data Format (CDF), providing grid and tree-grid functionality that mirrors the
the record and attribute structures used by the CDF. Instances of this class can be used to create editable grids, selectable lists, trees, tables, etc.
In addtion to providing layout, selection, and editing schemes, the Matrix also provides various paging models to help optimize
how (and how much) data is rendered on-screen. The Matrix class is always used in conjunction with jsx3.gui.Matrix.Column, which describes
how data for a given series should be rendered on-screen. While the Matrix manages data and user interactions, Column
manages the on-screen format for how the data is presented.
Since:
3.2
| Nested
Class Summary |
|---|
| jsx3.gui.Matrix.BlockMask | The interface that defines the methods that affect the behavior of a composite object used as an edit mask of a
matrix column. |
| jsx3.gui.Matrix.Column | Column control for use as a child of a jsx3.gui.Matrix class |
| jsx3.gui.Matrix.ColumnFormat | A class that defines the methods required for an object to be used by jsx3.gui.Matrix.Column instances to
format cells of data. |
| jsx3.gui.Matrix.EditMask | The interface defining the methods that affect the behavior of an object used as an edit mask in a matrix column. |
| Field Summary |
|---|
| static String | jsx:///images/matrix/append.gif
|
| static int | 2 |
| static int | 1 |
| static int | 0 |
| static int | 50
|
| static String | |
| static int | 20
|
| static String | Deprecated. This value is localized.
|
| static int | 18. |
| static int | 3. |
| static int | 250. |
| static int | 50. |
| static int | 20
|
| static String | Deprecated. Renamed to DEFAULTXSLURL.
|
| static String | font-weight:bold
|
| static String | jsx:///images/matrix/file.gif (default)
|
| static String | jsx:///images/matrix/minus.gif (default)
|
| static String | jsx:///images/matrix/plus.gif (default)
|
| static String | jsx:///images/matrix/insert_before.gif
|
| static String | 4. |
| static String | jsxpaintpage. |
| static int | The outer container is first painted and then the entirety of the data is painted during a second pass |
| static int | The outer container is first painted. |
| static int | Default. |
| static int | The outer container is first painted. |
| static int | The outer container is painted along with any rows which are immediate children of the rendering context and those
descendant rows that have an open path to the context node. |
| static String | jsx:///images/matrix/select.gif
|
| static int | 2 |
| static int | 1 (default) |
| static int | 0 |
| static String | ascending |
| static String | jsx:///images/matrix/sort_asc.gif (default)
|
| static String | descending |
| static String | jsx:///images/matrix/sort_desc.gif (default)
|
| Constructor Summary |
|---|
| void | instance initializer |
| Method Summary |
|---|
| void | Instance override |
| void | Commits any active autorow session. |
| jsx3.xml.Entity | Removes a record from the XML data source of this object. |
| void | Deselects all selected CDF records. |
| void | Deselects a CDF record within the Matrix. |
| void | Sorts according to the current sort path. |
| int |
STATEINVALID is returned if the required property of this control is
true and no selection is made. |
| void | Evaluates the JavaScript code in the jsxexecute attribute of one CDF record of this list. |
| void | Applies focus to the on-screen cell that corresponds to the intersection of the element in the CDF source
document identified by strCdfId, and the first column mapped to strAttName. |
| void | Applies focus to the on-screen cell that corresponds to the intersection of
the element in the CDF source document identified by strCdfId, and the cell at the given index. |
| void | Applies focus to the on-screen row that corresponds to the element in the CDF source document identified by
strCdfId. |
| int | Returns whether or not an 'auto append' row will be rendered, allowing the user to automatically add new rows to the instance. |
| Object | Returns an object array of name/value pairs representing the current auto row session. |
| String | Returns CSS property value(s) for a border (border: solid 1px #000000) |
| int | Returns whether the column children can be reordered via user interaction. |
| int | Returns whether the list will render with sortable columns. |
| HTMLElement | Returns the HTML element that represents the intersection of the row identified
by strCdfId and the first column mapped to the named CDF attribute, strAttName. |
| int | Returns the zero-based index of the on-screen column(s), to the left of which will be fixed and cannot be reordered. |
| String | Returns the CSS string to apply to a Row/Cell when it has focus |
| String | Returns CSS property value(s) for a border (border: solid 1px #000000) |
| int | Returns the height of the header row in pixels. |
| String | Returns the icon to use for those CDF records that do not explicitly specify an icon via the jsximg attribute |
| String | Returns the icon to use when the given tree node is in an open state. |
| String | Returns the icon to use when the given tree node is in a closed state. |
| int | Returns how data should be painted on-screen. |
| int | Returns the number panels (a panel contains a collection of rows--getRowsPerPanel()) that should be part of the pool. |
| int | Sets the number of panels that are allowed in the queue waiting to be painted. |
| int | Returns the the number of milliseconds to wait before checking for inactive panels to garbage collect. |
| int | Returns whether or not to render the navigation controls that are applied to the first column when rendering model is hierarchical. |
| String | Returns the jsxid of the CDF record that will serve as the origin when rendering the data on-screen. |
| String | Returns the rendering model (how rows will be painted on-screen). |
| int | Returns whether or not this column can be resized by the user. |
| int | Returns the row height |
| int | Returns the number of rows each panel should contain. |
| int | Returns whether or not the column widths should be adjusted (decremented) such that all columns fit within the viewport. |
| int | Returns the info label to display when scrolling a paged instance, in order to show the scroll position. |
| int | Returns the horizontal scroll position of the list. |
| int | Returns the vertical scroll position. |
| Array<String> | Returns the jsxid(s) for the selected record(s). |
| jsx3.util.List<jsx3.xml.Entity> | Returns the collection of selected records. |
| String | Returns the CSS string to apply to a Row/Cell when it has focus |
| int | Returns the selection model. |
| String | Returns the direction (jsx3.gui.Matrix.SORT_ASCENDING or jsx3.gui.Matrix.SORT_DESCENDING) for the sorted column; if no direction specified, ascending is returned |
| String | Returns the name of the CDF attribute to sort on. |
| String | Returns the data type to be used for sorting this list. |
| Array | Returns an array of all jsxid attributes in the source CDF in the order they would appear if painted on-screen |
| int | Returns whether or not to supress display of the horizontal scrollbar. |
| int | Returns whether or not to supress display of the vertical scrollbar. |
| String | Array<String> | Returns an array of selected values (or empty array) if the selection model is jsx3.gui.Matrix.SELECTION_MULTI_ROW. |
| jsx3.xml.Document | Deprecated. Per-instance control of the XSL template is deprecated
|
| void | Assigns objMoveChild as the previousSibling of objPrecedeChild |
| jsx3.xml.CDF | Inserts a new property into an existing record with jsxid equal to strRecordId. |
| String | Returns the DHTML, used for this object's on-screen VIEW |
| void | inserts DHTML (as string) into IE's on-screen DOM as a child of the object's on-screen VIEW |
| void | Updates the on-screen cell to reflect the value in the CDF document to which the cell is mapped. |
| void | Updates the on-screen cell to reflect the value in the CDF document to which the cell is mapped. |
| void | Matrix implementation. |
| String | Updates the view of this object by calling paint() and replacing the current view with the
returned HTML. |
| void | Paints only the data rows. |
| void | Repaints the header row for improved runtime efficiency. |
| void | Removes the XML source document stored under the XML ID of this object from the server cache. |
| void | Removes the focus style from whichever cell is designated to have focus context. |
| void | Ends any existing edit session and hides the active mask. |
| void | Removes the XML source document stored under the XML ID of this object from the server cache. |
| void | Reveals a record by toggling parent nodes open (if rendering hierarcally) and scrolling the record into view. |
| void | Selects a CDF record of this list. |
| void | Sets whether or not an 'auto append' row will be rendered, allowing the user to automatically add new rows to the instance. |
| jsx3.gui.Block | Sets CSS property value(s) for a border (border: solid 1px #000000). |
| void | Sets whether the columns in the list can be re-ordered via user interaction with the VIEW |
| void | Sets whether the list will render with sortable columns. |
| void | Sets the zero-based index of the on-screen column(s), to the left of which will be fixed and cannot be reordered. |
| void | Sets the CSS string to apply to a Row/Cell when it has focus. |
| void | Sets CSS property value(s) for a border on the header row (border: solid 1px #000000). |
| void | Sets the height of the header row in pixels. |
| void | Sets the icon to use for those CDF records that do not explicitly specify an icon via the jsximg attribute |
| void | Sets the icon to use when the given tree node is in an open state. |
| void | Sets the icon to use when the given tree node is in a closed state. |
| void | Sets how data should be painted on-screen. |
| void | Sets the number panels (a panel contains a collection of rows--getRowsPerPanel()) that should be part of the pool. |
| void | Sets the number of panels that are allowed in the queue waiting to be painted. |
| void | Sets the the number of milliseconds to wait before checking for inactive panels to garbage collect. |
| void | Sets whether or not to render the navigation controls on the first column when being rendered in hierarchical mode. |
| void | Sets the jsxid of the CDF record that will serve as the origin when rendering the data on-screen. |
| void | Sets the rendering model (how rows will be painted on-screen). |
| void | Sets whether or not this column can be resized by the user. |
| void | Sets the on-screen row height. |
| void | Sets the number of rows each panel should contain. |
| void | Sets whether or not the column widths should be adjusted such that all columns visually display within the viewport. |
| void | Sets the standard info label to display when scrolling to show the scroll position. |
| void | Sets the horizontal scroll position. |
| void | Sets the vertical scroll position. |
| void | Sets the URL for the image to use (as the repeating background image) to denote selection. |
| void | Sets the selection model |
| void | Sets the direction (ascending or descending) for the sorted column. |
| void | Sets the name of the CDF attribute to sort on. |
| void | Sets the data type for the list. |
| void | Sets whether or not to supress display of the horizontal scrollbar. |
| void | Sets whether or not to supress display of the vertical scrollbar. |
| jsx3.gui.Matrix | Sets the value of this matrix. |
| jsx3.xml.Cacheable | Sets the XML ID of this object. |
| jsx3.xml.Cacheable | Sets the XML string of this object. |
| jsx3.xml.Cacheable | Sets the XML URL of this object. |
| void | Updates the scroll height and scroll position of the vertical scrollbar. |
| void | Toggles the open/closed state for a node in the Matrix |
| Methods Inherited From jsx3.gui.Form |
|---|
| doKeyBinding, doReset, getDisabledBackgroundColor, getDisabledColor, getEnabled, getKeyBinding, getRequired, getValidationState, setDisabledBackgroundColor, setDisabledColor, setEnabled, setKeyBinding, setRequired, setValidationState |
| Methods Inherited From jsx3.xml.Cacheable |
|---|
| clearXmlData, getNodeSet, getShareResources, getXML, getXMLId, getXMLString, getXMLTransformers, getXMLURL, getXSLId, getXSLParams, getXSLString, getXSLURL, getXmlAsync, getXmlBind, onXmlBinding, removeXSLParam, removeXSLParams, resetData, resetXslCacheData, setNodeSet, setShareResources, setSourceXML, setXMLTransformers, setXSLId, setXSLParam, setXSLString, setXSLURL, setXmlAsync, setXmlBind |
| Methods Inherited From jsx3.xml.CDF |
|---|
| adoptRecord, adoptRecordBefore, convertProperties, deleteRecordProperty, getRecord, getRecordIds, getRecordNode, getSchema, insertRecord, insertRecordBefore, insertRecordNode, reloadFromSource, setSchema |
| Methods Inherited From jsx3.gui.Block |
|---|
| getBackground, getBackgroundColor, getBorder, getCDFAttribute, getCDFId, getCSSOverride, getClassName, getColor, getCursor, getDimensions, getDisplay, getFontName, getFontSize, getFontWeight, getHeight, getIndex, getLeft, getMargin, getOverflow, getPadding, getRelativePosition, getTagName, getText, getTextAlign, getTip, getTop, getVisibility, getWidth, getZIndex, hideMask, setBackground, setBackgroundColor, setBorder, setCDFAttribute, setCDFId, setCSSOverride, setClassName, setColor, setCursor, setDimensions, setDisplay, setFontName, setFontSize, setFontWeight, setHeight, setIndex, setLeft, setMargin, setOverflow, setPadding, setRelativePosition, setTagName, setText, setTextAlign, setTip, setTop, setVisibility, setWidth, setZIndex, showMask |
| Methods Inherited From jsx3.gui.Interactive |
|---|
| doEvent, getCanDrag, getCanDrop, getCanMove, getCanSpy, getEvent, getEvents, getMenu, hasEvent, registerHotKey, removeEvent, removeEvents, setCanDrag, setCanDrop, setCanMove, setCanSpy, setEvent, setMenu, setSpyStyles, showSpy |
| Methods Inherited From jsx3.gui.Painted |
|---|
| focus, getAbsolutePosition, getAttribute, getAttributes, getRendered, insertHTML, onAfterPaint, onAfterRestoreView, paintChildren, recalcBox, removeAttribute, removeAttributes, setAttribute |
| Methods Inherited From jsx3.app.Model |
|---|
| assembleFromXML, doClone, findAncestor, findDescendants, getAncestorOfName, getAncestorOfType, getChild, getChildIndex, getChildren, getDescendantOfName, getDescendantsOfType, getDynamicProperty, getFirstChild, getFirstChildOfType, getHelpId, getId, getLastChild, getLoadType, getMetaValue, getNS, getName, getNextSibling, getParent, getPersistence, getPreviousSibling, getServer, getUriResolver, load, loadAndCache, loadXML, onAfterAssemble, onAfterAttach, onBeforeAssemble, onChangeServer, onChildAdded, onDestroy, onRemoveChild, onSetChild, onSetParent, removeChild, removeChildren, selectDescendants, setChild, setDynamicProperty, setHelpId, setLoadType, setMetaValue, setName, setPersistence, toString, toXML, toXMLDoc, toXMLElm |
| Methods Inherited From jsx3.lang.Object |
|---|
| clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf |
jsx:///images/matrix/append.gif
static final
int AUTOROW_FIRST_ROW
static final
int AUTOROW_LAST_ROW
static final
int AUTOROW_NONE
static
int AUTO_SCROLL_INTERVAL
static
int DEFAULT_HEADER_HEIGHT
static
String DEFAULT_INFO_LABEL
Deprecated. This value is localized.
"Viewing rows {0} to {1} of {2}".
Wildcards are as follows:
-
{0} The index position of the first visible on-screen row
-
{1} The index position of the last visible on-screen row
-
{2} Total count of all records in the list
static
int DEFAULT_PANEL_POOL_COUNT
18. number of panels allowed on-screen before destroying the panel most distant from the current panel index
static
int DEFAULT_PANEL_QUEUE_SIZE
3. number of panels in the paint queue. As new panels are added to the queue to be painted, older, less-relevant panels in the queue are removed
static
int DEFAULT_REAPER_INTERVAL
250. number of milliseconds between the time a new panel is added and the reaper checks for content exceeding jsx3.gui.Matrix.DEFAULT_PANEL_POOL_COUNT
static
int DEFAULT_ROWS_PER_PANEL
50. number of rows in a given panel
static
int DEFAULT_ROW_HEIGHT
Deprecated. Renamed to DEFAULTXSLURL.
jsx:///images/matrix/file.gif (default)
jsx:///images/matrix/minus.gif (default)
jsx:///images/matrix/plus.gif (default)
static
String INSERT_BEFORE_IMG
jsx:///images/matrix/insert_before.gif
static final
String MINIMUM_COLUMN_WIDTH
4. minimum width of a column when minimized (set Display to 'none' to completely hide a column)
static final
String ON_PAINT_PAGE
jsxpaintpage. Event to subscribe to each time a page of content is about to be painted on-screen
static final
int PAGING_2PASS
The outer container is first painted and then the entirety of the data is painted during a second pass
static final
int PAGING_CHUNKED
The outer container is first painted. Chunked sets of data are painted on-screen during repeated passes until
all data is painted
static final
int PAGING_OFF
Default. All data is painted at once with the outer container.
static final
int PAGING_PAGED
The outer container is first painted. The first and last panels are painted during a second pass. As the user
scrolls, relevant panels are added and unused panels are collected. (NOTE: Requires that row height be fixed.)
static final
int PAGING_STEPPED
The outer container is painted along with any rows which are immediate children of the rendering context and those
descendant rows that have an open path to the context node. All other rows will be fetched when the state for
their on-screen parent row is toggled to open.
jsx:///images/matrix/select.gif
static final
int SELECTION_MULTI_ROW
static final
int SELECTION_ROW
static final
int SELECTION_UNSELECTABLE
static final
String SORT_ASCENDING
static
String SORT_ASCENDING_IMG
jsx:///images/matrix/sort_asc.gif (default)
static final
String SORT_DESCENDING
static
String SORT_DESCENDING_IMG
jsx:///images/matrix/sort_desc.gif (default)
instance initializer
Parameters:
strName – unique name distinguishing this object from all other JSX GUI objects in the JSX application
Instance override
Parameters:
objChild – the child to adopt
bRepaint – if true or null, the object being adopted will be added to
the parent's view via the parent's paintChild() method.
This parameter is made available for those situations where a loop is executing and multiple
objects are being adopted. As view operations are the most CPU intensive, passing false
while looping through a collection of child objects to adopt will improve performance. After the
last child is adopted, simply call repaint() on the parent to immediately synchronize the view.
bForce – if true, the adoption is forced, even if the parent/child don't accept such adoptions (onSetChild() and onSetParent() will still be called)
Overrides:
See Also:
Commits any active autorow session.
Parameters:
objEvent – If passed, Allows Model Event to fire.
intCellIndex – Focus will be applied to the autorow cell at this index (zero-based)
Removes a record from the XML data source of this object.
Parameters:
strRecordId – the jsxid attribute of the data record to remove.
bRedraw – if true or null, the on-screen view of this object is
immediately updated to reflect the deleted record.
Returns:
the record removed from the data source or null if no such record found.
Overrides:
void deselectAllRecords()
Deselects all selected CDF records.
void deselectRecord(strRecordId
: String)
Deselects a CDF record within the Matrix. Both the view and the data model (CDF) will be updated
Parameters:
strRecordId – the jsxid of the record to deselect.
void doSort(intSortDir
: String)
Sorts according to the current sort path. If no sort direction is specified, the value will be toggled.
Parameters:
intSortDir – jsx3.gui.Matrix.SORT_ASCENDING or jsx3.gui.Matrix.SORT_DESCENDING.
See Also:
STATEINVALID is returned if the required property of this control is
true and no selection is made.
Returns:
jsx3.gui.Form.STATEINVALID or jsx3.gui.Form.STATEVALID.
Overrides:
void executeRecord(strRecordId
: String)
Evaluates the JavaScript code in the jsxexecute attribute of one CDF record of this list.
Parameters:
strRecordId – the jsxid of the CDF record to execute.
Applies focus to the on-screen cell that corresponds to the intersection of the element in the CDF source
document identified by strCdfId, and the first column mapped to strAttName.
Parameters:
strCdfId – jsxid property for CDF record
strAttName – attribute name on the CDF record. For example, jsxtext
void focusCellByIndex(strCdfId
: String, intCellIndex
: int)
Applies focus to the on-screen cell that corresponds to the intersection of
the element in the CDF source document identified by strCdfId, and the cell at the given index.
Parameters:
strCdfId – jsxid property for CDF record
intCellIndex – zero-based index of cell (on-screen).
void focusRowById(strCdfId
: String)
Applies focus to the on-screen row that corresponds to the element in the CDF source document identified by
strCdfId. Note that since only cells can receive focus, this method will apply focus to the
first cell child in the row.
Parameters:
strCdfId – jsxid property for CDF record
See Also:
Returns whether or not an 'auto append' row will be rendered, allowing the user to automatically add new rows to the instance.
Returns:
jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
Returns an object array of name/value pairs representing the current auto row session. When the session is committed, this
object will be converted into a CDF Record for the instance.
Returns:
Returns CSS property value(s) for a border (border: solid 1px #000000)
Returns:
Returns whether the column children can be reordered via user interaction. If no value is supplied
the isntance will allow child columns to be reordered.
Returns:
one of: jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
Returns whether the list will render with sortable columns. If null or jsx3.Boolean.TRUE, the instance is sortable.
Returns:
Returns the HTML element that represents the intersection of the row identified
by strCdfId and the first column mapped to the named CDF attribute, strAttName.
Parameters:
strCdfId – jsxid property for CDF record
strAttName – attribute name on the CDF record. For example, jsxtext
Returns:
Returns the zero-based index of the on-screen column(s), to the left of which will be fixed and cannot be reordered. For example, if this value
is set to 1, the first column can never be reordered and will always remain the first column. If this value is set to 2,
the first two columns will be fixed. Setting this value to 0 is effectively the same as setting it to null
Parameters:
strDefault – The default value to use if null
Returns:
positive integer
Returns the CSS string to apply to a Row/Cell when it has focus
Parameters:
strDefault – The default value to use if null (Matrix.FOCUS_STYLE)
Returns:
Returns CSS property value(s) for a border (border: solid 1px #000000)
Returns:
Returns the height of the header row in pixels. If this value is not set (null), the list will render with
the default value of jsx3.gui.Matrix.DEFAULT_HEADER_HEIGHT.
Parameters:
strDefault – The default value to use if null
Returns:
Returns the icon to use for those CDF records that do not explicitly specify an icon via the jsximg attribute
Parameters:
strDefault – The default value to use if null
Returns:
URL for icon to use. If null, jsx3.gui.Matrix.ICON will be applied when rendered.
Returns the icon to use when the given tree node is in an open state.
Parameters:
strDefault – The default value to use if null
Returns:
URL for icon. If null, jsx3.gui.Matrix.ICON_MINUS will be applied when rendered.
Returns the icon to use when the given tree node is in a closed state.
Parameters:
strDefault – The default value to use if null
Returns:
URL for icon to use. If null, jsx3.gui.Matrix.ICON_PLUS will be applied when rendered.
Returns how data should be painted on-screen. If no value is specified,
jsx3.gui.Matrix.PAGING_OFF will be applied. Note that the rendering model limits the available paging models:
- Matrix.PAGING_OFF: Paint everthing to screen at once (container and data) (rendering model: all)
- Matrix.PAGING_2PASS: Paint outer container and then perform a second pass to paint the data. (rendering model: deep, shallow)
- Matrix.PAGING_CHUNKED: Paint outer container and then perform repeated paints until all data has been painted, regardless of scroll position. (rendering model: deep, shallow)
- Matrix.PAGING_PAGED: Paint outer container. Paint First and last panels during second pass. Paint relevant panels when user scrolls to a given position. Discard excess panels. (rendering model: deep, shallow)
- Matrix.PAGING_STEPPED: Paint root nodes and any open descendants. Paint others as they are toggled open. (rendering model: hierarchical)
Parameters:
strDefault – The default value to use if null
Returns:
See Also:
Returns the number panels (a panel contains a collection of rows--getRowsPerPanel()) that should be part of the pool. If a panel count greater
than this value exists, the panels furthest away (as calculated by the scroll position) from the active panel will be destroyed. If this value is null,
the value defined by the constant, jsx3.gui.Matrix.DEFAULT_PANEL_POOL_COUNT, will be used.
Parameters:
strDefault – The default value to use if null
Returns:
Sets the number of panels that are allowed in the queue waiting to be painted. If null, the default value will be used: jsx3.gui.Matrix.DEFAULT_PANEL_QUEUE_SIZE
Note that this is different from the number of painted panels allowed on screen (e.g., getPanelPoolSize()).
Parameters:
strDefault – The default value to use if null
Returns:
Returns the the number of milliseconds to wait before checking for inactive panels to garbage collect. If null, the default value will be used: jsx3.gui.Matrix.DEFAULT_REAPER_INTERVAL
Parameters:
strDefault – The default value to use if null
Returns:
Returns whether or not to render the navigation controls that are applied to the first column when rendering model is hierarchical. When not set the navigators are rendered.
Parameters:
strDefault – The default value to use if null
Returns:
jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
Returns the jsxid of the CDF record that will serve as the origin when rendering the data on-screen. If not set, the
id, jsxroot, (which is the id for the root node, <data>) will be used.
Parameters:
strDefault – The default value to use if null
Returns:
Returns the rendering model (how rows will be painted on-screen). If not set, the instance will render deep, meaning all descendants
of the rendering context will be painted on-screen.
Parameters:
strDefault – The default value to use if null
Returns:
Returns whether or not this column can be resized by the user. If not set, the column will be assumed resizable
Returns:
Returns the row height
Parameters:
strDefault – The default value to use if null
Returns:
Returns the number of rows each panel should contain. If null, the default value will be used: jsx3.gui.Matrix.DEFAULT_ROWS_PER_PANEL
Parameters:
strDefault – The default value to use if null
Returns:
Returns whether or not the column widths should be adjusted (decremented) such that all columns fit within the viewport.
If null or jsx3.Boolean.FALSE, scale width will not be used and the column widths will render
fully, displaying a horizontal scrollbar when necessary. In such a case, all wildcard columns (e.g., *) will be resolved to the value,
jsx3.gui.Matrix.Column.DEFAULT_WIDTH.
Returns:
Returns the info label to display when scrolling a paged instance, in order to show the scroll position.
Parameters:
strDefault – The default value to use if null
Returns:
Returns the horizontal scroll position of the list.
Returns:
a non-negative number
Returns the vertical scroll position.
Returns:
a non-negative number
Returns the jsxid(s) for the selected record(s). Equivalent to this.getValue() except that the return value is always an Array.
Returns:
JavaScript array of stings
Returns the collection of selected records.
Returns:
Returns the CSS string to apply to a Row/Cell when it has focus
Parameters:
strDefault – The default value to use if null (Matrix.SELECTION_BG)
Returns:
Returns the selection model. If no selection type is specified, the instance will employ single row selection (jsx3.gui.Matrix.SELECTION_ROW)
Parameters:
strDefault – The default value to use if null
Returns:
Returns the direction (jsx3.gui.Matrix.SORT_ASCENDING or jsx3.gui.Matrix.SORT_DESCENDING) for the sorted column; if no direction specified, ascending is returned
Returns:
one of: jsx3.gui.Matrix.SORT_ASCENDING or jsx3.gui.Matrix.SORT_DESCENDING
Returns the name of the CDF attribute to sort on. If no value is set an empty string is returned by default.
Returns:
See Also:
Returns the data type to be used for sorting this list. This value is either the one explicitly set with
setSortType() or the data type of the current sort.
Returns:
jsx3.gui.Matrix.Column.TYPE_TEXT or jsx3.gui.Matrix.Column.TYPE_NUMBER
Returns an array of all jsxid attributes in the source CDF in the order they would appear if painted on-screen
Returns:
int getSuppressHScroller(strDefault
: String)
Returns whether or not to supress display of the horizontal scrollbar. When not set, the scrollbar will display as needed.
Parameters:
strDefault – The default value to use if null
Returns:
jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
int getSuppressVScroller(strDefault
: String)
Returns whether or not to supress display of the vertical scrollbar. When not set, the scrollbar will display as needed.
Parameters:
strDefault – The default value to use if null
Returns:
jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
Returns an array of selected values (or empty array) if the selection model is jsx3.gui.Matrix.SELECTION_MULTI_ROW. Returns a string (or null)
for the other selection models
Returns:
Overrides:
Deprecated. Per-instance control of the XSL template is deprecated
Returns XSLT, prioritizing the acquisition in the following order: 1) check cache; 2) check jsxxsl; 3) check jsxxslurl; 4) use default
Returns:
jsx3.xml.Document instance containing valid XSL stylesheet
Overrides:
Assigns objMoveChild as the previousSibling of objPrecedeChild
Parameters:
objMoveChild – the one being moved
objPrecedeChild – the one to insert before
bRepaint – if false the repaint will be suppressed
Overrides:
Inserts a new property into an existing record with jsxid equal to strRecordId.
If the property already exists, the existing property value will be updated. If no such record exists
in the XML document, this method fails quietly.
Parameters:
strRecordId – the jsxid attribute of the data record to modify.
strPropName – the name of the property to insert into the record.
strPropValue – the value of the property to insert.
bRedraw – if true or null, the on-screen view of this object is
immediately updated to reflect the inserted property.
Returns:
this object.
Overrides:
Returns the DHTML, used for this object's on-screen VIEW
Returns:
DHTML
Overrides:
inserts DHTML (as string) into IE's on-screen DOM as a child of the object's on-screen VIEW
Parameters:
objJSX – direct child whose generated VIEW will be directly inserted into the DOM to provide more efficient screen updates as repaint is costly for large applications
bGroup –
Overrides:
Updates the on-screen cell to reflect the value in the CDF document to which the cell is mapped.
Parameters:
strRecordId – jsxid value for the record node (according to the CDF) corresponding to the on-screen row to update
objColumn – Column instance to update. Any sibling Columns that map to the same named attribute as objColumn
(e.g., [objColumn].getPath()) as well as all sibling Columns that are triggered by the named attribute
(e.g., [objColumn].getTriggers()) will also be redrawn.
bSuppressTriggers – if true, no other sibling Columns will be updated, even if they share a common path or designate the path as one of their triggers.
objTRXML – if present, use instead of generating the row XHTML via XSLT
See Also:
void redrawMappedCells(strRecordId
: String, strAttName
: String)
Updates the on-screen cell to reflect the value in the CDF document to which the cell is mapped.
Parameters:
strRecordId – The jsxid value for the record node (according to the CDF) corresponding to the on-screen row to update
strAttName – Named attribute on the CDF record. All Column children that map to this named attribute
(e.g., [objColumn].getPath()) as well as all Column children that are triggered by the named attribute
(e.g., [objColumn].getTriggers()) will be redrawn.
See Also:
Matrix implementation.
Parameters:
strRecordId – jsxid value for the record node (according to the CDF) to redraw
intAction – jsx3.xml.CDF.INSERT, jsx3.xml.CDF.INSERTBEFORE, jsx3.xml.CDF.DELETE, or jsx3.xml.CDF.UPDATE.
bRecurse – if != false, any necessary recursion for flattened inserts will be automatically handled
Overrides:
Updates the view of this object by calling paint() and replacing the current view with the
returned HTML. This method has no effect if this object is not currently displayed.
Returns:
the result of calling paint() or null if this object is not displayed.
Overrides:
See Also:
void repaintData()
Paints only the data rows. Call for quick repainting of the data rows when only the source data
has changed. Does not recalculate and reprofile the box profile and resulting XSLT. Retains scroll position when possible.
void repaintHead()
Repaints the header row for improved runtime efficiency. For example, a minor text change to a label in a header row shouldn't repaint the entirety of the instance
Removes the XML source document stored under the XML ID of this object from the server cache.
Parameters:
objServer – the server owning the cache to modify. This is a required argument only if
this.getServer() does not returns a server instance.
Overrides:
void resetFocusContext(strId : ?)
Removes the focus style from whichever cell is designated to have focus context. Once focus context
is applied to the active cell in a matrix, the focus style will continue to be applied to
the active cell until another cell is set as the active cell or the Matrix is repainted via
a call to repaint or repaintData.
Parameters:
void resetMask()
Ends any existing edit session and hides the active mask. This is a carryover method from grid.
Removes the XML source document stored under the XML ID of this object from the server cache.
Parameters:
objServer – the server owning the cache to modify. This is a required argument only if
this.getServer() does not returns a server instance.
Overrides:
void revealRecord(strRecordId
: String)
Reveals a record by toggling parent nodes open (if rendering hierarcally) and scrolling the record into view.
Parameters:
strRecordId – the id of the record to reveal
void selectRecord(strRecordId
: String)
Selects a CDF record of this list. The item will be highlighted in the view and the CDF data will be updated
accordingly. If this list is a multi-select list then this selection will be added to any previous selection.
Parameters:
strRecordId – the jsxid of the record to select.
void setAutoRow(intBoolean
: int)
Sets whether or not an 'auto append' row will be rendered, allowing the user to automatically add new rows to the instance. Note
that if the rendering model is hierarchical or the paging model is jsx3.gui.Matrix.PAGING_PAGED, the auto row
feature is disabled. The CSS style for the auto row (a TR element) can be modified via the XSL Parameters palette, via the XSL
parameter, jsx_autorow_style
Parameters:
intBoolean – jsx3.Boolean.TRUE if the column widths should be adjusted to fully fit within the viewport
Sets CSS property value(s) for a border (border: solid 1px #000000). Updates MODEL and VIEW (unless repaint is suppressed).
Parameters:
strCSS – valid CSS property value for a border (border: solid 1px #000000)
bSuppressRepaint – Pass true to stop the default repaint from occurring.
Typically property updates that affect the browser-specific box model (such as borders) are repainted
immediately to keep the box model abstraction in synch with the native view. However, the repaint can be
suppressed to avoid unnecessary reparsing of the XSLT during repeated property updates.
Returns:
this object
void setCanReorder(REORDER
: int)
Sets whether the columns in the list can be re-ordered via user interaction with the VIEW
Parameters:
REORDER – one of: jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
void setCanSort(SORT
: int)
Sets whether the list will render with sortable columns.
Parameters:
SORT – one of jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
void setFixedColumnIndex(intIndex
: int)
Sets the zero-based index of the on-screen column(s), to the left of which will be fixed and cannot be reordered.
Parameters:
intIndex – positive integer
void setFocusStyle(strCSS
: String)
Sets the CSS string to apply to a Row/Cell when it has focus. NOTE: Passing
styles that affect position, left, top, width, height, border, background-image, padding, and margin
(those reserved by the class) can have undesired effects.
Parameters:
strCSS – Valid CSS. For example: font-weight:bold;color:orange;
void setHeaderBorder(strCSS
: String)
Sets CSS property value(s) for a border on the header row (border: solid 1px #000000). Updates both model and view.
Parameters:
strCSS – valid CSS property value for a border (border: solid 1px #000000)
void setHeaderHeight(intHeight
: int, bSuppressRepaint
: boolean)
Sets the height of the header row in pixels. Set to zero (0) to hide the header row and only render the body rows.
Parameters:
intHeight –
bSuppressRepaint – Pass true to stop the default repaint from occurring.
Typically property updates that affect the browser-specific box model (such as height) are repainted
immediately to keep the box model abstraction in sync with the native view. However, the repaint can be
suppressed to avoid unnecessary reparsing of the XSLT during repeated property updates.
Sets the icon to use for those CDF records that do not explicitly specify an icon via the jsximg attribute
Parameters:
strURL – URL for icon to use
void setIconMinus(strURL
: String)
Sets the icon to use when the given tree node is in an open state.
Parameters:
strURL – URL (preferably relative)
void setIconPlus(strURL
: String)
Sets the icon to use when the given tree node is in a closed state.
Parameters:
strURL – URL (preferably relative)
void setPagingModel(intModel
: int)
Sets how data should be painted on-screen. If no value is specified, jsx3.gui.Matrix.PAGING_OFF will be applied.
Parameters:
intModel – one of: Matrix. PAGING_OFF, PAGING_2PASS, PAGING_CHUNKED, PAGING_PAGED, PAGING_STEPPED
void setPanelPoolSize(intCount
: int)
Sets the number panels (a panel contains a collection of rows--getRowsPerPanel()) that should be part of the pool.
Parameters:
void setPanelQueueSize(intCount
: int)
Sets the number of panels that are allowed in the queue waiting to be painted. Can be tuned up or down to optimize performance given the amount of data, connection speed, etc
Parameters:
void setReaperInterval(intInterval
: int)
Sets the the number of milliseconds to wait before checking for inactive panels to garbage collect.
Parameters:
intInterval – number of milliseconds
void setRenderNavigators(intTrueFalse
: int, bSuppressRepaint
: boolean)
Sets whether or not to render the navigation controls on the first column when being rendered in hierarchical mode.
Parameters:
intTrueFalse – jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
bSuppressRepaint – Pass true to stop the default repaint from occurring.
Typically property updates that affect the browser-specific box model (such as rendering the navigational controls) are repainted
immediately to keep the box model abstraction in synch with the native view. However, the repaint can be
suppressed to avoid unnecessary reparsing of the XSLT during repeated property updates.
void setRenderingContext(strJsxId
: String, bSuppressRepaint
: boolean)
Sets the jsxid of the CDF record that will serve as the origin when rendering the data on-screen.
Parameters:
strJsxId – jsxid property for the CDF record to use as the contextual root when rendering data on-screen.
bSuppressRepaint – Pass true to stop the default repaint from occurring.
void setRenderingModel(MODEL
: String, bSuppressRepaint
: boolean)
Sets the rendering model (how rows will be painted on-screen).
Parameters:
MODEL – one of: shallow, deep, or hierarchical
bSuppressRepaint – Pass true to stop the default repaint from occurring.
void setResizable(RESIZE
: int)
Sets whether or not this column can be resized by the user. If not set, the column will be assumed resizable. Note that if the parent Matrix
is set as NOT resizable, this setting is ignored and no child columns can be resized
Parameters:
void setRowHeight(intHeight
: int, bSuppressRepaint
: boolean)
Sets the on-screen row height. If row height is null, the default row height will be used (jsx3.gui.Matrix.DEFAULT_ROW_HEIGHT).
If row height is 0, the row height is flexible and the row's height will expand to fit the content.
Parameters:
intHeight – height in pixels
bSuppressRepaint – Pass true to stop the default repaint from occurring.
Typically property updates that affect the browser-specific box model (such as padding) are repainted
immediately to keep the box model abstraction in synch with the native view. However, the repaint can be
suppressed to avoid unnecessary reparsing of the XSLT during repeated property updates.
void setRowsPerPanel(intCount
: int, bSuppressRepaint
: boolean)
Sets the number of rows each panel should contain.
Parameters:
intCount –
bSuppressRepaint – Pass true to stop the default repaint from occurring.
void setScaleWidth(intBoolean
: int)
Sets whether or not the column widths should be adjusted such that all columns visually display within the viewport.
Defaults to jsx3.Boolean.FALSE if not set, meaning a horizontal scrollbar will appear if the aggregate column widths
exceed the available width of the viewport.
Parameters:
intBoolean – One of: jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
void setScrollInfoLabel(strLabel
: String)
Sets the standard info label to display when scrolling to show the scroll position. If no label is supplied
an appropriate localized value will be used. Set to an empty string to suppress any label from displaying.
Parameters:
strLabel –
valid HTML/Text. Set to an empty string to suppress any label from displaying.
Wildcards are as follows:
- {0} The index position of the first visible on-screen row
- {1} The index position of the last visible on-screen row
- {2} Total count of all records in the list
void setScrollLeft(intScrollLeft
: int)
Sets the horizontal scroll position.
Parameters:
intScrollLeft – a non-negative number
Sets the vertical scroll position.
Parameters:
intScrollTop – a non-negative number
objGUI –
void setSelectionBG(strURL
: String)
Sets the URL for the image to use (as the repeating background image) to denote selection.
Parameters:
void setSelectionModel(intType
: int)
Sets the selection model
Parameters:
intType – one of: jsx3.gui.Matrix.SELECTION_UNSELECTABLE, jsx3.gui.Matrix.SELECTION_ROW, jsx3.gui.Matrix.SELECTION_MULTI_ROW
void setSortDirection(intSortDir
: String)
Sets the direction (ascending or descending) for the sorted column.
Parameters:
intSortDir – one of: jsx3.gui.Matrix.SORT_ASCENDING or jsx3.gui.Matrix.SORT_DESCENDING
void setSortPath(strAttr
: String)
Sets the name of the CDF attribute to sort on. The records in the data source of this matrix are sorted
on this attribute before being painted to screen.
Parameters:
See Also:
void setSortType(DATATYPE
: String)
Sets the data type for the list. This explicit value will override any column data type if set. If it is not set
the data type specific to the sort column is used for sorting.
Parameters:
DATATYPE – data type for this column's data; ; valid types include: jsx3.gui.Matrix.Column.TYPE_TEXT and jsx3.gui.Matrix.Column.TYPE_NUMBER
void setSuppressHScroller(intTrueFalse
: int)
Sets whether or not to supress display of the horizontal scrollbar. Updates both model and view
Parameters:
intTrueFalse – jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
void setSuppressVScroller(intTrueFalse
: int, bSuppressRepaint
: boolean)
Sets whether or not to supress display of the vertical scrollbar. Updates both model and view.
Parameters:
intTrueFalse – jsx3.Boolean.TRUE or jsx3.Boolean.FALSE
bSuppressRepaint – Pass true to stop the default repaint from occurring.
Typically property updates that affect the browser-specific box model (such as rendering the vertical scrollbar) are repainted
immediately to keep the box model abstraction in synch with the native view. However, the repaint can be
suppressed to avoid unnecessary reparsing of the XSLT during repeated property updates.
Sets the value of this matrix. Deselects all existing selections. Scrolls the first record into view.
Parameters:
strId – jsxid attribute for the CDF record(s) to select
Returns:
this object.
Overrides:
Sets the XML ID of this object. This value is the key under which the XML source document of this object is
saved in the cache of the server owning this object. The developer may specify either a unique or shared value.
If no value is specified, a unique id is generated.
Parameters:
Returns:
this object.
Overrides:
See Also:
Sets the XML string of this object. Setting this value to the string serialization of an XML document is one
way of specifying the source XML document of this object.
Parameters:
strXML – null or a well-formed serialized XML element.
Returns:
this object.
Overrides:
See Also:
Sets the XML URL of this object. Settings this value to the URI of an XML document is one way of specifying the
source XML document of this object.
Parameters:
strXMLURL – null or a URI that when resolved against the server owning this object
specifies a valid XML document.
Returns:
this object.
Overrides:
See Also:
void synchronizeVScroller()
Updates the scroll height and scroll position of the vertical scrollbar. When a Matrix instance has
a display property of none (or is contained by an ancestor with a display of none) and the Matrix is repainted (repaint/repaintData),
the browser will misreport how large the content actually is. When the Matrix is then restored the scrollbars will be disabled.
By calling this method after the view has been restored (i.e., when display is set to block), the scrollbars will reflect the accurate height.
Toggles the open/closed state for a node in the Matrix
Parameters:
strRecordId – the 'jsxid' attribute on the given CDF record to toggle
bOpen – if null, the open state will be toggled
Copyright © 2001-2011, TIBCO Software Inc.