com.smartgwt.client.widgets.calendar

## Class HeaderLevel

- java.lang.Object
- - com.smartgwt.client.core.JsObject
  - - com.smartgwt.client.core.DataClass
    - - com.smartgwt.client.core.RefDataClass
      - - com.smartgwt.client.widgets.calendar.HeaderLevel

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

      public class HeaderLevel
      extends RefDataClass

  Defines one level of headers shown above the event area in a `Timeline`.

- - ### Field Summary

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

      `id`

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

      `factoryCreated, factoryProperties`

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

      `jsObj`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HeaderLevel()`
    `HeaderLevel(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `HeaderLevel(TimeUnit unit)`
    `HeaderLevel(TimeUnit unit, java.lang.String[] titles)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Integer` | `getHeaderWidth()` If set, the width for each of the spans in this headerLevel.
    `static HeaderLevel` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `java.lang.String[]` | `getTitles()` Optional sparse array of titles for the spans on this headerLevel.
    `TimeUnit` | `getUnit()` Unit of time shown at this level of header.
    `void` | `setHeaderWidth(java.lang.Integer headerWidth)` If set, the width for each of the spans in this headerLevel.
    `void` | `setHoverCustomizer(HeaderLevelHoverCustomizer customizer)` Customize the Hover text for a given span in a HeaderLevel.
    `void` | `setTitleFormatter(HeaderLevelTitleCustomizer customizer)` Customize the Title text for a given span in a HeaderLevel.
    `void` | `setTitles(java.lang.String... titles)` Optional sparse array of titles for the spans on this headerLevel.
    `void` | `setUnit(TimeUnit unit)` Unit of time shown at this level of header.

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

      `getRef, getRef, internalSetID`

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

      `applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated`

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

      `equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj`

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

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

- - ### Constructor Detail

    - #### HeaderLevel

          public HeaderLevel()

    - #### HeaderLevel

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

    - #### HeaderLevel

          public HeaderLevel(TimeUnit unit)

    - #### HeaderLevel

          public HeaderLevel(TimeUnit unit,
                             java.lang.String[] titles)

  - ### Method Detail

    - #### getOrCreateRef

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

    - #### setHeaderWidth

          public void setHeaderWidth(java.lang.Integer headerWidth)

      If set, the width for each of the spans in this headerLevel. Note that this setting only has an effect on the innermost headerLevel.
      Parameters:
        `headerWidth` - New headerWidth value. Default value is null

    - #### getHeaderWidth

          public java.lang.Integer getHeaderWidth()

      If set, the width for each of the spans in this headerLevel. Note that this setting only has an effect on the innermost headerLevel.
      Returns:
        Current headerWidth value. Default value is null

    - #### setTitles

          public void setTitles(java.lang.String... titles)

      Optional sparse array of titles for the spans on this headerLevel. If a given span in this headerLevel has a corresponding entry in this array, it will be used as the span's title.

      If not specified, default titles are generated (eg "Q1" for unit "quarter") and then passed into the `formatter function`, if one has been installed, for further customization.

      Parameters:
        `titles` - New titles value. Default value is null

    - #### getTitles

          public java.lang.String[] getTitles()

      Optional sparse array of titles for the spans on this headerLevel. If a given span in this headerLevel has a corresponding entry in this array, it will be used as the span's title.

      If not specified, default titles are generated (eg "Q1" for unit "quarter") and then passed into the `formatter function`, if one has been installed, for further customization.

      Returns:
        Current titles value. Default value is null

    - #### setUnit

          public void setUnit(TimeUnit unit)

      Unit of time shown at this level of header.
      Parameters:
        `unit` - New unit value. Default value is null

    - #### getUnit

          public TimeUnit getUnit()

      Unit of time shown at this level of header.
      Returns:
        Current unit value. Default value is null

    - #### setTitleFormatter

          public void setTitleFormatter(HeaderLevelTitleCustomizer customizer)

      Customize the Title text for a given span in a HeaderLevel.
      Parameters:
        `headerLevel` - HeaderLevel a reference to this headerLevel
        `startDate` - Date the start of the date-range covered by this span in this level
        `endDate` - Date the end of the date-range covered by this span in this level - may be null
        `defaultValue` - String the default title as generated by the Timeline
        `calendar` - Calendar a reference to the Calendar or Timeline

    - #### setHoverCustomizer

          public void setHoverCustomizer(HeaderLevelHoverCustomizer customizer)

      Customize the Hover text for a given span in a HeaderLevel.
      Parameters:
        `headerLevel` - HeaderLevel a reference to this headerLevel
        `startDate` - Date the start of the date-range covered by this span in this level
        `endDate` - Date the end of the date-range covered by this span in this level - may be null
        `defaultValue` - String the default hover text as generated by the Timeline
        `calendarView` - CalendarView a reference to the CalendarView the headerLevel is in