Package com.smartgwt.client.data
Class TextExportSettings
java.lang.Object
com.smartgwt.client.core.BaseClass
com.smartgwt.client.data.TextSettings
com.smartgwt.client.data.TextExportSettings
- All Implemented Interfaces:
HasHandlers
Settings for use with
DataSource.recordsAsText()
.-
Field Summary
Fields inherited from class com.smartgwt.client.core.BaseClass
config, configOnly, factoryCreated, factoryProperties, id, scClassName
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Format to use when outputting date values.Format to use when outputting datetime values.If set, all text fields will use the indicatedForceTextApproach
unless they have a specific setting forDataSourceField.exportForceText
.Separator between Records.Text to export for a field with a null value.static TextExportSettings
getOrCreateRef
(JavaScriptObject jsObj) Whether to surround each value with quotes ("").Format to use when outputting time values.Whether to convert each field's value to the corresponding display value for export.setDateFormat
(DateDisplayFormat dateFormat) Format to use when outputting date values.setDateTimeFormat
(DateDisplayFormat dateTimeFormat) Format to use when outputting datetime values.setForceText
(ForceTextApproach forceText) If set, all text fields will use the indicatedForceTextApproach
unless they have a specific setting forDataSourceField.exportForceText
.setLineSeparator
(String lineSeparator) Separator between Records.setNullValueText
(String nullValueText) Text to export for a field with a null value.setQuoteValues
(Boolean quoteValues) Whether to surround each value with quotes ("").setTimeFormat
(TimeDisplayFormat timeFormat) Format to use when outputting time values.setUseDisplayValue
(Boolean useDisplayValue) Whether to convert each field's value to the corresponding display value for export.Methods inherited from class com.smartgwt.client.data.TextSettings
getEscapingMode, getFieldList, getFieldSeparator, getJsObj, getOrCreateJsObj, isCreated, setEscapingMode, setFieldList, setFieldSeparator, setJavaScriptObject
Methods inherited from class com.smartgwt.client.core.BaseClass
addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, asSGWTComponent, clearDynamicProperty, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getRef, getRuleScope, getScClassName, getTestInstance, hasAutoAssignedID, hasDynamicProperty, internalSetID, internalSetID, isConfigOnly, isFactoryCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setFactoryCreated, setID, setProperty, setProperty, setProperty, setProperty, setRuleScope, setScClassName
-
Constructor Details
-
TextExportSettings
public TextExportSettings() -
TextExportSettings
-
-
Method Details
-
getOrCreateRef
-
create
- Overrides:
create
in classTextSettings
-
setDateFormat
Format to use when outputting date values. Default is to use the format expected by Microsoft Excel (eg 1-2-2011), which Excel will turn into a real date value (seeExcelPasting
). The current month-day-year order as set byDateUtil.setInputFormat()
will be used.- Parameters:
dateFormat
- New dateFormat value. Default value is null- Returns:
TextExportSettings
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getDateFormat
Format to use when outputting date values. Default is to use the format expected by Microsoft Excel (eg 1-2-2011), which Excel will turn into a real date value (seeExcelPasting
). The current month-day-year order as set byDateUtil.setInputFormat()
will be used.- Returns:
- Current dateFormat value. Default value is null
-
setDateTimeFormat
public TextExportSettings setDateTimeFormat(DateDisplayFormat dateTimeFormat) throws IllegalStateException Format to use when outputting datetime values. Default is to combine the configured date and time formats with a space (" ").- Parameters:
dateTimeFormat
- New dateTimeFormat value. Default value is null- Returns:
TextExportSettings
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getDateTimeFormat
Format to use when outputting datetime values. Default is to combine the configured date and time formats with a space (" ").- Returns:
- Current dateTimeFormat value. Default value is null
-
setForceText
If set, all text fields will use the indicatedForceTextApproach
unless they have a specific setting forDataSourceField.exportForceText
.- Parameters:
forceText
- New forceText value. Default value is null- Returns:
TextExportSettings
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getForceText
If set, all text fields will use the indicatedForceTextApproach
unless they have a specific setting forDataSourceField.exportForceText
.- Returns:
- Current forceText value. Default value is null
-
setLineSeparator
Separator between Records. Default is a newline character ("\n").- Overrides:
setLineSeparator
in classTextSettings
- Parameters:
lineSeparator
- New lineSeparator value. Default value is "\n"- Returns:
TextExportSettings
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getLineSeparator
Separator between Records. Default is a newline character ("\n").- Overrides:
getLineSeparator
in classTextSettings
- Returns:
- Current lineSeparator value. Default value is "\n"
-
setNullValueText
Text to export for a field with a null value. If this property is null, then null fields will be assumed to have the default value for their field type.- Parameters:
nullValueText
- New nullValueText value. Default value is ""- Returns:
TextExportSettings
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getNullValueText
Text to export for a field with a null value. If this property is null, then null fields will be assumed to have the default value for their field type.- Returns:
- Current nullValueText value. Default value is ""
-
setQuoteValues
Whether to surround each value with quotes ("").- Parameters:
quoteValues
- New quoteValues value. Default value is true- Returns:
TextExportSettings
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getQuoteValues
Whether to surround each value with quotes ("").- Returns:
- Current quoteValues value. Default value is true
-
setTimeFormat
Format to use when outputting time values. Default is 24 hour time.- Parameters:
timeFormat
- New timeFormat value. Default value is null- Returns:
TextExportSettings
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getTimeFormat
Format to use when outputting time values. Default is 24 hour time.- Returns:
- Current timeFormat value. Default value is null
-
setUseDisplayValue
Whether to convert each field's value to the corresponding display value for export. Default of false will directly export the field's value.- Parameters:
useDisplayValue
- New useDisplayValue value. Default value is false- Returns:
TextExportSettings
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the underlying component has been created
-
getUseDisplayValue
Whether to convert each field's value to the corresponding display value for export. Default of false will directly export the field's value.- Returns:
- Current useDisplayValue value. Default value is false
-