本文整理了Java中com.vaadin.v7.ui.Table.isColumnCollapsed()
方法的一些代码示例,展示了Table.isColumnCollapsed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.isColumnCollapsed()
方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称:Table
方法名:isColumnCollapsed
[英]Checks if the specified column is collapsed.
[中]检查指定的列是否折叠。
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public List<Table.Column> getNotCollapsedColumns() {
Object[] componentVisibleColumns = component.getVisibleColumns();
if (componentVisibleColumns == null)
return Collections.emptyList();
List<Table.Column> visibleColumns = new ArrayList<>(componentVisibleColumns.length);
for (Object key : componentVisibleColumns) {
if (!component.isColumnCollapsed(key)) {
Column column = columns.get(key);
if (column != null) {
visibleColumns.add(column);
}
}
}
return visibleColumns;
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
private void paintVisibleColumnOrder(PaintTarget target) {
// Visible column order
final List<String> visibleColOrder = new ArrayList<String>();
for (Object columnId : visibleColumns) {
if (!isColumnCollapsed(columnId)) {
visibleColOrder.add(columnIdMap.key(columnId));
}
}
target.addAttribute("vcolorder", visibleColOrder.toArray());
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
protected void handleColumnCollapsed(com.vaadin.v7.ui.Table.ColumnCollapseEvent event) {
Object propertyId = event.getPropertyId();
boolean columnCollapsed = component.isColumnCollapsed(propertyId);
columns.get(propertyId).setCollapsed(columnCollapsed);
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
private void paintAvailableColumns(PaintTarget target)
throws PaintException {
if (columnCollapsingAllowed) {
final HashSet<Object> collapsedCols = new HashSet<Object>();
for (Object colId : visibleColumns) {
if (isColumnCollapsed(colId)) {
collapsedCols.add(colId);
}
}
final String[] collapsedKeys = new String[collapsedCols.size()];
int nextColumn = 0;
for (Object colId : visibleColumns) {
if (isColumnCollapsed(colId)) {
collapsedKeys[nextColumn++] = columnIdMap.key(colId);
}
}
target.addVariable(this, "collapsedcolumns", collapsedKeys);
final String[] noncollapsibleKeys = new String[noncollapsibleColumns
.size()];
nextColumn = 0;
for (Object colId : noncollapsibleColumns) {
noncollapsibleKeys[nextColumn++] = columnIdMap.key(colId);
}
target.addVariable(this, "noncollapsiblecolumns",
noncollapsibleKeys);
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
boolean columnVisible = !component.isColumnCollapsed(columnId);
boolean settingsColumnVisible = Boolean.parseBoolean(settingsColumn.attributeValue("visible"));
代码示例来源:origin: com.haulmont.cuba/cuba-web
protected void onColumnCollapseStateChange(com.vaadin.v7.ui.Table.ColumnCollapseEvent e) {
Column collapsedColumn = getColumn(e.getPropertyId().toString());
boolean collapsed = component.isColumnCollapsed(e.getPropertyId());
ColumnCollapseEvent<E> event = new ColumnCollapseEvent<>(this, collapsedColumn, collapsed);
publish(ColumnCollapseEvent.class, event);
}
代码示例来源: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
if (isColumnCollapsed(propertyId)) {
if (!idSet.contains(propertyId)) {
setColumnCollapsed(propertyId, false);
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
.hasNext(); currentColumn++) {
final Object columnId = it.next();
if (columnId == null || isColumnCollapsed(columnId)) {
continue;
代码示例来源: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);
}
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
if (isColumnCollapsed(colids[j])) {
continue;
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
final String foot = getColumnFooter(colId);
target.addAttribute("fcaption", (foot != null ? foot : ""));
if (isColumnCollapsed(colId)) {
target.addAttribute("collapsed", true);
内容来源于网络,如有侵权,请联系作者删除!