setExpandRatio(1); } else { setExpandRatio(DesignAttributeHandler.readAttribute( "expand", attributes, Integer.class));
column.setExpandRatio(propertyColumn.getExpandRatio());
gridColumn.setWidth(column.getWidth()); gridColumn.setExpandRatio(column.getExpandRatio()); gridColumn.setMinimumWidth(column.getMinimumWidth()); gridColumn.setMaximumWidth(column.getMaximumWidth());
column.setExpandRatio(propertyColumn.getGridExpandRatio());
protected Grid createMetadataGrid() { final Grid metadataGrid = new Grid(); metadataGrid.addStyleName(SPUIStyleDefinitions.METADATA_GRID); metadataGrid.setImmediate(true); metadataGrid.setHeight("100%"); metadataGrid.setWidth("100%"); metadataGrid.setId(UIComponentIdProvider.METDATA_TABLE_ID); metadataGrid.setSelectionMode(SelectionMode.SINGLE); metadataGrid.setColumnReorderingAllowed(true); metadataGrid.setContainerDataSource(getMetadataContainer()); metadataGrid.getColumn(KEY).setHeaderCaption(i18n.getMessage("header.key")); metadataGrid.getColumn(VALUE).setHeaderCaption(i18n.getMessage("header.value")); metadataGrid.getColumn(VALUE).setHidden(true); metadataGrid.addSelectionListener(this::onRowClick); metadataGrid.getColumn(DELETE_BUTTON).setHeaderCaption(""); metadataGrid.getColumn(DELETE_BUTTON).setRenderer(new HtmlButtonRenderer(this::onDelete)); metadataGrid.getColumn(DELETE_BUTTON).setWidth(50); metadataGrid.getColumn(KEY).setExpandRatio(1); return metadataGrid; }
protected Grid createMetadataGrid() { final Grid metadataGrid = new Grid(); metadataGrid.addStyleName(SPUIStyleDefinitions.METADATA_GRID); metadataGrid.setImmediate(true); metadataGrid.setHeight("100%"); metadataGrid.setWidth("100%"); metadataGrid.setId(UIComponentIdProvider.METDATA_TABLE_ID); metadataGrid.setSelectionMode(SelectionMode.SINGLE); metadataGrid.setColumnReorderingAllowed(true); metadataGrid.setContainerDataSource(getMetadataContainer()); metadataGrid.getColumn(KEY).setHeaderCaption(i18n.getMessage("header.key")); metadataGrid.getColumn(VALUE).setHeaderCaption(i18n.getMessage("header.value")); metadataGrid.getColumn(VALUE).setHidden(true); metadataGrid.addSelectionListener(this::onRowClick); metadataGrid.getColumn(DELETE_BUTTON).setHeaderCaption(""); metadataGrid.getColumn(DELETE_BUTTON).setRenderer(new HtmlButtonRenderer(this::onDelete)); metadataGrid.getColumn(DELETE_BUTTON).setWidth(50); metadataGrid.getColumn(KEY).setExpandRatio(1); return metadataGrid; }
@Override public void setExpandRatio(int expandRatio) { this.expandRatio = expandRatio; if (gridColumn != null) { gridColumn.setExpandRatio(expandRatio); } }
@Override protected void setColumnExpandRatio() { getColumn(ProxyMessage.PXY_MSG_ID).setExpandRatio(0); getColumn(ProxyMessage.PXY_MSG_VALUE).setExpandRatio(1); }
@Override protected void setColumnExpandRatio() { getColumn(ProxyMessage.PXY_MSG_ID).setExpandRatio(0); getColumn(ProxyMessage.PXY_MSG_VALUE).setExpandRatio(1); }
/** * Clears the expand ratio for this column. * <p> * Equal to calling {@link #setExpandRatio(int) setExpandRatio(-1)} * * @throws IllegalStateException * if the column is no longer attached to any grid */ public Column<T, V> clearExpandRatio() throws IllegalStateException { return setExpandRatio(-1); }