Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widgetx@93332 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-03-19 15:58:26 +00:00 committed by Giancarlo Panichi
parent 991f7604c8
commit fa09268ea2
2 changed files with 14 additions and 7 deletions

View File

@ -10,7 +10,7 @@
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-widgetx</artifactId> <artifactId>tabular-data-widgetx</artifactId>
<version>1.0.1-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<name>tabular-data-widgetx</name> <name>tabular-data-widgetx</name>
<description>Widget that allows visualization of tabular data</description> <description>Widget that allows visualization of tabular data</description>

View File

@ -89,7 +89,7 @@ public class TabularDataXGridPanel extends ContentPanel {
protected ListStore<DataRow> store; protected ListStore<DataRow> store;
protected Grid<DataRow> grid; protected Grid<DataRow> grid;
protected GridInlineEditing<DataRow> editing; //protected GridInlineEditing<DataRow> editing;
protected TableDefinition tableDefinition; protected TableDefinition tableDefinition;
protected VerticalLayoutContainer container; protected VerticalLayoutContainer container;
@ -376,12 +376,13 @@ public class TabularDataXGridPanel extends ContentPanel {
grid.setLoader(loader); grid.setLoader(loader);
grid.setView(liveGridView); grid.setView(liveGridView);
editing = new GridInlineEditing<DataRow>(grid); //TODO disabled editing rows
/*editing = new GridInlineEditing<DataRow>(grid);
editing.setClicksToEdit(ClicksToEdit.TWO); editing.setClicksToEdit(ClicksToEdit.TWO);
for (ColumnConfig<DataRow, ?> c : columnsConfig) { for (ColumnConfig<DataRow, ?> c : columnsConfig) {
ColumnConfigGenerator.setEditor(editing, c); ColumnConfigGenerator.setEditor(editing, c);
} }*/
// numberer.initPlugin(grid); // numberer.initPlugin(grid);
@ -420,12 +421,15 @@ public class TabularDataXGridPanel extends ContentPanel {
loader.clearSortInfo(); loader.clearSortInfo();
reader.setDefinition(tableDefinition); reader.setDefinition(tableDefinition);
grid.reconfigure(store, columnModel); grid.reconfigure(store, columnModel);
//TODO Disabled editing rows
/*
editing = new GridInlineEditing<DataRow>(grid); editing = new GridInlineEditing<DataRow>(grid);
editing.setClicksToEdit(ClicksToEdit.TWO); editing.setClicksToEdit(ClicksToEdit.TWO);
for (ColumnConfig<DataRow, ?> c : columnsConfig) { for (ColumnConfig<DataRow, ?> c : columnsConfig) {
ColumnConfigGenerator.setEditor(editing, c); ColumnConfigGenerator.setEditor(editing, c);
} }*/
// TODO workaround: the loader is called only if the scroll bar is // TODO workaround: the loader is called only if the scroll bar is
// in the middle // in the middle
@ -536,7 +540,10 @@ public class TabularDataXGridPanel extends ContentPanel {
* @param rows * @param rows
*/ */
public void addRow(ArrayList<String> rows) { public void addRow(ArrayList<String> rows) {
//TODO Disabled AddROW
/*
if (grid != null && editing != null) { if (grid != null && editing != null) {
List<ColumnKey> keys = tableDefinition.getKeys(); List<ColumnKey> keys = tableDefinition.getKeys();
DataRow dataRow = new DataRow(keys.size()); DataRow dataRow = new DataRow(keys.size());
@ -554,7 +561,7 @@ public class TabularDataXGridPanel extends ContentPanel {
int row = store.indexOf(dataRow); int row = store.indexOf(dataRow);
editing.startEditing(new GridCell(row, pos)); editing.startEditing(new GridCell(row, pos));
} }*/
} }
protected class ExtendedLiveGridView extends LiveGridView<DataRow> { protected class ExtendedLiveGridView extends LiveGridView<DataRow> {