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:
parent
e41f4cc6bb
commit
b2b7cfc990
|
@ -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...
|
|
@ -1,5 +1,6 @@
|
||||||
package org.gcube.portlets.user.td.chartswidget.client;
|
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.properties.ChartTypePropertiesCombo;
|
||||||
import org.gcube.portlets.user.td.chartswidget.client.store.ChartTypeElement;
|
import org.gcube.portlets.user.td.chartswidget.client.store.ChartTypeElement;
|
||||||
import org.gcube.portlets.user.td.chartswidget.client.store.ChartTypeStore;
|
import org.gcube.portlets.user.td.chartswidget.client.store.ChartTypeStore;
|
||||||
|
@ -44,7 +45,7 @@ public class ChartSelectionCard extends WizardCard {
|
||||||
private ChartType chartTypeSelected;
|
private ChartType chartTypeSelected;
|
||||||
private ComboBox<ChartTypeElement> comboChartType;
|
private ComboBox<ChartTypeElement> comboChartType;
|
||||||
private FieldLabel comboChartTypeLabel;
|
private FieldLabel comboChartTypeLabel;
|
||||||
|
private ChartHelp chartHelp;
|
||||||
|
|
||||||
|
|
||||||
public ChartSelectionCard(final ChartSession chartSession) {
|
public ChartSelectionCard(final ChartSession chartSession) {
|
||||||
|
@ -88,9 +89,11 @@ public class ChartSelectionCard extends WizardCard {
|
||||||
|
|
||||||
comboChartTypeLabel = new FieldLabel(comboChartType, "Chart Type");
|
comboChartTypeLabel = new FieldLabel(comboChartType, "Chart Type");
|
||||||
|
|
||||||
|
chartHelp=new ChartHelp();
|
||||||
|
|
||||||
content.add(comboChartTypeLabel, new VerticalLayoutData(1, -1,
|
content.add(comboChartTypeLabel, new VerticalLayoutData(1, -1,
|
||||||
new Margins(0)));
|
new Margins(0)));
|
||||||
|
content.add(chartHelp, new VerticalLayoutData(1,-1, new Margins(0)));
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,6 +122,7 @@ public class ChartSelectionCard extends WizardCard {
|
||||||
|
|
||||||
private void updateChartType(ChartType type) {
|
private void updateChartType(ChartType type) {
|
||||||
chartTypeSelected = type;
|
chartTypeSelected = type;
|
||||||
|
chartHelp.updateChartType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -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();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -32,7 +32,7 @@ public class TopRatingColumnSelectionCard extends WizardCard {
|
||||||
|
|
||||||
public TopRatingColumnSelectionCard(final ChartSession chartSession,
|
public TopRatingColumnSelectionCard(final ChartSession chartSession,
|
||||||
final ChartTopRatingSession chartTopRatingSession) {
|
final ChartTopRatingSession chartTopRatingSession) {
|
||||||
super("Column Selection", "");
|
super("Dimension Column Selection", "");
|
||||||
this.thisCard=this;
|
this.thisCard=this;
|
||||||
if (chartTopRatingSession == null) {
|
if (chartTopRatingSession == null) {
|
||||||
Log.error("ChartTopRatingSession is null");
|
Log.error("ChartTopRatingSession is null");
|
||||||
|
|
|
@ -6,6 +6,7 @@ import java.util.List;
|
||||||
import org.gcube.portlets.user.td.chartswidget.client.grid.ColumnDataProperties;
|
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.chart.ChartSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
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.allen_sauer.gwt.log.client.Log;
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
|
@ -51,7 +52,7 @@ public class TopRatingColumnSelectionGridPanel extends ContentPanel implements
|
||||||
public TopRatingColumnSelectionGridPanel(TopRatingColumnSelectionCard parent, ChartSession chartSession) {
|
public TopRatingColumnSelectionGridPanel(TopRatingColumnSelectionCard parent, ChartSession chartSession) {
|
||||||
this.parent=parent;
|
this.parent=parent;
|
||||||
Log.debug("TopRatingColumnSelectionGridPanel");
|
Log.debug("TopRatingColumnSelectionGridPanel");
|
||||||
setHeadingText("Colums");
|
setHeadingText("Dimension Colums");
|
||||||
|
|
||||||
ColumnConfig<ColumnData, String> labelCol = new ColumnConfig<ColumnData, String>(
|
ColumnConfig<ColumnData, String> labelCol = new ColumnConfig<ColumnData, String>(
|
||||||
props.label());
|
props.label());
|
||||||
|
@ -66,7 +67,12 @@ public class TopRatingColumnSelectionGridPanel extends ContentPanel implements
|
||||||
ColumnModel<ColumnData> cm = new ColumnModel<ColumnData>(l);
|
ColumnModel<ColumnData> cm = new ColumnModel<ColumnData>(l);
|
||||||
|
|
||||||
ListStore<ColumnData> store = new ListStore<ColumnData>(props.id());
|
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);
|
grid = new Grid<ColumnData>(store, cm);
|
||||||
sm.setSelectionMode(SelectionMode.SINGLE);
|
sm.setSelectionMode(SelectionMode.SINGLE);
|
||||||
|
|
Loading…
Reference in New Issue