use of org.eclipse.scout.rt.client.ui.basic.table.columns.IColumn in project scout.rt by eclipse.
the class JsonTable method handleColumnBackgroundEffectChanged.
protected void handleColumnBackgroundEffectChanged(JsonEvent event) {
addTableEventFilterCondition(TableEvent.TYPE_COLUMN_BACKGROUND_EFFECT_CHANGED);
IColumn column = extractColumn(event.getData());
Assertions.assertInstance(column, INumberColumn.class, "BackgroundEffect can only be specified on numeric columns");
getModel().getUIFacade().setColumnBackgroundEffect((INumberColumn<?>) column, event.getData().optString("backgroundEffect"));
}
use of org.eclipse.scout.rt.client.ui.basic.table.columns.IColumn in project scout.rt by eclipse.
the class JsonTable method handleUiColumnMoved.
protected void handleUiColumnMoved(JsonEvent event) {
IColumn column = extractColumn(event.getData());
int viewIndex = event.getData().getInt("index");
// Create column list with expected order
List<IColumn<?>> columns = getColumnsInViewOrder();
columns.remove(column);
columns.add(viewIndex, column);
addTableEventFilterCondition(TableEvent.TYPE_COLUMN_ORDER_CHANGED).setColumns(columns);
getModel().getUIFacade().fireColumnMovedFromUI(column, viewIndex);
}
use of org.eclipse.scout.rt.client.ui.basic.table.columns.IColumn in project scout.rt by eclipse.
the class JsonTable method handleUiPropertyChange.
@Override
protected void handleUiPropertyChange(String propertyName, JSONObject data) {
if (ITable.PROP_CONTEXT_COLUMN.equals(propertyName)) {
String contextColumnId = data.optString(propertyName);
IColumn column = optColumn(contextColumnId);
addPropertyEventFilterCondition(ITable.PROP_CONTEXT_COLUMN, column);
getModel().getUIFacade().setContextColumnFromUI(column);
}
}
use of org.eclipse.scout.rt.client.ui.basic.table.columns.IColumn in project scout.rt by eclipse.
the class JsonColumnUserFilter method toJson.
@Override
public JSONObject toJson() {
JSONObject json = super.toJson();
ColumnUserFilterState filterState = getFilterState();
IColumn modelColumn = filterState.getColumn();
json.put("column", getJsonTable().getColumnId(modelColumn));
json.put("selectedValues", new JSONArray(filterState.getSelectedValues()));
return json;
}
use of org.eclipse.scout.rt.client.ui.basic.table.columns.IColumn in project scout.rt by eclipse.
the class JsonTable method handleUiColumnResized.
protected void handleUiColumnResized(JsonEvent event) {
IColumn column = extractColumn(event.getData());
if (column == null) {
LOG.info("Requested column doesn't exist anymore -> skip columnResized event");
return;
}
int width = event.getData().getInt("width");
getModel().getUIFacade().setColumnWidthFromUI(column, width);
}
Aggregations