Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widgetx@90950 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-02-05 18:24:13 +00:00 committed by Giancarlo Panichi
parent 5251a2fc28
commit b9ae9f564b
3 changed files with 36 additions and 30 deletions

View File

@ -302,7 +302,7 @@ public class TabularDataXGridPanel extends ContentPanel {
loader.setRemoteSort(true); loader.setRemoteSort(true);
liveGridView = new ExtendedLiveGridView(); liveGridView = new ExtendedLiveGridView();
liveGridView.setRowHeight(11); liveGridView.setRowHeight(21);
grid = new Grid<DataRow>(store, columnModel); grid = new Grid<DataRow>(store, columnModel);
grid.setLoadMask(true); grid.setLoadMask(true);
grid.setLoader(loader); grid.setLoader(loader);

View File

@ -9,7 +9,9 @@ import org.gcube.portlets.user.tdwx.client.model.grid.DataRowColumnConfig;
import org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition; import org.gcube.portlets.user.tdwx.shared.model.ColumnDefinition;
import org.gcube.portlets.user.tdwx.shared.model.DataRow; import org.gcube.portlets.user.tdwx.shared.model.DataRow;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder; import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.google.gwt.user.client.ui.HTML;
import com.sencha.gxt.widget.core.client.form.CheckBox; import com.sencha.gxt.widget.core.client.form.CheckBox;
import com.sencha.gxt.widget.core.client.form.DateField; import com.sencha.gxt.widget.core.client.form.DateField;
import com.sencha.gxt.widget.core.client.form.NumberField; import com.sencha.gxt.widget.core.client.form.NumberField;
@ -52,9 +54,11 @@ public class ColumnConfigGenerator {
} }
columnConfig.setHidden(!columnDefinition.isVisible()); columnConfig.setHidden(!columnDefinition.isVisible());
SafeHtmlBuilder tooltipMessage= new SafeHtmlBuilder(); SafeHtmlBuilder tooltipMessage= new SafeHtmlBuilder();
tooltipMessage.appendEscapedLines(columnDefinition.getTooltipMessage()); tooltipMessage.appendHtmlConstant("<p align='Left'><bold style='font-weight:bold;'>"+columnDefinition.getLabel()+"</bold><BR>"+
"<em style='text-decoration:underline;'>"+columnDefinition.getColumnTypeName()+"</em><BR>"+
"<em>"+columnDefinition.getColumnDataType()+"</em><BR>"+
columnDefinition.getTooltipMessage()+"</p>");
columnConfig.setToolTip(tooltipMessage.toSafeHtml()); columnConfig.setToolTip(tooltipMessage.toSafeHtml());
return columnConfig; return columnConfig;

View File

@ -25,6 +25,8 @@ public class ColumnDefinition implements Serializable {
protected ColumnType type; protected ColumnType type;
protected int position; protected int position;
protected String tooltipMessage; protected String tooltipMessage;
protected String columnTypeName;
protected String columnDataType;
protected ColumnKey key; protected ColumnKey key;
@ -182,33 +184,33 @@ public class ColumnDefinition implements Serializable {
} }
/** public String getColumnTypeName() {
* {@inheritDoc} return columnTypeName;
*/ }
public void setColumnTypeName(String columnTypeName) {
this.columnTypeName = columnTypeName;
}
public String getColumnDataType() {
return columnDataType;
}
public void setColumnDataType(String columnDataType) {
this.columnDataType = columnDataType;
}
@Override @Override
public String toString() { public String toString() {
StringBuilder builder = new StringBuilder(); return "ColumnDefinition [id=" + id + ", label=" + label
builder.append("ColumnDefinition [id="); + ", valueType=" + valueType + ", width=" + width
builder.append(id); + ", editable=" + editable + ", visible=" + visible + ", type="
builder.append(", label="); + type + ", position=" + position + ", tooltipMessage="
builder.append(label); + tooltipMessage + ", columnTypeName=" + columnTypeName
builder.append(", valueType="); + ", columnDataType=" + columnDataType + ", key=" + key + "]";
builder.append(valueType);
builder.append(", width=");
builder.append(width);
builder.append(", editable=");
builder.append(editable);
builder.append(", visible=");
builder.append(visible);
builder.append(", type=");
builder.append(type);
builder.append(", position=");
builder.append(position);
builder.append(", key=");
builder.append(key);
builder.append(", tooltipMessage=");
builder.append(tooltipMessage);
builder.append("]");
return builder.toString();
} }
} }