本文整理了Java中com.vaadin.v7.ui.Table.setColumnHeaders()
方法的一些代码示例,展示了Table.setColumnHeaders()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setColumnHeaders()
方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称:Table
方法名:setColumnHeaders
[英]Sets the headers of the columns.
The headers match the property id:s given by the set visible column headers. The table must be set in either #COLUMN_HEADER_MODE_EXPLICIT or #COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID mode to show the headers. In the defaults mode any nulls in the headers array are replaced with id.toString() outputs when rendering.
[中]设置列的标题。
标题与“设置可见列标题”给定的属性id相匹配。表格必须设置为#列_标题_模式_显式或#列_标题_模式_显式_默认值_ID模式以显示标题。在默认模式下,在渲染时,headers数组中的任何空值都将替换为id.toString()输出。
代码示例来源:origin: viritin/viritin
public MultiSelectTable<ET> withColumnHeaders(
String... columnNamesForVisibleProperties) {
if (isContainerInitialized()) {
table.setColumnHeaders(columnNamesForVisibleProperties);
} else {
pendingHeaders = columnNamesForVisibleProperties;
// Add headers to temporary indexed container, in case table is initially
// empty
for (String prop : columnNamesForVisibleProperties) {
table.addContainerProperty(prop, String.class, "");
}
}
return this;
}
代码示例来源:origin: viritin/viritin
/**
* Sets the list of options available.
*
* @param list the list of available options
* @return this for fluent configuration
*/
public MultiSelectTable<ET> setOptions(ET... list) {
if (visProps == null) {
table.setContainerDataSource(new ListContainer(optionType, Arrays.
asList(list)));
} else {
table.setContainerDataSource(new ListContainer(optionType, Arrays.
asList(list)), Arrays.asList(
visProps));
}
if (pendingHeaders != null) {
table.setColumnHeaders(pendingHeaders);
}
return this;
}
代码示例来源:origin: viritin/viritin
/**
* Sets the list of options available.
*
* @param list the list of available options
* @return this for fluent configuration
*/
public MultiSelectTable<ET> setOptions(List<ET> list) {
if (visProps == null) {
table.setContainerDataSource(new ListContainer(optionType, list));
} else {
table.setContainerDataSource(new ListContainer(optionType, list), Arrays.asList(
visProps));
}
if (pendingHeaders != null) {
table.setColumnHeaders(pendingHeaders);
}
return this;
}
代码示例来源:origin: OpenNMS/opennms
/**
* Instantiates a new MIB object field.
*
* @param resourceTypes the available resource types
* @param mibGroupEditable true, if the MIB group can be modified
*/
public MibObjField(final List<String> resourceTypes, boolean mibGroupEditable) {
table.addStyleName("light");
table.setVisibleColumns(new Object[] { "oid", "instance", "alias", "type" });
table.setColumnHeaders(new String[] { "OID", "Instance", "Alias", "Type" });
table.setEditable(!isReadOnly());
table.setSelectable(true);
table.setHeight("250px");
table.setWidth("100%");
table.setTableFieldFactory(new MibObjFieldFactory(resourceTypes));
if (mibGroupEditable) {
toolbar.addComponent(add);
toolbar.addComponent(delete);
}
toolbar.setVisible(table.isEditable());
setValidationVisible(true);
}
代码示例来源:origin: OpenNMS/opennms
table.setColumnHeaders(new String[]{"Type", "Value"});
table.setEditable(!isReadOnly());
table.setSelectable(true);
代码示例来源:origin: OpenNMS/opennms
table.setColumnHeaders(new String[]{"Consolidation Function", "XFF", "Steps", "Rows"});
table.setEditable(!isReadOnly());
table.setSelectable(true);
内容来源于网络,如有侵权,请联系作者删除!