use of org.ovirt.engine.ui.common.widget.table.header.AbstractHeader in project ovirt-engine by oVirt.
the class ColumnResizeCellTable method addColumnImpl.
private void addColumnImpl(Column<T, ?> column, Header<?> header) {
// build resizable headers, if necessary
if (columnResizingEnabled && header instanceof AbstractCheckboxHeader) {
header = createResizableCheckboxHeader(header, column);
} else if (columnResizingEnabled) {
header = createResizableHeader(column, header);
} else if (applyHeaderStyle && header instanceof SafeHtmlHeader) {
SafeHtmlHeader safeHtmlHeader = (SafeHtmlHeader) header;
// not using Resizeable header, but still want it to look that way.
// nonResizeableColumnHeader does that.
// TODO nonResizeableColumnHeader copy-pastes CSS. fix.
SafeHtml newValue = templates.nonResizeableColumnHeader(safeHtmlHeader.getValue());
header = new SafeHtmlHeader(newValue, safeHtmlHeader.getTooltip());
}
// actually add the column
super.addColumn(column, header);
// Add empty no-width column as the last column
if (columnResizingEnabled) {
if (isColumnPresent(emptyNoWidthColumn)) {
removeColumn(emptyNoWidthColumn);
}
super.addColumn(emptyNoWidthColumn, emptyNoWidthColumnHeader);
}
// Add column to header context menu
if (header instanceof AbstractHeader) {
((AbstractHeader) header).setContextMenuHandler(ensureContextMenuHandler());
contextPopup.getContextMenu().addItem(column);
}
}
Aggregations