com.smartgwt.client.widgets.viewer
Class DetailViewerField

java.lang.Object
  extended by com.smartgwt.client.core.JsObject
      extended by com.smartgwt.client.core.DataClass
          extended by com.smartgwt.client.widgets.viewer.DetailViewerField

public class DetailViewerField
extends DataClass

An object literal with a particular set of properties used to configure the display of and interaction with the rows of a DetailViewer.


Field Summary
 
Fields inherited from class com.smartgwt.client.core.JsObject
jsObj
 
Constructor Summary
DetailViewerField()
           
DetailViewerField(com.google.gwt.core.client.JavaScriptObject jsObj)
           
DetailViewerField(java.lang.String name)
           
DetailViewerField(java.lang.String name, java.lang.String title)
           
 
Method Summary
 java.lang.String getCellStyle()
          Return the cellStyle.
 java.lang.Integer getHeight()
          For type: "separator", this attribute specifies the height of the separator.
 java.lang.Integer getImageHeight()
          Height of image shown for fieldTypes image in this field.
 java.lang.Integer getImageSize()
          Size of images shown for fieldTypes image in this field.
 java.lang.String getImageURLPrefix()
          If this field has type set to "image" and the URL for the image displayed is not absolute, the path of the URL will be relative to this string
 java.lang.Integer getImageWidth()
          Width of images shown for fieldTypes image in this field.
 java.lang.String getName()
           
static DetailViewerField getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
           
 java.lang.String getTitle()
          The title of the field as displayed on the left-hand side.
 java.lang.String getType()
          Specifies the type of this DetailViewerField.
 java.lang.String getValue()
          When a field specifies its type to be "header", the value of this attribute specifies the header text.
 void setCellStyle(java.lang.String cellStyle)
          Set the cellStyle.
 void setCellStyleHandler(CellStyleHandler handler)
          Return the CSS class for a cell.
 void setDetailFormatter(DetailFormatter formatter)
           
 void setHeight(java.lang.Integer height)
          For type: "separator", this attribute specifies the height of the separator.
 void setImageHeight(java.lang.Integer imageHeight)
          Height of image shown for fieldTypes image in this field.
 void setImageSize(java.lang.Integer imageSize)
          Size of images shown for fieldTypes image in this field.
 void setImageURLPrefix(java.lang.String imageURLPrefix)
          If this field has type set to "image" and the URL for the image displayed is not absolute, the path of the URL will be relative to this string
 void setImageWidth(java.lang.Integer imageWidth)
          Width of images shown for fieldTypes image in this field.
 void setName(java.lang.String name)
           
 void setShowIfCondition(DetailViewerFieldIfFunction showIf)
          If specified on a field, this method is evaluated at draw time to determine whether or not to show this particular field.
 void setTitle(java.lang.String title)
          The title of the field as displayed on the left-hand side.
 void setType(java.lang.String type)
          Specifies the type of this DetailViewerField.
 void setValue(java.lang.String value)
          When a field specifies its type to be "header", the value of this attribute specifies the header text.
 void setValueMap(java.util.Map valueMap)
          A property list (or an expression that evaluates to a property list) specifying a mapping of internal values to display values for the field (row).
 
Methods inherited from class com.smartgwt.client.core.DataClass
doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsObject, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute
 
Methods inherited from class com.smartgwt.client.core.JsObject
isCreated, setJsObj
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DetailViewerField

public DetailViewerField()

DetailViewerField

public DetailViewerField(com.google.gwt.core.client.JavaScriptObject jsObj)

DetailViewerField

public DetailViewerField(java.lang.String name)

DetailViewerField

public DetailViewerField(java.lang.String name,
                         java.lang.String title)
Method Detail

getOrCreateRef

public static DetailViewerField getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

setImageSize

public void setImageSize(java.lang.Integer imageSize)
Size of images shown for fieldTypes image in this field.

If set to a String, assumed to be a property on each record that specifies the image height. For example, if field.imageSize is "logoSize", record.logoSize will control the size of the image.

Parameters:
imageSize - imageSize Default value is null

getImageSize

public java.lang.Integer getImageSize()
Size of images shown for fieldTypes image in this field.

If set to a String, assumed to be a property on each record that specifies the image height. For example, if field.imageSize is "logoSize", record.logoSize will control the size of the image.

Returns:
Integer

setImageWidth

public void setImageWidth(java.lang.Integer imageWidth)
Width of images shown for fieldTypes image in this field.

