com.smartgwt.client.types
Enum ListGridFieldType

java.lang.Object
  extended by java.lang.Enum<ListGridFieldType>
      extended by com.smartgwt.client.types.ListGridFieldType
All Implemented Interfaces:
ValueEnum, Serializable, Comparable<ListGridFieldType>

public enum ListGridFieldType
extends Enum<ListGridFieldType>
implements ValueEnum

ListGrids format data for viewing and editing based on the type attribute of the field. This table describes how the ListGrid deals with the various built-in types.


Enum Constant Summary
BINARY
          For viewing, the grid renders a 'view' icon (looking glass) followed by a 'download' icon and then the name of the file is displayed in text.
BOOLEAN
          For viewing and editing a checkbox is shown with a check mark for the true value and no check mark for the false value.
DATE
          Expected to contain Date type data.
FLOAT
          Same as text.
ICON
          Shows field.icon in every cell, and also in the header.
IMAGE
          For viewing, a thumbnail image is rendered in the field.
IMAGEFILE
          Same as binary
INTEGER
          Same as text.
LINK
          For viewing, the field value is rendered as a clickable html link (using an HTML anchor tag: <A>).
SEQUENCE
          Same as text
SUMMARY
          Show a calculated summary based on other field values within the current record.
TEXT
          Simple text rendering for view.
TIME
          Expected to contain Time data encoded in javascript Date objects. Times will be formatted using ${isc.DocUtils.linkForRef('attr:ListGridField.displayFormat')} if specified, otherwise ${isc.DocUtils.linkForRef('attr:ListGrid.timeFormatter')}.
If both these attributes are unset, times are formatted using the standard ${isc.DocUtils.linkForRef('classAttr:Time.shortDisplayFormat','short display format')} for times.
For editing, by default a TimeItem is used.
 
Method Summary
 String getValue()
           
static ListGridFieldType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ListGridFieldType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

TEXT

public static final ListGridFieldType TEXT
Simple text rendering for view. For editing a text entry field is shown. If the length of the field (as specified by the length attribute) is larger than the value specified by longTextEditorThreshold, a text input icon is shown that, when clicked on (or field is focused in) opens a larger editor that expands outside the boundaries of the cell (textarea by default, but overrideable via longTextEditorType.


BOOLEAN

public static final ListGridFieldType BOOLEAN
For viewing and editing a checkbox is shown with a check mark for the true value and no check mark for the false value. See booleanTrueImage for customization.


INTEGER

public static final ListGridFieldType INTEGER
Same as text. Consider setting editorType to use a SpinnerItem.


FLOAT

public static final ListGridFieldType FLOAT
Same as text. Consider setting editorType to use a SpinnerItem.


DATE

public static final ListGridFieldType DATE
Expected to contain Date type data. Dates will be formatted using ${isc.DocUtils.linkForRef('attr:ListGridField.displayFormat')} if specified, otherwise dateFormatter. If both these attributes are unset, dates are formatted using the standard ${isc.DocUtils.linkForRef('classMethod:Date.setShortDisplayFormat','short display format')} for dates.
For editing, by default a DateItem is used with useTextField set to true, providing textual date entry plus a pop-up date picker. The displayFormat and inputFormat for the editor will be picked up from the ListGridField, if specified.


TIME

public static final ListGridFieldType TIME
Expected to contain Time data encoded in javascript Date objects. Times will be formatted using ${isc.DocUtils.linkForRef('attr:ListGridField.displayFormat')} if specified, otherwise ${isc.DocUtils.linkForRef('attr:ListGrid.timeFormatter')}.
If both these attributes are unset, times are formatted using the standard ${isc.DocUtils.linkForRef('classAttr:Time.shortDisplayFormat','short display format')} for times.
For editing, by default a TimeItem is used. The displayFormat for the editor will be picked up from the ListGridField, if specified.


SEQUENCE

public static final ListGridFieldType SEQUENCE
Same as text


LINK

public static final ListGridFieldType LINK
For viewing, the field value is rendered as a clickable html link (using an HTML anchor tag: <A>). The target URL is the value of the field, which is also default display value. You can override the display value by setting linkText or linkText .
Clicking the link opens the URL in a new window by default. To change this behavior, you can set field.target, which works indentically to the target" attribute on an HTML anchor (<A>) tag.
In inline edit mode, this type works like a text field.
To create a link not covered by this feature, consider using ${isc.DocUtils.linkForRef('method:ListGridField.formatCellValue')} along with ${isc.DocUtils.linkForRef('method:Canvas.linkHTML')}, or simply ${isc.DocUtils.linkForRef('method:ListGrid.getCellStyle','styling the field')} to look like a link, and providing interactivity via ${isc.DocUtils.linkForRef('method:ListGridField.recordClick','field.recordClick()')}.


IMAGE

public static final ListGridFieldType IMAGE
For viewing, a thumbnail image is rendered in the field. The URL of the image is the value of the field. If this URL is not absolute, it is assumed to be relative to ${isc.DocUtils.linkForRef('attr:ListGridField.imageURLPrefix')} if specified. The size of the image is controlled by ${isc.DocUtils.linkForRef('attr:ListGridField.imageSize')}, ${isc.DocUtils.linkForRef('attr:ListGridField.imageWidth')}, ${isc.DocUtils.linkForRef('attr:ListGridField.imageHeight')} (and by the similarly-named global default attributes on the ListGrid itself).
You can also specify the following attributes on the field: activeAreaHTML, and extraStuff - these are passed to ${isc.DocUtils.linkForRef('method:Canvas.imgHTML')} to generate the final URL.


ICON

public static final ListGridFieldType ICON
Shows field.icon in every cell, and also in the header. Useful for a field that is used as a button, for example, launches a detail&#010 window or removes a row. Implement a ListGridField.addRecordClickHandler(com.smartgwt.client.widgets.grid.events.RecordClickHandler) #010 to define a behavior for the button.#010 <P>#010 NOTE: for a field that shows different icons depending on the field value, see valueIcons. also defaults to a small field width, accomodating just the icon&#010 with padding, and to a blank header title, so that the header shows the icon only. #010 ListGridField.setIconWidth(Integer) iconWidth} and related properties configure&#010 the size of the icon both in the header and in body cells.#010 cellIcon instead, leaving field.icon null.


BINARY

public static final ListGridFieldType BINARY
For viewing, the grid renders a 'view' icon (looking glass) followed by a 'download' icon and then the name of the file is displayed in text. If the user clicks the 'view' icon, a new browser window is opened and the file is streamed to that browser instance. For images and other file types with known handlers, the content is typically displayed inline - otherwise the browser will ask the user how to handle the content. If the download icon is clicked, the browser opens a 'Save' dialog. There is no inline editing mode for this field type.


IMAGEFILE

public static final ListGridFieldType IMAGEFILE
Same as binary


SUMMARY

public static final ListGridFieldType SUMMARY
Show a calculated summary based on other field values within the current record. * Show a calculated summary based on other field values within the current record. See ListGridField.setRecordSummaryFunction(com.smartgwt.client.widgets.grid.RecordSummaryFunction) for more information.

Method Detail

values

public static ListGridFieldType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ListGridFieldType c : ListGridFieldType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ListGridFieldType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getValue

public String getValue()
Specified by:
getValue in interface ValueEnum