|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.widgets.grid.HeaderSpan
public class HeaderSpan
A header span appears as a second level of headers in a ListGrid, spanning one or more ListGrid columns and their associated headers.
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
.
Field Summary |
---|
Fields inherited from class com.smartgwt.client.core.JsObject |
---|
jsObj |
Constructor Summary | |
---|---|
HeaderSpan()
|
|
HeaderSpan(JavaScriptObject jsObj)
|
|
HeaderSpan(String title,
String[] fields)
|
Method Summary | |
---|---|
Alignment |
getAlign()
Horizontal alignment of the title of this headerSpan. |
String[] |
getFields()
List of fields that this header spans. |
String |
getHeaderTitle()
Optional title for the headerSpan button for this headerSpan. |
Integer |
getHeight()
Height of this headerSpan. |
String |
getName()
Name for this headerSpan, for use in APIs like ListGrid.setHeaderSpanTitle . |
static HeaderSpan |
getOrCreateRef(JavaScriptObject jsObj)
|
HeaderSpan[] |
getSpans()
This property allows developer to "nest" header spans, grouping fields together by multiple layers of granularity. |
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(String... fields)
List of fields that this header spans. |
void |
setHeaderTitle(String headerTitle)
Optional title for the headerSpan button for this headerSpan. |
void |
setHeight(Integer height)
Height of this headerSpan. |
void |
setJavaScriptObject(JavaScriptObject jsObj)
|
void |
setName(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(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. |
Methods inherited from class com.smartgwt.client.core.JsObject |
---|
isCreated, setJsObj |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HeaderSpan()
public HeaderSpan(JavaScriptObject jsObj)
public HeaderSpan(String title, String[] fields)
Method Detail |
---|
public static HeaderSpan getOrCreateRef(JavaScriptObject jsObj)
public void setJavaScriptObject(JavaScriptObject jsObj)
public void setAlign(Alignment align)
align
- align Default value is "center"public Alignment getAlign()
public void setFields(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
- . See String
. Default value is nullpublic 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
.
String
public void setHeaderTitle(String headerTitle)
title
. Set to an empty string to suppress
the title in the header button entirely.
headerTitle
- . See String
. Default value is nullpublic String getHeaderTitle()
title
. Set to an empty string to suppress
the title in the header button entirely.
String
public void setHeight(Integer height)
headerSpanHeight
.
height
- height Default value is nullpublic Integer getHeight()
headerSpanHeight
.
public void setName(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
- . See String
. Default value is nullpublic 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).
String
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
- 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(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
- . See String
. Default value is nullpublic 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
.
String
public void setValign(VerticalAlignment valign)
Defaults to listGrid.headerSpanVAlign if unset.
valign
- valign Default value is nullpublic VerticalAlignment getValign()
Defaults to listGrid.headerSpanVAlign if unset.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |