Minor updated

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-csv-export-widget@86378 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2013-11-29 18:46:05 +00:00
parent 4d84848cc6
commit da44509d9e
2 changed files with 18 additions and 14 deletions

View File

@ -23,6 +23,8 @@ import com.sencha.gxt.data.shared.loader.ListLoadResultBean;
import com.sencha.gxt.data.shared.loader.ListLoader; import com.sencha.gxt.data.shared.loader.ListLoader;
import com.sencha.gxt.data.shared.loader.LoadResultListStoreBinding; import com.sencha.gxt.data.shared.loader.LoadResultListStoreBinding;
import com.sencha.gxt.widget.core.client.ContentPanel; import com.sencha.gxt.widget.core.client.ContentPanel;
import com.sencha.gxt.widget.core.client.Resizable;
import com.sencha.gxt.widget.core.client.Resizable.Dir;
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer; import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData; import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
import com.sencha.gxt.widget.core.client.grid.CheckBoxSelectionModel; import com.sencha.gxt.widget.core.client.grid.CheckBoxSelectionModel;
@ -38,18 +40,20 @@ public class ColumnDataGridPanel extends ContentPanel implements
protected final Grid<ColumnData> grid; protected final Grid<ColumnData> grid;
public ColumnDataGridPanel() { public ColumnDataGridPanel() {
//this.res=res;
ColumnConfig<ColumnData, String> nameCol = new ColumnConfig<ColumnData, String>( setHeaderVisible(false);
props.name()); new Resizable(this, Dir.E, Dir.SE, Dir.S);
ColumnConfig<ColumnData, String> typeNameCol = new ColumnConfig<ColumnData, String>(
props.typeName());
ColumnConfig<ColumnData, String> typeCodeCol = new ColumnConfig<ColumnData, String>( ColumnConfig<ColumnData, String> labelCol = new ColumnConfig<ColumnData, String>(
props.typeCode()); props.label());
//ColumnConfig<ColumnData, String> typeNameCol = new ColumnConfig<ColumnData, String>(
// props.typeName());
//ColumnConfig<ColumnData, String> typeCodeCol = new ColumnConfig<ColumnData, String>(
// props.typeCode());
List<ColumnConfig<ColumnData, ?>> l = new ArrayList<ColumnConfig<ColumnData, ?>>(); List<ColumnConfig<ColumnData, ?>> l = new ArrayList<ColumnConfig<ColumnData, ?>>();
l.add(nameCol); l.add(labelCol);
l.add(typeNameCol);
l.add(typeCodeCol);
ColumnModel<ColumnData> cm = new ColumnModel<ColumnData>(l); ColumnModel<ColumnData> cm = new ColumnModel<ColumnData>(l);
IdentityValueProvider<ColumnData> identity = new IdentityValueProvider<ColumnData>(); IdentityValueProvider<ColumnData> identity = new IdentityValueProvider<ColumnData>();
@ -90,7 +94,7 @@ public class ColumnDataGridPanel extends ContentPanel implements
grid.setLoader(loader); grid.setLoader(loader);
grid.setSelectionModel(sm); grid.setSelectionModel(sm);
grid.getView().setAutoExpandColumn(nameCol); grid.getView().setAutoExpandColumn(labelCol);
grid.getView().setStripeRows(true); grid.getView().setStripeRows(true);
grid.getView().setColumnLines(true); grid.getView().setColumnLines(true);
grid.setBorders(false); grid.setBorders(false);

View File

@ -13,11 +13,11 @@ public interface ColumnDataProperties extends
@Path("id") @Path("id")
ModelKeyProvider<ColumnData> id(); ModelKeyProvider<ColumnData> id();
ValueProvider<ColumnData, String> name(); ValueProvider<ColumnData, String> label();
ValueProvider<ColumnData, String> typeName(); //ValueProvider<ColumnData, String> typeName();
ValueProvider<ColumnData, String> typeCode(); //ValueProvider<ColumnData, String> typeCode();
} }