Package 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:
  `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
  Description
  `HeaderLevel()`
  `HeaderLevel(JavaScriptObject jsObj)`
  `HeaderLevel(TimeUnit unit)`
  `HeaderLevel(TimeUnit unit, String[] titles)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Integer`
  `getHeaderWidth()`
  If set, the width for each of the spans in this headerLevel.
  `static HeaderLevel`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `String[]`
  `getTitles()`
  Optional sparse array of titles for the spans on this headerLevel.
  `TimeUnit`
  `getUnit()`
  Unit of time shown at this level of header.
  `HeaderLevel`
  `setHeaderWidth(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.
  `HeaderLevel`
  `setTitles(String... titles)`
  Optional sparse array of titles for the spans on this headerLevel.
  `HeaderLevel`
  `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, getAttributeAsElement, 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 Details

  - ### HeaderLevel

    public HeaderLevel()

  - ### HeaderLevel

    public HeaderLevel(JavaScriptObject jsObj)

  - ### HeaderLevel

    public HeaderLevel(TimeUnit unit)

  - ### HeaderLevel

    public HeaderLevel(TimeUnit unit, String[] titles)

- ## Method Details

  - ### getOrCreateRef

    public static HeaderLevel getOrCreateRef(JavaScriptObject jsObj)

  - ### setHeaderWidth

    public HeaderLevel setHeaderWidth(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
    Returns:
      `HeaderLevel` instance, for chaining setter calls

  - ### getHeaderWidth

    public 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 HeaderLevel setTitles(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
    Returns:
      `HeaderLevel` instance, for chaining setter calls

  - ### getTitles

    public 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 HeaderLevel setUnit(TimeUnit unit)
    Unit of time shown at this level of header.
    Parameters:
      `unit` - New unit value. Default value is null
    Returns:
      `HeaderLevel` instance, for chaining setter calls

  - ### 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