@Override public void setRowHeaderWidth(int width) { component.setColumnWidth(ROW_HEADER_PROPERTY_ID, width); }
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); } } }
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)); }
component.setColumnWidth(column, Integer.parseInt(width)); } else { component.setColumnWidth(column, -1);
@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); }
setColumnWidth(id, DesignAttributeHandler.readAttribute( "width", col.attributes(), Integer.class));
table.setColumnWidth("Key", 100); table.setColumnWidth("Value", -1); table.setSizeFull(); verticalLayout.addComponent(table);
columnsOrder.add(column); if (column.getWidth() != null) { component.setColumnWidth(columnId, column.getWidth());
component.setColumnWidth(ROW_HEADER_PROPERTY_ID, defaultRowHeaderWidth);