Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-table-widget@94938 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-04-16 17:56:10 +00:00 committed by Giancarlo Panichi
parent c5fc089a1d
commit 32ff895f33
2 changed files with 38 additions and 12 deletions

View File

@ -71,7 +71,7 @@ public class HistoryPanel extends FramedPanel {
super(); super();
this.eventBus = eventBus; this.eventBus = eventBus;
forceLayoutOnResize = true; forceLayoutOnResize = true;
retrieveCurrentTR(); retrieveCurrentTR();
} }
@ -95,7 +95,7 @@ public class HistoryPanel extends FramedPanel {
setHeaderVisible(false); setHeaderVisible(false);
setBodyBorder(false); setBodyBorder(false);
setResize(true); setResize(true);
} }
protected void create() { protected void create() {
@ -113,9 +113,21 @@ public class HistoryPanel extends FramedPanel {
+ value.getDescription()); + value.getDescription());
} }
}); });
ColumnConfig<OpHistory, String> nameCol = new ColumnConfig<OpHistory, String>( ColumnConfig<OpHistory, String> nameCol = new ColumnConfig<OpHistory, String>(
props.name(), 132, "Step"); props.name(), 132, "Step");
nameCol.setCell(new AbstractCell<String>() {
@Override
public void render(Context context, String value, SafeHtmlBuilder sb) {
sb.appendHtmlConstant("<span title='"+value+"'>"
+ value + "</span>");
}
});
ColumnConfig<OpHistory, String> dateCol = new ColumnConfig<OpHistory, String>( ColumnConfig<OpHistory, String> dateCol = new ColumnConfig<OpHistory, String>(
props.date(), 106, "Date"); props.date(), 106, "Date");
@ -177,10 +189,10 @@ public class HistoryPanel extends FramedPanel {
}); });
} }
}; };
grid.setLoader(loader); grid.setLoader(loader);
grid.setSize("200px","300px"); grid.setSize("200px", "300px");
grid.getView().setStripeRows(true); grid.getView().setStripeRows(true);
grid.getView().setColumnLines(true); grid.getView().setColumnLines(true);
grid.getView().setAutoFill(true); grid.getView().setAutoFill(true);
@ -191,13 +203,14 @@ public class HistoryPanel extends FramedPanel {
grid.getView().setAutoExpandColumn(nameCol); grid.getView().setAutoExpandColumn(nameCol);
grid.getView().setEmptyText("Empty"); grid.getView().setEmptyText("Empty");
expander.initPlugin(grid); expander.initPlugin(grid);
/*VerticalLayoutContainer v = new VerticalLayoutContainer(); /*
v.setScrollMode(ScrollMode.AUTO); * VerticalLayoutContainer v = new VerticalLayoutContainer();
v.add(grid, new VerticalLayoutData(1, 1, new Margins(0))); * v.setScrollMode(ScrollMode.AUTO); v.add(grid, new
v.forceLayout();*/ * VerticalLayoutData(1, 1, new Margins(0))); v.forceLayout();
*/
add(grid, new MarginData(0)); add(grid, new MarginData(0));
onResize(); onResize();
} }

View File

@ -77,6 +77,19 @@ public class ValidationsTablePanel extends FramedPanel {
ColumnConfig<Validations, String> descriptionCol = new ColumnConfig<Validations, String>( ColumnConfig<Validations, String> descriptionCol = new ColumnConfig<Validations, String>(
props.description(), 168, "Description"); props.description(), 168, "Description");
descriptionCol.setCell(new AbstractCell<String>() {
@Override
public void render(Context context, String value, SafeHtmlBuilder sb) {
sb.appendHtmlConstant("<span title='"+value+"'>"
+ value + "</span>");
}
});
ColumnConfig<Validations, Boolean> validCol = new ColumnConfig<Validations, Boolean>( ColumnConfig<Validations, Boolean> validCol = new ColumnConfig<Validations, Boolean>(
props.valid(), 28, "Valid"); props.valid(), 28, "Valid");
validCol.setCell(new AbstractCell<Boolean>() { validCol.setCell(new AbstractCell<Boolean>() {