本文整理了Java中com.vaadin.v7.ui.Table.getColumnWidth()
方法的一些代码示例,展示了Table.getColumnWidth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getColumnWidth()
方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称:Table
方法名:getColumnWidth
[英]Gets the pixel width of column.
[中]获取列的像素宽度。
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public int getRowHeaderWidth() {
return component.getColumnWidth(ROW_HEADER_PROPERTY_ID);
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
private void paintColumnWidth(PaintTarget target, final Object columnId)
throws PaintException {
if (columnWidths.containsKey(columnId)) {
target.addAttribute("width", getColumnWidth(columnId));
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
int columnWidth = component.getColumnWidth(columnId);
代码示例来源:origin: com.haulmont.cuba/cuba-web
/**
* Saves common table column settings (width, visible, id).
*
* @param columnsElem setting element for the columns
*/
protected void saveCommonTableColumnSettings(Element columnsElem) {
Object[] visibleColumns = component.getVisibleColumns();
for (Object column : visibleColumns) {
Element colElem = columnsElem.addElement("columns");
colElem.addAttribute("id", column.toString());
int width = component.getColumnWidth(column);
if (width > -1)
colElem.addAttribute("width", String.valueOf(width));
boolean visible = !component.isColumnCollapsed(column);
colElem.addAttribute("visible", Boolean.toString(visible));
}
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
private void writeColumns(Element table, Table def, DesignContext context) {
Object[] columns = getVisibleColumns();
if (columns.length == 0) {
return;
}
Element colgroup = table.appendElement("colgroup");
for (Object id : columns) {
Element col = colgroup.appendElement("col");
col.attr("property-id", id.toString());
if (getColumnAlignment(id) == Align.CENTER) {
col.attr("center", true);
} else if (getColumnAlignment(id) == Align.RIGHT) {
col.attr("right", true);
}
DesignAttributeHandler.writeAttribute("width", col.attributes(),
getColumnWidth(id), def.getColumnWidth(null), int.class,
context);
DesignAttributeHandler.writeAttribute("expand", col.attributes(),
getColumnExpandRatio(id), def.getColumnExpandRatio(null),
float.class, context);
DesignAttributeHandler.writeAttribute("collapsible",
col.attributes(), isColumnCollapsible(id),
def.isColumnCollapsible(null), boolean.class, context);
DesignAttributeHandler.writeAttribute("collapsed", col.attributes(),
isColumnCollapsed(id), def.isColumnCollapsed(null),
boolean.class, context);
}
}
内容来源于网络,如有侵权,请联系作者删除!