com.vaadin.v7.ui.Table.setColumnExpandRatio()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(151)

本文整理了Java中com.vaadin.v7.ui.Table.setColumnExpandRatio()方法的一些代码示例,展示了Table.setColumnExpandRatio()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setColumnExpandRatio()方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称:Table
方法名:setColumnExpandRatio

Table.setColumnExpandRatio介绍

[英]Sets the column expand ratio for given column.

Expand ratios can be defined to customize the way how excess space is divided among columns. Table can have excess space if it has its width defined and there is horizontally more space than columns consume naturally. Excess space is the space that is not used by columns with explicit width (see #setColumnWidth(Object,int)) or with natural width (no width nor expand ratio).

By default (without expand ratios) the excess space is divided proportionally to columns natural widths.

Only expand ratios of visible columns are used in final calculations.

Column can either have a fixed width or expand ratio. The latter one set is used.

A column with expand ratio is considered to be minimum width by default (if no excess space exists). The minimum width is defined by terminal implementation.

If terminal implementation supports re-sizable columns the column becomes fixed width column if users resizes the column.
[中]设置给定列的列展开比。
可以定义展开比,以自定义在列之间分配多余空间的方式。如果定义了表的宽度,并且在水平方向上有比列自然消耗的空间更多的空间,则表可能会有多余的空间。多余空间是指具有显式宽度(请参见#setColumnWidth(Object,int))或具有自然宽度(无宽度或展开比)的列不使用的空间。
默认情况下(不带展开比),多余空间按自然宽度按比例分配。
最终计算中仅使用可见列的展开比。
列可以具有固定的宽度或展开比。使用后一套。
默认情况下,具有展开比的列被视为最小宽度(如果不存在多余的空间)。最小宽度由终端实现定义。
如果终端实现支持可重新调整大小的列,则如果用户调整列的大小,该列将变为固定宽度列。

代码示例

代码示例来源:origin: viritin/viritin

public MultiSelectTable<ET> expand(String... propertiesToExpand) {
  for (String property : propertiesToExpand) {
    table.setColumnExpandRatio(property, 1);
  }
  return this;
}

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

setColumnExpandRatio(id, 1);
} else {
  setColumnExpandRatio(id,
      DesignAttributeHandler.readAttribute("expand",
          col.attributes(), float.class));

代码示例来源:origin: OpenNMS/opennms

table.setColumnHeader("parmid", "Parameter ID");
table.setColumnHeader("decodes", "Decode Values");
table.setColumnExpandRatio("decodes", 1);
table.setEditable(!isReadOnly());
table.setSelectable(true);

代码示例来源:origin: OpenNMS/opennms

table.setColumnHeader("vbnumber", "Varbind Number");
table.setColumnHeader("vbvalues", "Varbind Values");
table.setColumnExpandRatio("vbvalues", 1);
table.setEditable(!isReadOnly());
table.setSelectable(true);

代码示例来源:origin: OpenNMS/opennms

table.setColumnHeader("mename", "Element Name");
table.setColumnHeader("mevalues", "Element Values");
table.setColumnExpandRatio("mevalues", 1);
table.setEditable(!isReadOnly());
table.setSelectable(true);

代码示例来源:origin: OpenNMS/opennms

table.setColumnHeader("key", "Parameter Name");
table.setColumnHeader("value", "Parameter Value");
table.setColumnExpandRatio("value", 1);
table.setEditable(!isReadOnly());
table.setSelectable(true);

代码示例来源:origin: OpenNMS/opennms

categoriesTable.addContainerProperty("name", String.class, "");
categoriesTable.setColumnHeader("name", "Category");
categoriesTable.setColumnExpandRatio("Category", 1.0f);
categoriesTable.setSelectable(true);
categoriesTable.setMultiSelect(true);

代码示例来源:origin: OpenNMS/opennms

columnsTable.setColumnExpandRatio("label", 1.0f);
columnsTable.setSelectable(true);
columnsTable.setMultiSelect(false);
rowsTable.setColumnExpandRatio("label", 1.0f);
rowsTable.setSelectable(true);
rowsTable.setMultiSelect(false);

相关文章

微信公众号

最新文章

更多

Table类方法