com.smartgwt.client.data

## Class TextImportSettings

- java.lang.Object
- - com.smartgwt.client.core.BaseClass
  - - com.smartgwt.client.data.TextSettings
    - - com.smartgwt.client.data.TextImportSettings

- All Implemented Interfaces:
    com.google.gwt.event.shared.HasHandlers

      public class TextImportSettings
      extends TextSettings

  Settings for use with `DataSource.recordsFromText()`.

- - ### Field Summary

    - ### Fields inherited from class com.smartgwt.client.core.BaseClass

      `config, configOnly, factoryCreated, factoryProperties, id, scClassName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TextImportSettings()`
    `TextImportSettings(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.google.gwt.core.client.JavaScriptObject` | `create()`
    `java.lang.Boolean` | `getHasHeaderLine()` If set to true, the data is assumed to have a header line that lists titles for each field, which should be parsed.
    `static TextImportSettings` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `void` | `setHasHeaderLine(java.lang.Boolean hasHeaderLine)` If set to true, the data is assumed to have a header line that lists titles for each field, which should be parsed.

    - ### Methods inherited from class com.smartgwt.client.data.TextSettings

      `getEscapingMode, getFieldList, getFieldSeparator, getJsObj, getLineSeparator, getOrCreateJsObj, isCreated, setEscapingMode, setFieldList, setFieldSeparator, setJavaScriptObject, setLineSeparator`

    - ### Methods inherited from class com.smartgwt.client.core.BaseClass

      `applyFactoryProperties, asSGWTComponent, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getRef, getScClassName, getTestInstance, hasAutoAssignedID, 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, setScClassName`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TextImportSettings

          public TextImportSettings()

    - #### TextImportSettings

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

  - ### Method Detail

    - #### getOrCreateRef

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

    - #### create

          public com.google.gwt.core.client.JavaScriptObject create()

      Overrides:
        `create` in class `TextSettings`

    - #### setHasHeaderLine

          public void setHasHeaderLine(java.lang.Boolean hasHeaderLine)
                                throws java.lang.IllegalStateException

      If set to true, the data is assumed to have a header line that lists titles for each field, which should be parsed.

      `recordsFromText` will then try to find a same-named DataSourceField by checking parsed titles against both `DataSourceField.title` and `DataSourceField.name` (titles first), doing a case-insensitive comparison with any leading or trailing whitespace removed from the title. If no field matches, data will appear in the returned Records under the exact title parsed from the header line.

      If this approach will not find appropriate DataSourceFields, parse the header line before calling `recordsFromText()`, and provide the list of field names to use when parsing data as `TextSettings.fieldList`.

      Parameters:
        `hasHeaderLine` - New hasHeaderLine value. Default value is false
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getHasHeaderLine

          public java.lang.Boolean getHasHeaderLine()

      If set to true, the data is assumed to have a header line that lists titles for each field, which should be parsed.

      `recordsFromText` will then try to find a same-named DataSourceField by checking parsed titles against both `DataSourceField.title` and `DataSourceField.name` (titles first), doing a case-insensitive comparison with any leading or trailing whitespace removed from the title. If no field matches, data will appear in the returned Records under the exact title parsed from the header line.

      If this approach will not find appropriate DataSourceFields, parse the header line before calling `recordsFromText()`, and provide the list of field names to use when parsing data as `TextSettings.fieldList`.

      Returns:
        Current hasHeaderLine value. Default value is false