本文整理了Java中com.vaadin.v7.ui.Table.setColumnWidth()
方法的一些代码示例,展示了Table.setColumnWidth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setColumnWidth()
方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称:Table
方法名:setColumnWidth
[英]Sets columns width (in pixels). Theme may not necessarily respect very small or very big values. Setting width to -1 (default) means that theme will make decision of width.
Column can either have a fixed width or expand ratio. The latter one set is used. See @link #setColumnExpandRatio(Object,float).
[中]设置列宽(以像素为单位)。主题不一定尊重非常小或非常大的价值观。将宽度设置为-1(默认值)意味着主题将决定宽度。
列可以具有固定的宽度或展开比。使用后一套。参见@link#setColumnExpandRatio(对象,浮点)。
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public void setRowHeaderWidth(int width) {
component.setColumnWidth(ROW_HEADER_PROPERTY_ID, width);
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
private void handleColumnWidthUpdates(Map<String, Object> variables) {
if (variables.containsKey("columnWidthUpdates")) {
String[] events = (String[]) variables.get("columnWidthUpdates");
for (String str : events) {
String[] eventDetails = str.split(":");
Object propertyId = columnIdMap.get(eventDetails[0]);
if (propertyId == null) {
propertyId = ROW_HEADER_FAKE_PROPERTY_ID;
}
int width = Integer.valueOf(eventDetails[1]);
setColumnWidth(propertyId, width);
}
}
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
private void fireColumnResizeEvent(Object propertyId, int previousWidth,
int currentWidth) {
/*
* Update the sizes on the server side. If a column previously had a
* expand ratio and the user resized the column then the expand ratio
* will be turned into a static pixel size.
*/
setColumnWidth(propertyId, currentWidth);
fireEvent(new ColumnResizeEvent(this, propertyId, previousWidth,
currentWidth));
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
component.setColumnWidth(column, Integer.parseInt(width));
} else {
component.setColumnWidth(column, -1);
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public void setColumnWidth(Column column, int width) {
checkNotNullArgument(column, "column must be non null");
if (column.getWidth() == null || column.getWidth() != width) {
column.setWidth(width);
}
component.setColumnWidth(column.getId(), width);
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
setColumnWidth(id, DesignAttributeHandler.readAttribute(
"width", col.attributes(), Integer.class));
代码示例来源:origin: OpenNMS/opennms
table.setColumnWidth("Key", 100);
table.setColumnWidth("Value", -1);
table.setSizeFull();
verticalLayout.addComponent(table);
代码示例来源:origin: com.haulmont.cuba/cuba-web
columnsOrder.add(column);
if (column.getWidth() != null) {
component.setColumnWidth(columnId, column.getWidth());
代码示例来源:origin: com.haulmont.cuba/cuba-web
component.setColumnWidth(ROW_HEADER_PROPERTY_ID, defaultRowHeaderWidth);
内容来源于网络,如有侵权,请联系作者删除!