Minor update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widgetx@107022 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
cd696cde7a
commit
9152ce10e1
|
@ -75,9 +75,11 @@ import com.sencha.gxt.widget.core.client.event.HeaderContextMenuEvent.HeaderCont
|
|||
import com.sencha.gxt.widget.core.client.event.HeaderMouseDownEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.HeaderMouseDownEvent.HeaderMouseDownHandler;
|
||||
import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
|
||||
import com.sencha.gxt.widget.core.client.grid.ColumnHeader;
|
||||
import com.sencha.gxt.widget.core.client.grid.ColumnModel;
|
||||
import com.sencha.gxt.widget.core.client.grid.Grid;
|
||||
import com.sencha.gxt.widget.core.client.grid.filters.Filter;
|
||||
import com.sencha.gxt.widget.core.client.info.Info;
|
||||
import com.sencha.gxt.widget.core.client.menu.Item;
|
||||
import com.sencha.gxt.widget.core.client.menu.Menu;
|
||||
import com.sencha.gxt.widget.core.client.menu.MenuItem;
|
||||
|
@ -652,7 +654,7 @@ public class TabularDataXGridPanel extends ContentPanel {
|
|||
}
|
||||
};
|
||||
}
|
||||
;
|
||||
|
||||
grid.addHeaderMouseDownHandler(handler);
|
||||
}
|
||||
}
|
||||
|
@ -699,6 +701,9 @@ public class TabularDataXGridPanel extends ContentPanel {
|
|||
columnModel = new ColumnModel<DataRow>(columnsConfig);
|
||||
|
||||
columnModel = checkOnlyColumn(columnModel);
|
||||
|
||||
|
||||
|
||||
columnModel
|
||||
.addColumnMoveHandler(new ColumnMoveEvent.ColumnMoveHandler() {
|
||||
|
||||
|
@ -715,12 +720,19 @@ public class TabularDataXGridPanel extends ContentPanel {
|
|||
+ " Label: " + colDef.getLabel()
|
||||
+ " Position: " + colDef.getPosition()
|
||||
+ " ColumnId: " + colDef.getColumnLocalId());
|
||||
ColumnsReorderingConfig columnsReorderingConfig = new ColumnsReorderingConfig(
|
||||
columnIndex, colDef);
|
||||
ColumnsReorderingEvent columnsReorderingEvent = new ColumnsReorderingEvent(
|
||||
columnsReorderingConfig);
|
||||
eventBus.fireEvent(columnsReorderingEvent);
|
||||
|
||||
if (colDef.isViewColumn()) {
|
||||
Info.display("Attention", "The view columns can not be moved");
|
||||
//ColumnHeader<DataRow> colHeader=grid.getView().getHeader();
|
||||
|
||||
//event.getSource().moveColumn(columnIndex, colDef.getPosition());
|
||||
} else {
|
||||
ColumnsReorderingConfig columnsReorderingConfig = new ColumnsReorderingConfig(
|
||||
columnIndex, colDef);
|
||||
ColumnsReorderingEvent columnsReorderingEvent = new ColumnsReorderingEvent(
|
||||
columnsReorderingConfig);
|
||||
eventBus.fireEvent(columnsReorderingEvent);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -747,7 +759,7 @@ public class TabularDataXGridPanel extends ContentPanel {
|
|||
return new FilterPagingLoadConfigBean();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* HttpProxy<PagingLoadConfig> proxy = new
|
||||
* HttpProxy<PagingLoadConfig>( builder); proxy.setWriter(new
|
||||
|
@ -778,7 +790,7 @@ public class TabularDataXGridPanel extends ContentPanel {
|
|||
grid.setView(liveGridView);
|
||||
grid.setBorders(false);
|
||||
grid.setColumnReordering(true);
|
||||
|
||||
|
||||
// TODO disabled editing rows
|
||||
/*
|
||||
* editing = new GridInlineEditing<DataRow>(grid);
|
||||
|
@ -787,7 +799,7 @@ public class TabularDataXGridPanel extends ContentPanel {
|
|||
* for (ColumnConfig<DataRow, ?> c : columnsConfig) {
|
||||
* ColumnConfigGenerator.setEditor(editing, c); }
|
||||
*/
|
||||
|
||||
|
||||
// numberer.initPlugin(grid);
|
||||
|
||||
// Filter
|
||||
|
@ -807,8 +819,8 @@ public class TabularDataXGridPanel extends ContentPanel {
|
|||
|
||||
toolBar = new ToolBar();
|
||||
// toolBar.add(new LiveToolItem(grid));
|
||||
tdxLiveToolItem=new TDXLiveToolItem(grid);
|
||||
|
||||
tdxLiveToolItem = new TDXLiveToolItem(grid);
|
||||
|
||||
toolBar.add(tdxLiveToolItem);
|
||||
toolBar.addStyleName(ThemeStyles.get().style().borderTop());
|
||||
toolBar.getElement().getStyle().setProperty("borderBottom", "none");
|
||||
|
@ -834,12 +846,11 @@ public class TabularDataXGridPanel extends ContentPanel {
|
|||
// TODO we need to manually reset the sort
|
||||
sm.onChangeNumberOfRows();
|
||||
tdxLiveToolItem.setNoSelected();
|
||||
|
||||
|
||||
loader.clearSortInfo();
|
||||
reader.setDefinition(tableDefinition);
|
||||
grid.reconfigure(store, columnModel);
|
||||
|
||||
|
||||
|
||||
ArrayList<Filter<DataRow, ?>> filters = FiltersGenerator
|
||||
.generate(columnModel);
|
||||
gridFilters.removeAll();
|
||||
|
|
|
@ -48,6 +48,7 @@ public class ExtendedLiveGridView<M> extends LiveGridView<M> {
|
|||
cacheStore = list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the total number of rows that are visible given the current grid
|
||||
* height.
|
||||
|
|
Loading…
Reference in New Issue