
org.ioc.commons.impl.gwt.client.ui.PropertyColumn Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ioc-commons-gwt-impl Show documentation
Show all versions of ioc-commons-gwt-impl Show documentation
GWT implementation for ioc-commons artifacts.
package org.ioc.commons.impl.gwt.client.ui;
import org.ioc.commons.ui.IsPropertyColumn;
import org.ioc.commons.utils.Format;
import com.google.gwt.cell.client.Cell;
import com.google.gwt.user.cellview.client.Column;
public abstract class PropertyColumn extends Column implements IsPropertyColumn {
protected String columnId;
protected String columnHeader;
protected int columnPosition;
public PropertyColumn(Cell cell) {
super(cell);
}
public PropertyColumn(String columnId, Cell cell) {
this(cell);
this.columnId = columnId;
}
public PropertyColumn(String columnId, String columnHeader, Cell cell) {
this(columnId, cell);
this.columnHeader = columnHeader;
}
public PropertyColumn(int columnPosition, String columnId, String columnHeader, Cell cell) {
this(columnId, columnHeader, cell);
this.columnPosition = columnPosition;
}
@Override
public boolean isVisible() {
/*
* GWT Columns are always visible.
*
* Override it to implement your own behaviour
*/
return true;
}
@Override
public void setVisible(boolean visible) {
if (!visible) {
throw new UnsupportedOperationException(Format.substitute(
"GWT column ({0}) does not implement functionality for hidding itself", Column.class));
}
}
@Override
public boolean isEnabled() {
/*
* GWT Columns are always enabled.
*
* Override it to implement your own behaviour
*/
return true;
}
@Override
public void setEnabled(boolean enabled) {
if (!enabled) {
throw new UnsupportedOperationException(Format.substitute(
"GWT column ({0}) does not implement functionality for disabling itself", Column.class));
}
}
@Override
public String getColumnId() {
return this.columnId;
}
@Override
public String getColumnHeader() {
return this.columnHeader;
}
@Override
public int getColumnPosition() {
return this.columnPosition;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy