Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-charts-widget@111388 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-01-14 14:18:10 +00:00
parent e41f4cc6bb
commit b2b7cfc990
5 changed files with 83 additions and 5 deletions

20
.gwt/.gwt-log Normal file
View File

@ -0,0 +1,20 @@
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 3925 units from cache.
Compiling...
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 3925 units from cache.
Compiling...
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 3925 units from cache.
Compiling...
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 3925 units from cache.
Compiling...
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 3925 units from cache.
Compiling...

View File

@ -1,5 +1,6 @@
package org.gcube.portlets.user.td.chartswidget.client;
import org.gcube.portlets.user.td.chartswidget.client.help.ChartHelp;
import org.gcube.portlets.user.td.chartswidget.client.properties.ChartTypePropertiesCombo;
import org.gcube.portlets.user.td.chartswidget.client.store.ChartTypeElement;
import org.gcube.portlets.user.td.chartswidget.client.store.ChartTypeStore;
@ -44,7 +45,7 @@ public class ChartSelectionCard extends WizardCard {
private ChartType chartTypeSelected;
private ComboBox<ChartTypeElement> comboChartType;
private FieldLabel comboChartTypeLabel;
private ChartHelp chartHelp;
public ChartSelectionCard(final ChartSession chartSession) {
@ -88,9 +89,11 @@ public class ChartSelectionCard extends WizardCard {
comboChartTypeLabel = new FieldLabel(comboChartType, "Chart Type");
chartHelp=new ChartHelp();
content.add(comboChartTypeLabel, new VerticalLayoutData(1, -1,
new Margins(0)));
content.add(chartHelp, new VerticalLayoutData(1,-1, new Margins(0)));
return panel;
}
@ -119,6 +122,7 @@ public class ChartSelectionCard extends WizardCard {
private void updateChartType(ChartType type) {
chartTypeSelected = type;
chartHelp.updateChartType(type);
}
@Override

View File

@ -0,0 +1,48 @@
package org.gcube.portlets.user.td.chartswidget.client.help;
import org.gcube.portlets.user.td.widgetcommonevent.shared.charts.ChartType;
import com.google.gwt.user.client.ui.HTML;
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
/**
*
* @author giancarlo email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class ChartHelp extends SimpleContainer {
public ChartHelp() {
super();
init();
}
public void init() {
HTML suggestion = new HTML(
"<p style='padding: 20px 10px;margin:auto;'></p>");
add(suggestion);
}
public void updateChartType(ChartType type) {
HTML suggestion;
clear();
switch (type) {
case TopRating:
suggestion = new HTML(
"<p style='padding: 20px 10px;margin:auto;'><span style='font-weight: bold;'>Top Rating:</span> given a dataset, "
+ "crete a chart that has dimension values, with aggregate measure on y-axis and a time-dimension on x-axis</p>");
add(suggestion);
break;
default:
suggestion = new HTML(
"<p style='padding: 20px 10px;margin:auto;'></p>");
add(suggestion);
break;
}
forceLayout();
}
}

View File

@ -32,7 +32,7 @@ public class TopRatingColumnSelectionCard extends WizardCard {
public TopRatingColumnSelectionCard(final ChartSession chartSession,
final ChartTopRatingSession chartTopRatingSession) {
super("Column Selection", "");
super("Dimension Column Selection", "");
this.thisCard=this;
if (chartTopRatingSession == null) {
Log.error("ChartTopRatingSession is null");

View File

@ -6,6 +6,7 @@ import java.util.List;
import org.gcube.portlets.user.td.chartswidget.client.grid.ColumnDataProperties;
import org.gcube.portlets.user.td.gwtservice.shared.chart.ChartSession;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.GWT;
@ -51,7 +52,7 @@ public class TopRatingColumnSelectionGridPanel extends ContentPanel implements
public TopRatingColumnSelectionGridPanel(TopRatingColumnSelectionCard parent, ChartSession chartSession) {
this.parent=parent;
Log.debug("TopRatingColumnSelectionGridPanel");
setHeadingText("Colums");
setHeadingText("Dimension Colums");
ColumnConfig<ColumnData, String> labelCol = new ColumnConfig<ColumnData, String>(
props.label());
@ -66,7 +67,12 @@ public class TopRatingColumnSelectionGridPanel extends ContentPanel implements
ColumnModel<ColumnData> cm = new ColumnModel<ColumnData>(l);
ListStore<ColumnData> store = new ListStore<ColumnData>(props.id());
store.addAll(chartSession.getColumns());
ArrayList<ColumnData> coloumns=chartSession.getColumns();
for(ColumnData col:coloumns){
if(col.getTypeCode().compareTo(ColumnTypeCode.DIMENSION.toString())==0){
store.add(col);
}
}
grid = new Grid<ColumnData>(store, cm);
sm.setSelectionMode(SelectionMode.SINGLE);