public class HeaderSpan extends DataClass
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
.
factoryCreated, factoryProperties
Constructor and Description |
---|
HeaderSpan() |
HeaderSpan(com.google.gwt.core.client.JavaScriptObject jsObj) |
HeaderSpan(java.lang.String title,
java.lang.String[] fields) |
Modifier and Type | Method and Description |
---|---|
Alignment |
getAlign()
Horizontal alignment of the title of this headerSpan.
|
java.lang.String[] |
getFields()
List of fields that this header spans.
|
java.lang.String |
getHeaderBaseStyle()
Custom base style to apply to the header button created for this span instead of
ListGrid.headerBaseStyle . |
java.lang.String |
getHeaderTitle()
Optional title for the headerSpan button for this headerSpan.
|
java.lang.String |
getHeaderTitleStyle()
Custom titleStyle to apply to the header button created for this span instead of
ListGrid.headerTitleStyle . |
java.lang.Integer |
getHeight()
Height of this headerSpan.
|
java.lang.String |
getName()
Name for this headerSpan, for use in APIs like
ListGrid.setHeaderSpanTitle() . |
static HeaderSpan |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
HeaderSpan[] |
getSpans()
This property allows developer to "nest" header spans, grouping fields together by
multiple layers of granularity.
|
java.lang.String |
getTitle()
A title for this headerSpan, to display in the headerSpan button for this headerSpan and in other contexts such as the
menu for picking visible fields . |
VerticalAlignment |
getValign()
Vertical alignment of the title of this headerSpan.
|
java.lang.Boolean |
getWrap()
Should the span title wrap if there is not enough space horizontally to accommodate it.
|
void |
setAlign(Alignment align)
Horizontal alignment of the title of this headerSpan.
|
void |
setFields(java.lang.String... fields)
List of fields that this header spans.
|
void |
setHeaderBaseStyle(java.lang.String headerBaseStyle)
Custom base style to apply to the header button created for this span instead of
ListGrid.headerBaseStyle . |
void |
setHeaderButtonProperties(Canvas buttonProperties)
Set the properties of the header button used for this span.
|
void |
setHeaderTitle(java.lang.String headerTitle)
Optional title for the headerSpan button for this headerSpan.
|
void |
setHeaderTitleStyle(java.lang.String headerTitleStyle)
Custom titleStyle to apply to the header button created for this span instead of
ListGrid.headerTitleStyle . |
void |
setHeight(java.lang.Integer height)
Height of this headerSpan.
|
void |
setName(java.lang.String name)
Name for this headerSpan, for use in APIs like
ListGrid.setHeaderSpanTitle() . |
void |
setSpans(HeaderSpan... spans)
This property allows developer to "nest" header spans, grouping fields together by
multiple layers of granularity.
|
void |
setTitle(java.lang.String title)
A title for this headerSpan, to display in the headerSpan button for this headerSpan and in other contexts such as the
menu for picking visible fields . |
void |
setValign(VerticalAlignment valign)
Vertical alignment of the title of this headerSpan.
|
void |
setWrap(java.lang.Boolean wrap)
Should the span title wrap if there is not enough space horizontally to accommodate it.
|
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
public HeaderSpan()
public HeaderSpan(com.google.gwt.core.client.JavaScriptObject jsObj)
public HeaderSpan(java.lang.String title, java.lang.String[] fields)
public static HeaderSpan getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public void setAlign(Alignment align)
align
- New align value. Default value is "center"public Alignment getAlign()
public void setFields(java.lang.String... fields)
ListGridField.name
. Developers may define multiple levels of
header-spans by specifying spans
however a span cannot be
specified with both fields
and spans
.
fields
- New fields value. Default value is nullpublic java.lang.String[] getFields()
ListGridField.name
. Developers may define multiple levels of
header-spans by specifying spans
however a span cannot be
specified with both fields
and spans
.
public void setHeaderBaseStyle(java.lang.String headerBaseStyle)
ListGrid.headerBaseStyle
. Note that depending on the
header button constructor, you may have to specify headerTitleStyle
as well.
headerBaseStyle
- New headerBaseStyle value. Default value is nullCSSStyleName
,
Appearance overview and related methods
public java.lang.String getHeaderBaseStyle()
ListGrid.headerBaseStyle
. Note that depending on the
header button constructor, you may have to specify headerTitleStyle
as well.
CSSStyleName
,
Appearance overview and related methods
public void setHeaderTitle(java.lang.String headerTitle)
title
. Set to an empty string to suppress
the title in the header button entirely.headerTitle
- New headerTitle value. Default value is nullpublic java.lang.String getHeaderTitle()
title
. Set to an empty string to suppress
the title in the header button entirely.public void setHeaderTitleStyle(java.lang.String headerTitleStyle)
ListGrid.headerTitleStyle
. Note that this will
typically only have an effect if ListGrid.headerButtonConstructor
is set to StretchImgButton
or a subclass thereof.
headerTitleStyle
- New headerTitleStyle value. Default value is nullsetHeaderBaseStyle(java.lang.String)
,
CSSStyleName
,
Appearance overview and related methods
public java.lang.String getHeaderTitleStyle()
ListGrid.headerTitleStyle
. Note that this will
typically only have an effect if ListGrid.headerButtonConstructor
is set to StretchImgButton
or a subclass thereof.
getHeaderBaseStyle()
,
CSSStyleName
,
Appearance overview and related methods
public void setHeight(java.lang.Integer height)
ListGrid.headerSpanHeight
.height
- New height value. Default value is nullpublic java.lang.Integer getHeight()
ListGrid.headerSpanHeight
.public void setName(java.lang.String name)
ListGrid.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).
name
- New name value. Default value is nullIdentifier
public java.lang.String getName()
ListGrid.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).
Identifier
public void setSpans(HeaderSpan... spans)
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 both
spans
and fields
.spans
- New spans value. Default value is nullpublic HeaderSpan[] getSpans()
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 both
spans
and fields
.public void setTitle(java.lang.String title)
menu for picking visible fields
. Note: if you want to
use HTML tags to affect the display of the header, you should do so via headerTitle
instead so that other places where the title
appears in the UI are not affected. Refer to discussion at ListGridField.title
.title
- New title value. Default value is nullpublic java.lang.String getTitle()
menu for picking visible fields
. Note: if you want to
use HTML tags to affect the display of the header, you should do so via headerTitle
instead so that other places where the title
appears in the UI are not affected. Refer to discussion at ListGridField.title
.public void setValign(VerticalAlignment valign)
Defaults to listGrid.headerSpanVAlign if unset.
valign
- New valign value. Default value is nullpublic VerticalAlignment getValign()
Defaults to listGrid.headerSpanVAlign if unset.
public void setWrap(java.lang.Boolean wrap)
ListGrid.wrapHeaderSpanTitles
.
(This is a soft-wrap - if set the title will wrap at word boundaries.)wrap
- New wrap value. Default value is nullListGridField.setWrap(java.lang.Boolean)
public java.lang.Boolean getWrap()
ListGrid.wrapHeaderSpanTitles
.
(This is a soft-wrap - if set the title will wrap at word boundaries.)ListGridField.getWrap()
public void setHeaderButtonProperties(Canvas buttonProperties)
buttonProperties
- the header button properties.