Class HeaderSpan
- All Implemented Interfaces:
HasHandlers
See ListGrid.headerSpans
.
In addition to the properties documented here, all other properties specified on the headerSpan object will be passed to
the create() method of the ListGrid.headerSpanConstructor
. This allows you to set properties such as Button.baseStyle
or StretchImgButton.src
directly in a headerSpan
.
- See Also:
-
Field Summary
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties
-
Constructor Summary
ConstructorDescriptionHeaderSpan
(JavaScriptObject jsObj) HeaderSpan
(String title, String[] fields) -
Method Summary
Modifier and TypeMethodDescriptiongetAlign()
Horizontal alignment of the title of this headerSpan.String[]
List of fields that this header spans.Custom base style to apply to the header button created for this span instead ofListGrid.headerBaseStyle
.Optional title for the headerSpan button for this headerSpan.Custom titleStyle to apply to the header button created for this span instead ofListGrid.headerTitleStyle
.Height of this headerSpan.getName()
Name for this headerSpan, for use in APIs likeListGrid.setHeaderSpanTitle()
.static HeaderSpan
getOrCreateRef
(JavaScriptObject jsObj) getSpans()
This property allows developer to "nest" header spans, grouping fields together by multiple layers of granularity.getTitle()
A title for this headerSpan, to display in the headerSpan button for this headerSpan and in other contexts such as themenu for picking visible fields
.Vertical alignment of the title of this headerSpan.getWrap()
Should the span title wrap if there is not enough space horizontally to accommodate it.Horizontal alignment of the title of this headerSpan.List of fields that this header spans.setHeaderBaseStyle
(String headerBaseStyle) Custom base style to apply to the header button created for this span instead ofListGrid.headerBaseStyle
.void
setHeaderButtonProperties
(Canvas buttonProperties) Set the properties of the header button used for this span.setHeaderTitle
(String headerTitle) Optional title for the headerSpan button for this headerSpan.setHeaderTitleStyle
(String headerTitleStyle) Custom titleStyle to apply to the header button created for this span instead ofListGrid.headerTitleStyle
.Height of this headerSpan.Name for this headerSpan, for use in APIs likeListGrid.setHeaderSpanTitle()
.setSpans
(HeaderSpan... spans) This property allows developer to "nest" header spans, grouping fields together by multiple layers of granularity.A title for this headerSpan, to display in the headerSpan button for this headerSpan and in other contexts such as themenu for picking visible fields
.setValign
(VerticalAlignment valign) Vertical alignment of the title of this headerSpan.Should the span title wrap if there is not enough space horizontally to accommodate it.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
-
Constructor Details
-
HeaderSpan
public HeaderSpan() -
HeaderSpan
-
HeaderSpan
-
-
Method Details
-
getOrCreateRef
-
setAlign
Horizontal alignment of the title of this headerSpan.- Parameters:
align
- New align value. Default value is "center"- Returns:
HeaderSpan
instance, for chaining setter calls
-
getAlign
Horizontal alignment of the title of this headerSpan.- Returns:
- Current align value. Default value is "center"
-
setFields
List of fields that this header spans. Fields should be identified by their value forListGridField.name
.Developers may define multiple levels of header-spans by specifying
spans
however a span cannot be specified with bothfields
andspans
.- Parameters:
fields
- New fields value. Default value is null- Returns:
HeaderSpan
instance, for chaining setter calls
-
getFields
List of fields that this header spans. Fields should be identified by their value forListGridField.name
.Developers may define multiple levels of header-spans by specifying
spans
however a span cannot be specified with bothfields
andspans
.- Returns:
- Current fields value. Default value is null
-
setHeaderBaseStyle
Custom base style to apply to the header button created for this span instead ofListGrid.headerBaseStyle
.Note that depending on the header button constructor, you may have to specify
headerTitleStyle
as well.- Parameters:
headerBaseStyle
- New headerBaseStyle value. Default value is null- Returns:
HeaderSpan
instance, for chaining setter calls- See Also:
-
getHeaderBaseStyle
Custom base style to apply to the header button created for this span instead ofListGrid.headerBaseStyle
.Note that depending on the header button constructor, you may have to specify
headerTitleStyle
as well.- Returns:
- Current headerBaseStyle value. Default value is null
- See Also:
-
setHeaderTitle
Optional title for the headerSpan button for this headerSpan. If specified this will be displayed in the headerSpan button instead oftitle
. Set to an empty string to suppress the title in the header button entirely.- Parameters:
headerTitle
- New headerTitle value. Default value is null- Returns:
HeaderSpan
instance, for chaining setter calls
-
getHeaderTitle
Optional title for the headerSpan button for this headerSpan. If specified this will be displayed in the headerSpan button instead oftitle
. Set to an empty string to suppress the title in the header button entirely.- Returns:
- Current headerTitle value. Default value is null
-
setHeaderTitleStyle
Custom titleStyle to apply to the header button created for this span instead ofListGrid.headerTitleStyle
.Note that this will typically only have an effect if
ListGrid.headerButtonConstructor
is set toStretchImgButton
or a subclass thereof.- Parameters:
headerTitleStyle
- New headerTitleStyle value. Default value is null- Returns:
HeaderSpan
instance, for chaining setter calls- See Also:
-
getHeaderTitleStyle
Custom titleStyle to apply to the header button created for this span instead ofListGrid.headerTitleStyle
.Note that this will typically only have an effect if
ListGrid.headerButtonConstructor
is set toStretchImgButton
or a subclass thereof.- Returns:
- Current headerTitleStyle value. Default value is null
- See Also:
-
setHeight
Height of this headerSpan. Defaults toListGrid.headerSpanHeight
.- Parameters:
height
- New height value. Default value is null- Returns:
HeaderSpan
instance, for chaining setter calls
-
getHeight
Height of this headerSpan. Defaults toListGrid.headerSpanHeight
.- Returns:
- Current height value. Default value is null
-
setName
Name for this headerSpan, for use in APIs likeListGrid.setHeaderSpanTitle()
.Name is optional, but if specified, must be unique for this ListGrid (but not globally unique) as well as a valid JavaScript identifier, as specified by ECMA-262 Section 7.6 (the StringUtil.isValidID() function can be used to test whether a name is a valid JavaScript identifier).
- Parameters:
name
- New name value. Default value is null- Returns:
HeaderSpan
instance, for chaining setter calls- See Also:
-
getName
Name for this headerSpan, for use in APIs likeListGrid.setHeaderSpanTitle()
.Name is optional, but if specified, must be unique for this ListGrid (but not globally unique) as well as a valid JavaScript identifier, as specified by ECMA-262 Section 7.6 (the StringUtil.isValidID() function can be used to test whether a name is a valid JavaScript identifier).
- Returns:
- Current name value. Default value is null
- See Also:
-
setSpans
This property allows developer to "nest" header spans, grouping fields together by multiple layers of granularity.For example a group of fields could be nested within two layers of header spans as follows:
HeaderSpan france = new HeaderSpan("France", new String[] {"Paris", "Lyon"}); HeaderSpan uk = new HeaderSpan("UK", new String[] {"London", "Glasgow"}); HeaderSpan spain = new HeaderSpan("Spain", new String[] {"Barcelona"}); HeaderSpan europe = new HeaderSpan(); europe.setTitle("Europe"); europe.setSpans(france, uk, spain);
Note that a span definition can not include bothspans
andfields
.- Parameters:
spans
- New spans value. Default value is null- Returns:
HeaderSpan
instance, for chaining setter calls
-
getSpans
This property allows developer to "nest" header spans, grouping fields together by multiple layers of granularity.For example a group of fields could be nested within two layers of header spans as follows:
HeaderSpan france = new HeaderSpan("France", new String[] {"Paris", "Lyon"}); HeaderSpan uk = new HeaderSpan("UK", new String[] {"London", "Glasgow"}); HeaderSpan spain = new HeaderSpan("Spain", new String[] {"Barcelona"}); HeaderSpan europe = new HeaderSpan(); europe.setTitle("Europe"); europe.setSpans(france, uk, spain);
Note that a span definition can not include bothspans
andfields
.- Returns:
- Current spans value. Default value is null
-
setTitle
A title for this headerSpan, to display in the headerSpan button for this headerSpan and in other contexts such as themenu for picking visible fields
. Note: if you want to use HTML tags to affect the display of the header, you should do so viaheaderTitle
instead so that other places where the title appears in the UI are not affected. Refer to discussion atListGridField.title
.- Parameters:
title
- New title value. Default value is null- Returns:
HeaderSpan
instance, for chaining setter calls
-
getTitle
A title for this headerSpan, to display in the headerSpan button for this headerSpan and in other contexts such as themenu for picking visible fields
. Note: if you want to use HTML tags to affect the display of the header, you should do so viaheaderTitle
instead so that other places where the title appears in the UI are not affected. Refer to discussion atListGridField.title
.- Returns:
- Current title value. Default value is null
-
setValign
Vertical alignment of the title of this headerSpan.Defaults to listGrid.headerSpanVAlign if unset.
- Parameters:
valign
- New valign value. Default value is null- Returns:
HeaderSpan
instance, for chaining setter calls
-
getValign
Vertical alignment of the title of this headerSpan.Defaults to listGrid.headerSpanVAlign if unset.
- Returns:
- Current valign value. Default value is null
-
setWrap
Should the span title wrap if there is not enough space horizontally to accommodate it. If unset, default behavior is derived fromListGrid.wrapHeaderSpanTitles
. (This is a soft-wrap - if set the title will wrap at word boundaries.)- Parameters:
wrap
- New wrap value. Default value is null- Returns:
HeaderSpan
instance, for chaining setter calls- See Also:
-
getWrap
Should the span title wrap if there is not enough space horizontally to accommodate it. If unset, default behavior is derived fromListGrid.wrapHeaderSpanTitles
. (This is a soft-wrap - if set the title will wrap at word boundaries.)- Returns:
- Current wrap value. Default value is null
- See Also:
-
setHeaderButtonProperties
Set the properties of the header button used for this span. The buttonProperties parameter should be the same class as the headerButtonConstructor for the ListGrid (most commonly Button, ImgButton or StretchImgButton, and typically set up in the load_skin.js file for the loaded theme).- Parameters:
buttonProperties
- the header button properties.
-