public class HeaderSpan extends DataClass
See 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 headerSpanConstructor
. This allows you to set properties such as baseStyle
or 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
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
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.
|
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
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
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.
|
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
- Default value is "center"public Alignment getAlign()
public void setFields(java.lang.String... fields)
name
. Developers may define multiple levels of header-spans
by specifying spans
however a span cannot be specified with
both fields
and spans
.
fields
- Default value is nullpublic java.lang.String[] getFields()
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)
headerBaseStyle
. Note that depending on the header
button constructor, you may have to specify headerTitleStyle
as well.
headerBaseStyle
- See CSSClass
. Default value is nullAppearance overview and related methods
public java.lang.String getHeaderBaseStyle()
headerBaseStyle
. Note that depending on the header
button constructor, you may have to specify headerTitleStyle
as well.
CSSClass
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
- 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)
headerTitleStyle
. Note that this will typically only
have an effect if headerButtonConstructor
is set to StretchImgButton
or a subclass thereof.
headerTitleStyle
- See CSSClass
. Default value is nullsetHeaderBaseStyle(java.lang.String)
,
Appearance overview and related methods
public java.lang.String getHeaderTitleStyle()
headerTitleStyle
. Note that this will typically only
have an effect if headerButtonConstructor
is set to StretchImgButton
or a subclass thereof.
CSSClass
getHeaderBaseStyle()
,
Appearance overview and related methods
public void setHeight(java.lang.Integer height)
headerSpanHeight
.height
- Default value is nullpublic java.lang.Integer getHeight()
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
- Default value is nullpublic 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).
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
- 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 title
.title
- 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 title
.public void setValign(VerticalAlignment valign)
Defaults to listGrid.headerSpanVAlign if unset.
valign
- Default value is nullpublic VerticalAlignment getValign()
Defaults to listGrid.headerSpanVAlign if unset.
public void setHeaderButtonProperties(Canvas buttonProperties)
buttonProperties
- the header button properties.