OverviewSingleDeprecated

jsx3.gui

class Matrix.Column

Object
->jsx3.lang.Object
  ->jsx3.app.Model
    ->jsx3.gui.Painted
      ->jsx3.gui.Block
        ->jsx3.gui.Matrix.Column

All Implemented Interfaces:

jsx3.gui.Interactive, jsx3.util.EventDispatcher

class Matrix.Column
extends jsx3.gui.Block
Column control for use as a child of a jsx3.gui.Matrix class

Since:

3.2

Field Summary
static String
DEFAULT_VALIGN
top
static int
DEFAULT_WIDTH
100
static String
TYPE_NUMBER
number
static String
TYPE_TEXT
text (default)
Constructor Summary
void
init(strName : String)
instance initializer
Method Summary
jsx3.Boolean
Returns whether the parent list/grid can be sorted on this column.
String
Returns CSS property value for the data cell background-color.
String
Returns CSS property value for the data cell border.
String
Returns CSS property value for the data cell color.
String
Returns CSS property value for the data cell cursor.
String
Returns the CSS property value for the data cell font-family.
int
Returns the CSS property value for the data cell font-size.
String
Returns the CSS property value for the data cell font-weight.
String
Returns the CSS property value for the data cell padding.
String
Returns the CSS property value for the data cell text-align.
String
Returns the CSS property value for the data cell vertical-align.
int
getCellWrap(strDefault : String)
Returns whether or not the data cellc will support text-wrapping.
String
Returns the data type for this column of data (affects sorting if this column is used for sorting the data); valid types include: jsx3.gui.Matrix.Column.TYPE_TEXT and jsx3.gui.Matrix.Column.TYPE_NUMBER
int
Returns the zero-based index for ths column in relation to its siblings.
String
Gets the named object that will handle the reformatting of a given column's data cells.
String
Returns the selection path for this column of data.
jsx3.Boolean
Gets whether or not this column can be resized by the user.
String
Returns the data type for this column of data (affects sorting if this column is used for sorting the data).
String
Returns the CDF attribute to use to sort on this column.
String
Returns one or more named attributes.
String
Returns the CSS property value for the header cell vertical-align.
String
getValueTemplate(strDefault : String)
Gets the user-defined XSL template (xsl:template) that will override the defualt template defined by Column.TEMPLATES.default.
jsx3.Boolean
getWrap(strDefault : String)
Gets whether or not the header cell will support text-wrapping.
String
Returns the DHTML, used for this object's on-screen VIEW
String
Updates the view of this object by calling paint() and replacing the current view with the returned HTML.
void
setBorder(strCSS : String)
Sets property value(s) for a border for the header cell (solid 1px #000000).
void
Sets whether the parnet list/grid can be sorted on this column.
void
Sets CSS property value for the data cell background-color.
void
setCellBorder(strCSS : String, bSuppressRepaint : boolean)
Sets CSS property value(s) for a border for the data cells.
void
setCellColor(strColor : String)
Sets CSS property value for the data cell color.
void
setCellCursor(strCursor : String)
Sets CSS property value for the data cell cursor.
void
setCellFontName(strFontName : String)
Sets the CSS property value for the data cell font-family.
void
setCellFontSize(intPixelSize : int)
Sets the CSS property value for the data cell font-size.
void
setCellFontWeight(FONTWEIGHT : String)
Sets the CSS property value for the data cell font-weight.
void
setCellPadding(strCSS : String, bSuppressRepaint : boolean)
Sets the CSS property value for the data cell padding.
void
Sets the CSS property value for the data cell text-align.
void
setCellVAlign(VALIGN : String)
Sets the CSS property value for the data cell vertical-align.
void
setCellWrap(WRAP : int)
Sets whether or not the data cellc will support text-wrapping.
void
setDataType(DATATYPE : String)
Sets the data type for this column of data (affects sorting if this column is used for sorting the data); returns ref to self
jsx3.gui.Matrix.Column
setDisplay(DISPLAY : String, bRepaint : boolean)
Sets the display for the object.
void
Sets the identifier for which of the default column formatters should be implemented.
void
setPadding(strCSS : String)
Sets CSS property value(s) for a padding for the header cell.
void
setPath(strPath : String, bSuppressRepaint : boolean)
Sets the selection path for this column of data.
void
Sets whether or not this column can be resized by the user.
void
setSortDataType(DATATYPE : String)
Sets the data type for this column of data (affects sorting if this column is used for sorting the data); returns ref to self
void
setSortPath(strPath : String)
Sets the CDF attribute to use to sort on this column.
jsx3.gui.Matrix.Column
setText(strText : String, bRepaint : boolean)
Sets the text/HTML for the control to be displayed on-screen.
void
setTriggers(strTriggers : String)
Sets one or more named attributes.
void
setVAlign(VALIGN : String)
Sets the CSS property value for the header cell vertical-align.
void
setValueTemplate(TEMPLATE : String)
Sets the user-defined XSL template (xsl:template) that will override the defualt template defined by Column.DEFAULT_VALUE_TEMPLATE.
void
setWidth(vntWidth : String | int, bRepaint : ?)
Sets the Width on the column.
void
Sets whether or not the header cell will support text-wrapping.
Methods Inherited From jsx3.gui.Block
getBackground, getBackgroundColor, getBorder, 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, setCSSOverride, setClassName, setColor, setCursor, setDimensions, setFontName, setFontSize, setFontWeight, setHeight, setIndex, setLeft, setMargin, setOverflow, setRelativePosition, setTagName, setTextAlign, setTip, setTop, setVisibility, 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, getDynamicProperty, getRendered, insertHTML, onAfterPaint, paintChild, paintChildren, recalcBox, removeAttribute, removeAttributes, setAttribute, setDynamicProperty
Methods Inherited From jsx3.app.Model
adoptChild, doClone, findAncestor, findDescendants, getAncestorOfName, getAncestorOfType, getChild, getChildIndex, getChildren, getDescendantOfName, getDescendantsOfType, getFirstChild, getFirstChildOfType, getHelpId, getId, getLastChild, getLoadType, getMetaValue, getNS, getName, getNextSibling, getParent, getPersistence, getPreviousSibling, getServer, getUriResolver, insertBefore, load, loadAndCache, loadXML, onAfterAssemble, onAfterAttach, onBeforeAssemble, onChangeServer, onDestroy, onRemoveChild, onSetChild, onSetParent, removeChild, removeChildren, setChild, setHelpId, setLoadType, setMetaValue, setName, setPersistence, toString, toXML, toXMLDoc
Methods Inherited From jsx3.util.EventDispatcher
publish, subscribe, unsubscribe, unsubscribeAll
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf
Field Detail

DEFAULT_VALIGN

static final String DEFAULT_VALIGN
top

DEFAULT_WIDTH

static int DEFAULT_WIDTH
100

TYPE_NUMBER

static final String TYPE_NUMBER
number

TYPE_TEXT

static final String TYPE_TEXT
text (default)
Constructor Detail

init

void init(strName : String)
instance initializer

Parameters:

strNameunique name distinguishing this object from all other JSX GUI objects in the JSX application
Method Detail

getCanSort

jsx3.Boolean getCanSort()
Returns whether the parent list/grid can be sorted on this column. If no value is provided, the column is assumed sortable unless the parent control explicitly specifies that no column should sort.

Returns:

 

See Also:

jsx3.gui.Matrix.getCanSort()

getCellBackgroundColor

String getCellBackgroundColor()
Returns CSS property value for the data cell background-color.

Returns:

 

getCellBorder

String getCellBorder()
Returns CSS property value for the data cell border.

Returns:

 

getCellColor

String getCellColor()
Returns CSS property value for the data cell color.

Returns:

 

getCellCursor

String getCellCursor()
Returns CSS property value for the data cell cursor.

Returns:

 

getCellFontName

String getCellFontName()
Returns the CSS property value for the data cell font-family.

Returns:

 

getCellFontSize

int getCellFontSize()
Returns the CSS property value for the data cell font-size.

Returns:

 

getCellFontWeight

String getCellFontWeight()
Returns the CSS property value for the data cell font-weight.

Returns:

 

getCellPadding

String getCellPadding()
Returns the CSS property value for the data cell padding.

Returns:

 

getCellTextAlign

String getCellTextAlign()
Returns the CSS property value for the data cell text-align.

Returns:

 

getCellVAlign

String getCellVAlign()
Returns the CSS property value for the data cell vertical-align. If no value is provided, the data cells render top-aligned.

Returns:

 

getCellWrap

int getCellWrap(strDefault : String)
Returns whether or not the data cellc will support text-wrapping. If no value is specified, the text will not wrap

Parameters:

strDefaultThe default value to use if null

Returns:

 

getDataType

String getDataType()
Returns the data type for this column of data (affects sorting if this column is used for sorting the data); valid types include: jsx3.gui.Matrix.Column.TYPE_TEXT and jsx3.gui.Matrix.Column.TYPE_NUMBER

Returns:

data type for this column's data  

getDisplayIndex

int getDisplayIndex()
Returns the zero-based index for ths column in relation to its siblings. This is different from getChildIndex in that it corresponds to the position of this column as rendered on-screen, meaning if a child of a lesser index is not displayed (e.g., display = none), the value returned from this method will be less than what would be returned by getChildIndex. Returns null if this object is not displayed.

Returns:

 

See Also:

jsx3.app.Model.getChildIndex()

getFormatHandler

String getFormatHandler()
Gets the named object that will handle the reformatting of a given column's data cells. This object should implment the interface, jsx3.gui.Matrix.ColumnFormat, or adhere to its APIs. Can also return the function literal

Returns:

named object or function literal 

See Also:

jsx3.gui.Matrix.ColumnFormat

getPath

String getPath()
Returns the selection path for this column of data. Returns 'jsxid' if no path specified

Returns:

selection path  

getResizable

jsx3.Boolean getResizable()
Gets whether or not this column can be resized by the user. If not set, the column will be assumed resizable

Returns:

 

getSortDataType

String getSortDataType()
Returns the data type for this column of data (affects sorting if this column is used for sorting the data).

Returns:

one of: jsx3.gui.Matrix.Column.TYPE_TEXT, jsx3.gui.Matrix.Column.TYPE_NUMBER  

getSortPath

String getSortPath()
Returns the CDF attribute to use to sort on this column. If the sort path has not been set explicitly, this method returns the value of this.getPath(). The data source of the matrix containing this column is sorted on this attribute when the matrix is sorted on this column.

Returns:

 

See Also:

getPath()

getTriggers

String getTriggers()
Returns one or more named attributes. When one of these attributes is updated by another column's edit mask iterface, this column will called to repaint to reflect the updated value

Returns:

Comma-delimited attribute list  

getVAlign

String getVAlign()
Returns the CSS property value for the header cell vertical-align. If no value is provided, the header cell render top-aligned.

Returns:

 

getValueTemplate

String getValueTemplate(strDefault : String)
Gets the user-defined XSL template (xsl:template) that will override the defualt template defined by Column.TEMPLATES.default.

Parameters:

strDefaultxsl:template

Returns:

 

getWrap

jsx3.Boolean getWrap(strDefault : String)
Gets whether or not the header cell will support text-wrapping. If not specified, the cell will be painted with no wrapping.

Parameters:

strDefaultThe default value to use if null

Returns:

 

paint

String paint()
Returns the DHTML, used for this object's on-screen VIEW

Returns:

DHTML  

Overrides:

paint in jsx3.gui.Block

repaint

String repaint()
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:

repaint in jsx3.gui.Painted

See Also:

paint()

setBorder

void setBorder(strCSS : String)
Sets property value(s) for a border for the header cell (solid 1px #000000). Updates are applied immediately

Parameters:

strCSSvalid CSS property value for a border (border: solid 1px #000000) or GI shorthand notation for border

Overrides:

setBorder in jsx3.gui.Block

setCanSort

void setCanSort(SORT : jsx3.Boolean)
Sets whether the parnet list/grid can be sorted on this column. Note that the header row is immediately repainted to reflect the change.

Parameters:

SORT

setCellBackgroundColor

void setCellBackgroundColor(strColor : String)
Sets CSS property value for the data cell background-color. Call repaint on the parent instance to update the view.

Parameters:

strColorvalid CSS property value, (e.g., red, #ff0000, rgb(255,0,0))

setCellBorder

void setCellBorder(strCSS : String, bSuppressRepaint : boolean)
Sets CSS property value(s) for a border for the data cells. Updates MODEL and VIEW (unless repaint is suppressed).

Parameters:

strCSSvalid CSS property value for border. For example: solid 1px red;solid 0px;solid 0px;solid 1px white
bSuppressRepaintPass 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.

setCellColor

void setCellColor(strColor : String)
Sets CSS property value for the data cell color. Call repaint on the parent instance to update the view.

Parameters:

strColorvalid CSS property value, (e.g., red, #ffffff, rgb(255,0,0))

setCellCursor

void setCellCursor(strCursor : String)
Sets CSS property value for the data cell cursor. Call repaint on the parent instance to update the view.

Parameters:

strCursorCSS property value, (e.g., default, wait, col-resize)

setCellFontName

void setCellFontName(strFontName : String)
Sets the CSS property value for the data cell font-family. Call repaint on the parent instance to update the view.

Parameters:

strFontNamevalid CSS font-family property value (e.g., Arial, Courier)

setCellFontSize

void setCellFontSize(intPixelSize : int)
Sets the CSS property value for the data cell font-size. Call repaint on 5,0,0))

setCellBorder

void setCellBorder(strCSS : String, bSuppressRepaint : boolean)
Sets CSS property value(s) for a border for the data cells. Updates MODEL and VIEW (unless repaint is suppressed).

Parameters:

strCSSvalid CSS property value for border. For example: solid 1px red;solid 0px;solid 0px;solid 1px white
bSuppressRepaintPass 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.

setCellColor

void setCellColor(strColor : String)
Sets CSS property value for the data cell color. Call repaint on the parent instance to update the view.

Parameters:

strColorvalid CSS property value, (e.g., red, #ffffff, rgb(255,0,0))

setCellCursor

void setCellCursor(strCursor : String)
Sets CSS property value for the data cell cursor. Call repaint on the parent instance to update the view.

Parameters:

strCursorCSS property value, (e.g., default, wait, col-resize)

setCellFontName

void setCellFontName(strFontName : String)
Sets the CSS property value for the data cell font-family. Call repaint on the parent instance to update the view.

Parameters:

strFontNamevalid CSS font-family property value (e.g., Arial, Courier)

setCellFontSize

void setCellFontSize(intPixelSize : int)
Sets the CSS property value for the data cell font-size. Call repaint on the parent instance to update the view.

Parameters:

intPixelSizefont-size (in pixels)

setCellFontWeight

void setCellFontWeight(FONTWEIGHT : String)
Sets the CSS property value for the data cell font-weight. Call repaint on the parent instance to update the view.

Parameters:

FONTWEIGHTone of: jsx3.gui.Block.FONTBOLD, jsx3.gui.Block.FONTNORMAL

setCellPadding

void setCellPadding(strCSS : String, bSuppressRepaint : boolean)
Sets the CSS property value for the data cell padding. Updates MODEL and VIEW (unless repaint is suppressed).

Parameters:

strCSSvalid CSS property value for padding. For example: 8 4 8 4
bSuppressRepaintPass 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.

setCellTextAlign

void setCellTextAlign(ALIGN : String)
Sets the CSS property value for the data cell text-align. Call repaint on the parent instance to update the view.

Parameters:

ALIGNone of: jsx3.gui.Block.ALIGNLEFT, jsx3.gui.Block.ALIGNRIGHT, jsx3.gui.Block.ALIGNCENTER

setCellVAlign

void setCellVAlign(VALIGN : String)
Sets the CSS property value for the data cell vertical-align. Call repaint on the parent instance to update the view.

Parameters:

VALIGNvalid CSS value for vertical-align style.

setCellWrap

void setCellWrap(WRAP : int)
Sets whether or not the data cellc will support text-wrapping. If no value is specified, the text will not wrap. Call repaint to update the VIEW

Parameters:

WRAPjsx3.Boolean.TRUE or jsx3.Boolean.FALSE

setDataType

void setDataType(DATATYPE : String)
Sets the data type for this column of data (affects sorting if this column is used for sorting the data); returns ref to self

Parameters:

DATATYPEone of: jsx3.gui.Matrix.Column.TYPE_TEXT, jsx3.gui.Matrix.Column.TYPE_NUMBER

setDisplay

jsx3.gui.Matrix.Column setDisplay(DISPLAY : String, bRepaint : boolean)
Sets the display for the object. Note that although the framework uses CSS to apply this setting, the actual values that get set are determined by the system. Only those values listed for the parameter, DISPLAY, are supported as inputs to this function. Calling this method will cause the underlying XSLT for the Matrix parent to be regenerated.

Parameters:

DISPLAYone of jsx3.gui.Block.DISPLAYNONE and jsx3.gui.Block.DISPLAYBLOCK
bRepaintif true, the view of this object is immediately updated.

Returns:

this object  

Overrides:

setDisplay in jsx3.gui.Block

setFormatHandler

void setFormatHandler(handler : String | Function | jsx3.gui.Matrix.ColumnFormat)
Sets the identifier for which of the default column formatters should be implemented. A function literal can also be passed.

Parameters:

handlerincluding @unescape, @lookup, @message, @datetime, @date, @time, and @number. For example: @unescape.

- or -

Function literal with the signature, function(element,cdfkey, matrix, column, rownumber,server). For example:

function(element, cdfkey, matrix, column, rownumber, server) {
  var mf = new jsx3.util.MessageFormat("{0,number,currency}");
  element.innerHTML = mf.format(element.innerHTML);
};

See Also:

jsx3.gui.Matrix.ColumnFormat

setPadding

void setPadding(strCSS : String)
Sets CSS property value(s) for a padding for the header cell. Updates are applied immediately.

Parameters:

strCSSvalid CSS property value for padding. For example: 8 4 8 4

Overrides:

setPadding in jsx3.gui.Block

setPath

void setPath(strPath : String, bSuppressRepaint : boolean)
Sets the selection path for this column of data.

Parameters:

strPathThe name of the attribute For example jsxtext
bSuppressRepaintPass true to stop the default repaint from occurring. Typically property updates that affect the XSLT (such as path) require that the XSLT be regenerated. However, the repaint can be suppressed to avoid unnecessary reparsing of the XSLT during repeated property updates.

setResizable

void setResizable(RESIZE : jsx3.Boolean)
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. Note that the header row is immediately repainted to reflect the change.

Parameters:

RESIZE

setSortDataType

void setSortDataType(DATATYPE : String)
Sets the data type for this column of data (affects sorting if this column is used for sorting the data); returns ref to self

Parameters:

DATATYPEdata type for this column's data. valid types include: jsx3.gui.Matrix.Column.TYPE_TEXT and jsx3.gui.Matrix.Column.TYPE_NUMBER

setSortPath

void setSortPath(strPath : String)
Sets the CDF attribute to use to sort on this column.

Parameters:

strPath

setText

jsx3.gui.Matrix.Column setText(strText : String, bRepaint : boolean)
Sets the text/HTML for the control to be displayed on-screen.

Parameters:

strTexttext/HTML
bRepaintif true, the view of this object is immediately updated, obviating the need to call repaint().

Returns:

 

Overrides:

setText in jsx3.gui.Block

setTriggers

void setTriggers(strTriggers : String)
Sets one or more named attributes. When one of these attributes is updated by another column's edit mask iterface, this column will called to repaint to reflect the updated value

Parameters:

strTriggersComma-delimited attribute list. For example: jsxtext, ssn, phone.

setVAlign

void setVAlign(VALIGN : String)
Sets the CSS property value for the header cell vertical-align. Repaints the header to immediately reflect this change.

Parameters:

VALIGNvalid CSS value for vertical-align style.

setValueTemplate

void setValueTemplate(TEMPLATE : String)
Sets the user-defined XSL template (xsl:template) that will override the defualt template defined by Column.DEFAULT_VALUE_TEMPLATE.
The path wildcard is as follows:

Parameters:

TEMPLATEEither a valid xsl:template or a named system template, including: @default, @empty, @unescape, and @image

setWidth

void setWidth(vntWidth : String | int, bRepaint : ?)
Sets the Width on the column. Immediately updates MODEL and VIEW. Note that if a wilcard is used without Scale Width, it will be replaced with the value of jsx3.gui.Matrix.Column.DEFAULT_WIDTH

Parameters:

vntWidthCan be a valid number (pixel units are implied), a Percent, or a Wildcard. For example: 100, 25%, *
bRepaint

Overrides:

setWidth in jsx3.gui.Block

See Also:

jsx3.gui.Matrix.setScaleWidth()

setWrap

void setWrap(WRAP : jsx3.Boolean)
Sets whether or not the header cell will support text-wrapping. Repaints the header to immediately reflect this change.

Parameters:

WRAP