If set to a String, assumed to be a property on each record that specifies the image width. For example, if field.imageWidth is "logoWidth", record.logoWidth will control the width of the image.

Parameters:
imageWidth - imageWidth Default value is null

getImageWidth

public java.lang.Integer getImageWidth()
Width of images shown for fieldTypes image in this field.

If set to a String, assumed to be a property on each record that specifies the image width. For example, if field.imageWidth is "logoWidth", record.logoWidth will control the width of the image.

Returns:
Integer

setImageHeight

public void setImageHeight(java.lang.Integer imageHeight)
Height of image shown for fieldTypes image in this field.

If set to a String, assumed to be a property on each record that specifies the image height. For example, if field.imageHeight is "logoHeight", record.logoHeight will control the height of the image.

Parameters:
imageHeight - imageHeight Default value is null

getImageHeight

public java.lang.Integer getImageHeight()
Height of image shown for fieldTypes image in this field.

If set to a String, assumed to be a property on each record that specifies the image height. For example, if field.imageHeight is "logoHeight", record.logoHeight will control the height of the image.

Returns:
Integer

setImageURLPrefix

public void setImageURLPrefix(java.lang.String imageURLPrefix)
If this field has type set to "image" and the URL for the image displayed is not absolute, the path of the URL will be relative to this string

Note : This is an advanced setting

Parameters:
imageURLPrefix - imageURLPrefix Default value is null

getImageURLPrefix

public java.lang.String getImageURLPrefix()
If this field has type set to "image" and the URL for the image displayed is not absolute, the path of the URL will be relative to this string

Returns:
String

setType

public void setType(java.lang.String type)
Specifies the type of this DetailViewerField. By default (value is null) the field shows a field title on the left and the field value on the right. There are two special values for this attribute:

Parameters:
type - type Default value is null

getType

public java.lang.String getType()
Specifies the type of this DetailViewerField. By default (value is null) the field shows a field title on the left and the field value on the right. There are two special values for this attribute:

Returns:
String

setTitle

public void setTitle(java.lang.String title)
The title of the field as displayed on the left-hand side. If left unspecified, the title of the field is derived by looking up the value of fieldIdProperty on this field. So, by default, the title of a field is the value of its "name" property.

Parameters:
title - title Default value is null

getTitle

public java.lang.String getTitle()
The title of the field as displayed on the left-hand side. If left unspecified, the title of the field is derived by looking up the value of fieldIdProperty on this field. So, by default, the title of a field is the value of its "name" property.

Returns:
String

setValue

public void setValue(java.lang.String value)
When a field specifies its type to be "header", the value of this attribute specifies the header text.

Parameters:
value - value Default value is "undefined"

getValue

public java.lang.String getValue()
When a field specifies its type to be "header", the value of this attribute specifies the header text.

Returns:
String

setHeight

public void setHeight(java.lang.Integer height)
For type: "separator", this attribute specifies the height of the separator.

Parameters:
height - height Default value is null

getHeight

public java.lang.Integer getHeight()
For type: "separator", this attribute specifies the height of the separator.

Returns:
Integer

setCellStyle

public void setCellStyle(java.lang.String cellStyle)
Set the cellStyle.

Parameters:
cellStyle - the cellStyle

getCellStyle

public java.lang.String getCellStyle()
Return the cellStyle.

Returns:
the cellStyle

setName

public void setName(java.lang.String name)

getName

public java.lang.String getName()

setValueMap

public void setValueMap(java.util.Map valueMap)
A property list (or an expression that evaluates to a property list) specifying a mapping of internal values to display values for the field (row).

Parameters:
valueMap - valueMap Default value is null

setShowIfCondition

public void setShowIfCondition(DetailViewerFieldIfFunction showIf)
If specified on a field, this method is evaluated at draw time to determine whether or not to show this particular field.

This method can be specified either as a function or a string that will be auto-converted to a function.


setDetailFormatter

public void setDetailFormatter(DetailFormatter formatter)

setCellStyleHandler

public void setCellStyleHandler(CellStyleHandler handler)
Return the CSS class for a cell. Not implemented by default. The state of the record is indicated by adding a suffix to the base style. There are three independant boolean states, which are combined in the order given:
  1. "Selected" : whether cell is selected; enable by passing a Selection object as "selection"
  2. "Over" : mouse is over this cell; enable with showRollovers
  3. "Down" : mouse button is down over this cell
For example, with a baseStyle of "myCell", a cell which is selected, which the mouse is over, will get a styleName of myCellSelectedOver.

Cell Styles customizable by: