Added i18n support for internationalization
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@113877 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
181981a669
commit
e626af275c
|
@ -11,6 +11,7 @@ import com.google.gwt.core.client.EntryPoint;
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.core.client.Scheduler;
|
import com.google.gwt.core.client.Scheduler;
|
||||||
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
|
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
|
||||||
|
import com.google.gwt.i18n.client.LocaleInfo;
|
||||||
import com.google.gwt.user.client.ui.RootPanel;
|
import com.google.gwt.user.client.ui.RootPanel;
|
||||||
import com.google.web.bindery.event.shared.EventBus;
|
import com.google.web.bindery.event.shared.EventBus;
|
||||||
import com.sencha.gxt.core.client.util.Margins;
|
import com.sencha.gxt.core.client.util.Margins;
|
||||||
|
@ -73,7 +74,16 @@ public class TabularDataPortlet implements EntryPoint {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void loadMainPanel() {
|
protected void loadMainPanel() {
|
||||||
|
String[] locales=LocaleInfo.getAvailableLocaleNames();
|
||||||
|
|
||||||
|
for(String locale:locales){
|
||||||
|
Log.debug("Locale avaible:"+locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
LocaleInfo currentLocale = LocaleInfo.getCurrentLocale();
|
||||||
|
Log.debug("Current Locale:"+currentLocale.getLocaleName());
|
||||||
|
|
||||||
|
|
||||||
TabularDataController controller = new TabularDataController();
|
TabularDataController controller = new TabularDataController();
|
||||||
EventBus eventBus = controller.getEventBus();
|
EventBus eventBus = controller.getEventBus();
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
package org.gcube.portlets.user.td.client.i18n;
|
||||||
|
|
||||||
|
import com.google.gwt.i18n.client.Messages;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author giancarlo
|
||||||
|
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface TDMMessages extends Messages {
|
||||||
|
@Key("newRuleTitle")
|
||||||
|
@DefaultMessage("New Rule")
|
||||||
|
String newRuleTitle();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.type.RibbonType;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.UIStateType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.UIStateType;
|
||||||
|
|
||||||
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.dom.client.Element;
|
import com.google.gwt.dom.client.Element;
|
||||||
import com.google.gwt.dom.client.NodeList;
|
import com.google.gwt.dom.client.NodeList;
|
||||||
import com.google.gwt.user.client.ui.FlexTable;
|
import com.google.gwt.user.client.ui.FlexTable;
|
||||||
|
@ -26,8 +27,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author giancarlo
|
* @author giancarlo email: <a
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class AnalyseToolBar {
|
public class AnalyseToolBar {
|
||||||
|
@ -35,15 +36,13 @@ public class AnalyseToolBar {
|
||||||
private EventBus eventBus;
|
private EventBus eventBus;
|
||||||
private ToolBar toolBar;
|
private ToolBar toolBar;
|
||||||
|
|
||||||
|
|
||||||
private TextButton chartCreateButton;
|
private TextButton chartCreateButton;
|
||||||
private TextButton statisticalButton;
|
private TextButton statisticalButton;
|
||||||
private TextButton rstudioButton;
|
private TextButton rstudioButton;
|
||||||
|
|
||||||
private TextButton gisButton;
|
private TextButton gisButton;
|
||||||
//private TextButton spreadButton;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public AnalyseToolBar(EventBus eventBus) {
|
public AnalyseToolBar(EventBus eventBus) {
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
build();
|
build();
|
||||||
|
@ -54,6 +53,8 @@ public class AnalyseToolBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void build() {
|
protected void build() {
|
||||||
|
AnalyseToolBarMessages msgs = GWT.create(AnalyseToolBarMessages.class);
|
||||||
|
|
||||||
toolBar = new ToolBar();
|
toolBar = new ToolBar();
|
||||||
toolBar.setSpacing(1);
|
toolBar.setSpacing(1);
|
||||||
toolBar.setEnableOverflow(false);
|
toolBar.setEnableOverflow(false);
|
||||||
|
@ -62,118 +63,110 @@ public class AnalyseToolBar {
|
||||||
ButtonGroup chartsGroup = new ButtonGroup();
|
ButtonGroup chartsGroup = new ButtonGroup();
|
||||||
chartsGroup.setId("Charts");
|
chartsGroup.setId("Charts");
|
||||||
chartsGroup.setStyleName("ribbon");
|
chartsGroup.setStyleName("ribbon");
|
||||||
chartsGroup.setHeadingText("Charts");
|
chartsGroup.setHeadingText(msgs.chartGroupHeadingText());
|
||||||
chartsGroup.enable();
|
chartsGroup.enable();
|
||||||
toolBar.add(chartsGroup);
|
toolBar.add(chartsGroup);
|
||||||
|
|
||||||
FlexTable basicLayout = new FlexTable();
|
FlexTable basicLayout = new FlexTable();
|
||||||
chartsGroup.add(basicLayout);
|
chartsGroup.add(basicLayout);
|
||||||
|
|
||||||
|
chartCreateButton = new TextButton(msgs.chartCreateButton(),
|
||||||
chartCreateButton = new TextButton("Create Chart",
|
|
||||||
TabularDataResources.INSTANCE.chartBar32());
|
TabularDataResources.INSTANCE.chartBar32());
|
||||||
chartCreateButton.disable();
|
chartCreateButton.disable();
|
||||||
chartCreateButton.setScale(ButtonScale.LARGE);
|
chartCreateButton.setScale(ButtonScale.LARGE);
|
||||||
chartCreateButton.setIconAlign(IconAlign.TOP);
|
chartCreateButton.setIconAlign(IconAlign.TOP);
|
||||||
chartCreateButton.setToolTip("Create chart");
|
chartCreateButton.setToolTip(msgs.chartCreateButtonToolTip());
|
||||||
chartCreateButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
chartCreateButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
chartCreateButton.addSelectHandler(new SelectHandler() {
|
chartCreateButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
eventBus.fireEvent(new
|
eventBus.fireEvent(new RibbonEvent(RibbonType.CHART_CREATE));
|
||||||
RibbonEvent(RibbonType.CHART_CREATE));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
basicLayout.setWidget(0, 0, chartCreateButton);
|
basicLayout.setWidget(0, 0, chartCreateButton);
|
||||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
basicLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
|
||||||
|
|
||||||
cleanCells(basicLayout.getElement());
|
cleanCells(basicLayout.getElement());
|
||||||
|
|
||||||
// Process
|
// Process
|
||||||
ButtonGroup processGroup = new ButtonGroup();
|
ButtonGroup processGroup = new ButtonGroup();
|
||||||
processGroup.setId("Process");
|
processGroup.setId("Process");
|
||||||
processGroup.setStyleName("ribbon");
|
processGroup.setStyleName("ribbon");
|
||||||
processGroup.setHeadingText("Process");
|
processGroup.setHeadingText(msgs.processGroupHeadingText());
|
||||||
processGroup.enable();
|
processGroup.enable();
|
||||||
toolBar.add(processGroup);
|
toolBar.add(processGroup);
|
||||||
|
|
||||||
FlexTable processLayout = new FlexTable();
|
FlexTable processLayout = new FlexTable();
|
||||||
processGroup.add(processLayout);
|
processGroup.add(processLayout);
|
||||||
|
|
||||||
rstudioButton = new TextButton("R Studio",
|
rstudioButton = new TextButton(msgs.rstudioButton(),
|
||||||
TabularDataResources.INSTANCE.rstudio32());
|
TabularDataResources.INSTANCE.rstudio32());
|
||||||
rstudioButton.disable();
|
rstudioButton.disable();
|
||||||
rstudioButton.setScale(ButtonScale.LARGE);
|
rstudioButton.setScale(ButtonScale.LARGE);
|
||||||
rstudioButton.setIconAlign(IconAlign.TOP);
|
rstudioButton.setIconAlign(IconAlign.TOP);
|
||||||
rstudioButton.setToolTip("R Studio");
|
rstudioButton.setToolTip(msgs.rstudioButtonToolTip());
|
||||||
rstudioButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
rstudioButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
rstudioButton.addSelectHandler(new SelectHandler() {
|
rstudioButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
eventBus.fireEvent(new RibbonEvent(RibbonType.R_STUDIO));
|
eventBus.fireEvent(new RibbonEvent(RibbonType.R_STUDIO));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
processLayout.setWidget(0, 0, rstudioButton);
|
processLayout.setWidget(0, 0, rstudioButton);
|
||||||
processLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
processLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
|
||||||
statisticalButton = new TextButton("Statistical",
|
statisticalButton = new TextButton(msgs.statisticalButton(),
|
||||||
TabularDataResources.INSTANCE.statistical32());
|
TabularDataResources.INSTANCE.statistical32());
|
||||||
statisticalButton.disable();
|
statisticalButton.disable();
|
||||||
statisticalButton.setScale(ButtonScale.LARGE);
|
statisticalButton.setScale(ButtonScale.LARGE);
|
||||||
statisticalButton.setIconAlign(IconAlign.TOP);
|
statisticalButton.setIconAlign(IconAlign.TOP);
|
||||||
statisticalButton.setToolTip("Statistical");
|
statisticalButton.setToolTip(msgs.statisticalButtonToolTip());
|
||||||
statisticalButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
statisticalButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
statisticalButton.addSelectHandler(new SelectHandler() {
|
statisticalButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
eventBus.fireEvent(new
|
eventBus.fireEvent(new RibbonEvent(RibbonType.STATISTICAL));
|
||||||
RibbonEvent(RibbonType.STATISTICAL));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
processLayout.setWidget(0, 1, statisticalButton);
|
processLayout.setWidget(0, 1, statisticalButton);
|
||||||
processLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
processLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
spreadButton = new TextButton("SPREAD",
|
* spreadButton = new TextButton("SPREAD",
|
||||||
TabularDataResources.INSTANCE.cog32());
|
* TabularDataResources.INSTANCE.cog32()); spreadButton.disable();
|
||||||
spreadButton.disable();
|
* spreadButton.setScale(ButtonScale.LARGE);
|
||||||
spreadButton.setScale(ButtonScale.LARGE);
|
* spreadButton.setIconAlign(IconAlign.TOP);
|
||||||
spreadButton.setIconAlign(IconAlign.TOP);
|
* spreadButton.setToolTip("SPREAD");
|
||||||
spreadButton.setToolTip("SPREAD");
|
* spreadButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
spreadButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
* spreadButton.addSelectHandler(new SelectHandler() {
|
||||||
spreadButton.addSelectHandler(new SelectHandler() {
|
*
|
||||||
|
* public void onSelect(SelectEvent event) { // eventBus.fireEvent(new
|
||||||
|
* // RibbonEvent(RibbonType.TABLEAGGREAGETE)); } });
|
||||||
|
*
|
||||||
|
* processLayout.setWidget(0, 2, spreadButton);
|
||||||
|
* processLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||||
|
*/
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
// eventBus.fireEvent(new
|
|
||||||
// RibbonEvent(RibbonType.TABLEAGGREAGETE));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
processLayout.setWidget(0, 2, spreadButton);
|
|
||||||
processLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
|
||||||
*/
|
|
||||||
|
|
||||||
cleanCells(processLayout.getElement());
|
cleanCells(processLayout.getElement());
|
||||||
|
|
||||||
// GIS
|
// GIS
|
||||||
ButtonGroup gisGroup = new ButtonGroup();
|
ButtonGroup gisGroup = new ButtonGroup();
|
||||||
gisGroup.setId("GIS");
|
gisGroup.setId("GIS");
|
||||||
gisGroup.setStyleName("ribbon");
|
gisGroup.setStyleName("ribbon");
|
||||||
gisGroup.setHeadingText("GIS");
|
gisGroup.setHeadingText(msgs.gisGroupHeadingText());
|
||||||
toolBar.add(gisGroup);
|
toolBar.add(gisGroup);
|
||||||
|
|
||||||
FlexTable gisLayout = new FlexTable();
|
FlexTable gisLayout = new FlexTable();
|
||||||
gisGroup.add(gisLayout);
|
gisGroup.add(gisLayout);
|
||||||
|
|
||||||
gisButton = new TextButton("Create Map",
|
gisButton = new TextButton(msgs.gisButton(),
|
||||||
TabularDataResources.INSTANCE.gis32());
|
TabularDataResources.INSTANCE.gis32());
|
||||||
gisButton.setScale(ButtonScale.LARGE);
|
gisButton.setScale(ButtonScale.LARGE);
|
||||||
gisButton.setIconAlign(IconAlign.TOP);
|
gisButton.setIconAlign(IconAlign.TOP);
|
||||||
gisButton.setToolTip("Create Map");
|
gisButton.setToolTip(msgs.gisButtonToolTip());
|
||||||
gisButton.disable();
|
gisButton.disable();
|
||||||
gisButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
gisButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
gisButton.addSelectHandler(new SelectHandler() {
|
gisButton.addSelectHandler(new SelectHandler() {
|
||||||
|
@ -194,8 +187,7 @@ public class AnalyseToolBar {
|
||||||
setUI(event);
|
setUI(event);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
package org.gcube.portlets.user.td.client.ribbon;
|
||||||
|
|
||||||
|
import com.google.gwt.i18n.client.Messages;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author giancarlo
|
||||||
|
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface AnalyseToolBarMessages extends Messages {
|
||||||
|
|
||||||
|
//
|
||||||
|
@DefaultMessage("Charts")
|
||||||
|
String chartGroupHeadingText();
|
||||||
|
|
||||||
|
@DefaultMessage("Create Charts")
|
||||||
|
String chartCreateButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Create Charts")
|
||||||
|
String chartCreateButtonToolTip();
|
||||||
|
|
||||||
|
//
|
||||||
|
@DefaultMessage("Process")
|
||||||
|
String processGroupHeadingText();
|
||||||
|
|
||||||
|
@DefaultMessage("R Studio")
|
||||||
|
String rstudioButton();
|
||||||
|
|
||||||
|
@DefaultMessage("R Studio")
|
||||||
|
String rstudioButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Statistical")
|
||||||
|
String statisticalButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Statistical")
|
||||||
|
String statisticalButtonToolTip();
|
||||||
|
|
||||||
|
//
|
||||||
|
@DefaultMessage("GIS")
|
||||||
|
String gisGroupHeadingText();
|
||||||
|
|
||||||
|
|
||||||
|
@DefaultMessage("Create Map")
|
||||||
|
String gisButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Create Map")
|
||||||
|
String gisButtonToolTip();
|
||||||
|
}
|
|
@ -11,6 +11,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.type.UIStateType;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||||
|
|
||||||
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.dom.client.Element;
|
import com.google.gwt.dom.client.Element;
|
||||||
import com.google.gwt.dom.client.NodeList;
|
import com.google.gwt.dom.client.NodeList;
|
||||||
import com.google.gwt.user.client.ui.FlexTable;
|
import com.google.gwt.user.client.ui.FlexTable;
|
||||||
|
@ -39,7 +40,8 @@ public class FileToolBar {
|
||||||
private TextButton openButton;
|
private TextButton openButton;
|
||||||
private TextButton cloneButton;
|
private TextButton cloneButton;
|
||||||
private TextButton closeButton;
|
private TextButton closeButton;
|
||||||
|
private TextButton shareButton;
|
||||||
|
|
||||||
private TextButton deleteButton;
|
private TextButton deleteButton;
|
||||||
private TextButton propertiesButton;
|
private TextButton propertiesButton;
|
||||||
|
|
||||||
|
@ -51,8 +53,6 @@ public class FileToolBar {
|
||||||
private TextButton exportCSVButton;
|
private TextButton exportCSVButton;
|
||||||
private TextButton exportJSONButton;
|
private TextButton exportJSONButton;
|
||||||
|
|
||||||
//Share
|
|
||||||
private TextButton shareButton;
|
|
||||||
|
|
||||||
private TextButton timelineButton;
|
private TextButton timelineButton;
|
||||||
private TextButton backgroundButton;
|
private TextButton backgroundButton;
|
||||||
|
@ -75,6 +75,8 @@ public class FileToolBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void build() {
|
protected void build() {
|
||||||
|
FileToolBarMessages msgs = GWT.create(FileToolBarMessages.class);
|
||||||
|
|
||||||
toolBar = new ToolBar();
|
toolBar = new ToolBar();
|
||||||
toolBar.setSpacing(1);
|
toolBar.setSpacing(1);
|
||||||
toolBar.setEnableOverflow(false);
|
toolBar.setEnableOverflow(false);
|
||||||
|
@ -83,20 +85,20 @@ public class FileToolBar {
|
||||||
ButtonGroup fileGroup = new ButtonGroup();
|
ButtonGroup fileGroup = new ButtonGroup();
|
||||||
fileGroup.setId("Tabular Resource");
|
fileGroup.setId("Tabular Resource");
|
||||||
fileGroup.setStyleName("ribbon");
|
fileGroup.setStyleName("ribbon");
|
||||||
fileGroup.setHeadingText("Tabular Resource");
|
fileGroup.setHeadingText(msgs.fileGroupHeadingText());
|
||||||
toolBar.add(fileGroup);
|
toolBar.add(fileGroup);
|
||||||
|
|
||||||
FlexTable fileLayout = new FlexTable();
|
FlexTable fileLayout = new FlexTable();
|
||||||
fileLayout.setStyleName("ribbon");
|
fileLayout.setStyleName("ribbon");
|
||||||
fileGroup.add(fileLayout);
|
fileGroup.add(fileLayout);
|
||||||
|
|
||||||
openButton = new TextButton("Open",
|
openButton = new TextButton(msgs.openButton(),
|
||||||
TabularDataResources.INSTANCE.open32());
|
TabularDataResources.INSTANCE.open32());
|
||||||
openButton.setId("openButton");
|
openButton.setId("openButton");
|
||||||
openButton.setScale(ButtonScale.LARGE);
|
openButton.setScale(ButtonScale.LARGE);
|
||||||
openButton.setIconAlign(IconAlign.TOP);
|
openButton.setIconAlign(IconAlign.TOP);
|
||||||
openButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
openButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
openButton.setToolTip("Open Tabular Resource");
|
openButton.setToolTip(msgs.openButtonToolTip());
|
||||||
|
|
||||||
openButton.addSelectHandler(new SelectHandler() {
|
openButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
@ -111,14 +113,14 @@ public class FileToolBar {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
closeButton = new TextButton("Close All",
|
closeButton = new TextButton(msgs.closeButton(),
|
||||||
TabularDataResources.INSTANCE.close32());
|
TabularDataResources.INSTANCE.close32());
|
||||||
closeButton.disable();
|
closeButton.disable();
|
||||||
closeButton.setId("closeButton");
|
closeButton.setId("closeButton");
|
||||||
closeButton.setScale(ButtonScale.LARGE);
|
closeButton.setScale(ButtonScale.LARGE);
|
||||||
closeButton.setIconAlign(IconAlign.TOP);
|
closeButton.setIconAlign(IconAlign.TOP);
|
||||||
closeButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
closeButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
closeButton.setToolTip("Close All Tabular Resources");
|
closeButton.setToolTip(msgs.closeButtonToolTip());
|
||||||
|
|
||||||
closeButton.addSelectHandler(new SelectHandler() {
|
closeButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
@ -131,14 +133,14 @@ public class FileToolBar {
|
||||||
fileLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
fileLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||||
|
|
||||||
|
|
||||||
cloneButton = new TextButton("Clone",
|
cloneButton = new TextButton(msgs.cloneButton(),
|
||||||
TabularDataResources.INSTANCE.clone32());
|
TabularDataResources.INSTANCE.clone32());
|
||||||
cloneButton.disable();
|
cloneButton.disable();
|
||||||
cloneButton.setId("cloneButton");
|
cloneButton.setId("cloneButton");
|
||||||
cloneButton.setScale(ButtonScale.LARGE);
|
cloneButton.setScale(ButtonScale.LARGE);
|
||||||
cloneButton.setIconAlign(IconAlign.TOP);
|
cloneButton.setIconAlign(IconAlign.TOP);
|
||||||
cloneButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
cloneButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
cloneButton.setToolTip("Clone Tabular Resource");
|
cloneButton.setToolTip(msgs.cloneButtonToolTip());
|
||||||
|
|
||||||
cloneButton.addSelectHandler(new SelectHandler() {
|
cloneButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
@ -151,14 +153,14 @@ public class FileToolBar {
|
||||||
fileLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
fileLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||||
|
|
||||||
|
|
||||||
shareButton = new TextButton("Share",
|
shareButton = new TextButton(msgs.shareButton(),
|
||||||
TabularDataResources.INSTANCE.share32());
|
TabularDataResources.INSTANCE.share32());
|
||||||
shareButton.disable();
|
shareButton.disable();
|
||||||
shareButton.setId("shareButton");
|
shareButton.setId("shareButton");
|
||||||
shareButton.setScale(ButtonScale.LARGE);
|
shareButton.setScale(ButtonScale.LARGE);
|
||||||
shareButton.setIconAlign(IconAlign.TOP);
|
shareButton.setIconAlign(IconAlign.TOP);
|
||||||
shareButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
shareButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
shareButton.setToolTip("Share Tabular Resource");
|
shareButton.setToolTip(msgs.shareButtonToolTip());
|
||||||
|
|
||||||
shareButton.addSelectHandler(new SelectHandler() {
|
shareButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
@ -171,11 +173,11 @@ public class FileToolBar {
|
||||||
fileLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
fileLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
||||||
|
|
||||||
|
|
||||||
deleteButton = new TextButton("Delete",
|
deleteButton = new TextButton(msgs.deleteButton(),
|
||||||
TabularDataResources.INSTANCE.delete());
|
TabularDataResources.INSTANCE.delete());
|
||||||
deleteButton.disable();
|
deleteButton.disable();
|
||||||
deleteButton.setId("closeButton");
|
deleteButton.setId("closeButton");
|
||||||
deleteButton.setToolTip("Delete Tabular Resource");
|
deleteButton.setToolTip(msgs.deleteButtonToolTip());
|
||||||
|
|
||||||
fileLayout.setWidget(0, 4, deleteButton);
|
fileLayout.setWidget(0, 4, deleteButton);
|
||||||
deleteButton.addSelectHandler(new SelectHandler() {
|
deleteButton.addSelectHandler(new SelectHandler() {
|
||||||
|
@ -185,11 +187,11 @@ public class FileToolBar {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
propertiesButton = new TextButton("Properties",
|
propertiesButton = new TextButton(msgs.propertiesButton(),
|
||||||
TabularDataResources.INSTANCE.properties());
|
TabularDataResources.INSTANCE.properties());
|
||||||
propertiesButton.disable();
|
propertiesButton.disable();
|
||||||
propertiesButton.setId("propertiesButton");
|
propertiesButton.setId("propertiesButton");
|
||||||
propertiesButton.setToolTip("Show properties");
|
propertiesButton.setToolTip(msgs.propertiesButtonToolTip());
|
||||||
|
|
||||||
fileLayout.setWidget(1, 4, propertiesButton);
|
fileLayout.setWidget(1, 4, propertiesButton);
|
||||||
propertiesButton.addSelectHandler(new SelectHandler() {
|
propertiesButton.addSelectHandler(new SelectHandler() {
|
||||||
|
@ -205,17 +207,17 @@ public class FileToolBar {
|
||||||
ButtonGroup importGroup = new ButtonGroup();
|
ButtonGroup importGroup = new ButtonGroup();
|
||||||
importGroup.setId("Import");
|
importGroup.setId("Import");
|
||||||
importGroup.setStyleName("ribbon");
|
importGroup.setStyleName("ribbon");
|
||||||
importGroup.setHeadingText("Import");
|
importGroup.setHeadingText(msgs.importGroupHeadingText());
|
||||||
toolBar.add(importGroup);
|
toolBar.add(importGroup);
|
||||||
|
|
||||||
FlexTable importLayout = new FlexTable();
|
FlexTable importLayout = new FlexTable();
|
||||||
importGroup.add(importLayout);
|
importGroup.add(importLayout);
|
||||||
|
|
||||||
importSDMXButton = new TextButton("SDMX",
|
importSDMXButton = new TextButton(msgs.importSDMXButton(),
|
||||||
TabularDataResources.INSTANCE.sdmx32());
|
TabularDataResources.INSTANCE.sdmx32());
|
||||||
importSDMXButton.setScale(ButtonScale.LARGE);
|
importSDMXButton.setScale(ButtonScale.LARGE);
|
||||||
importSDMXButton.setIconAlign(IconAlign.TOP);
|
importSDMXButton.setIconAlign(IconAlign.TOP);
|
||||||
importSDMXButton.setToolTip("Import table from SDMX source");
|
importSDMXButton.setToolTip(msgs.importSDMXButtonToolTip());
|
||||||
importSDMXButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
importSDMXButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
importSDMXButton.addSelectHandler(new SelectHandler() {
|
importSDMXButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
@ -227,11 +229,11 @@ public class FileToolBar {
|
||||||
importLayout.setWidget(0, 0, importSDMXButton);
|
importLayout.setWidget(0, 0, importSDMXButton);
|
||||||
importLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
importLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
|
||||||
importCSVButton = new TextButton("CSV",
|
importCSVButton = new TextButton(msgs.importCSVButton(),
|
||||||
TabularDataResources.INSTANCE.csv32());
|
TabularDataResources.INSTANCE.csv32());
|
||||||
importCSVButton.setScale(ButtonScale.LARGE);
|
importCSVButton.setScale(ButtonScale.LARGE);
|
||||||
importCSVButton.setIconAlign(IconAlign.TOP);
|
importCSVButton.setIconAlign(IconAlign.TOP);
|
||||||
importCSVButton.setToolTip("Import table from CSV source");
|
importCSVButton.setToolTip(msgs.importCSVButtonToolTip());
|
||||||
importCSVButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
importCSVButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
importCSVButton.addSelectHandler(new SelectHandler() {
|
importCSVButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
@ -262,17 +264,17 @@ public class FileToolBar {
|
||||||
ButtonGroup exportGroup = new ButtonGroup();
|
ButtonGroup exportGroup = new ButtonGroup();
|
||||||
exportGroup.setId("Export");
|
exportGroup.setId("Export");
|
||||||
exportGroup.setStyleName("ribbon");
|
exportGroup.setStyleName("ribbon");
|
||||||
exportGroup.setHeadingText("Export");
|
exportGroup.setHeadingText(msgs.exportGroupHeadingText());
|
||||||
// exportGroup.disable();
|
// exportGroup.disable();
|
||||||
toolBar.add(exportGroup);
|
toolBar.add(exportGroup);
|
||||||
|
|
||||||
FlexTable exportLayout = new FlexTable();
|
FlexTable exportLayout = new FlexTable();
|
||||||
exportGroup.add(exportLayout);
|
exportGroup.add(exportLayout);
|
||||||
|
|
||||||
exportSDMXButton = new TextButton("SDMX",
|
exportSDMXButton = new TextButton(msgs.exportSDMXButton(),
|
||||||
TabularDataResources.INSTANCE.sdmx32());
|
TabularDataResources.INSTANCE.sdmx32());
|
||||||
exportSDMXButton.disable();
|
exportSDMXButton.disable();
|
||||||
exportSDMXButton.setToolTip("Export SDMX document");
|
exportSDMXButton.setToolTip(msgs.exportSDMXButtonToolTip());
|
||||||
exportSDMXButton.setScale(ButtonScale.LARGE);
|
exportSDMXButton.setScale(ButtonScale.LARGE);
|
||||||
exportSDMXButton.setIconAlign(IconAlign.TOP);
|
exportSDMXButton.setIconAlign(IconAlign.TOP);
|
||||||
exportSDMXButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
exportSDMXButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
|
@ -286,10 +288,10 @@ public class FileToolBar {
|
||||||
exportLayout.setWidget(0, 0, exportSDMXButton);
|
exportLayout.setWidget(0, 0, exportSDMXButton);
|
||||||
exportLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
exportLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
|
||||||
exportCSVButton = new TextButton("CSV",
|
exportCSVButton = new TextButton(msgs.exportCSVButton(),
|
||||||
TabularDataResources.INSTANCE.csv());
|
TabularDataResources.INSTANCE.csv());
|
||||||
exportCSVButton.disable();
|
exportCSVButton.disable();
|
||||||
exportCSVButton.setToolTip("Export CSV document");
|
exportCSVButton.setToolTip(msgs.exportCSVButtonToolTip());
|
||||||
exportCSVButton.addSelectHandler(new SelectHandler() {
|
exportCSVButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
|
@ -298,10 +300,10 @@ public class FileToolBar {
|
||||||
});
|
});
|
||||||
exportLayout.setWidget(0, 2, exportCSVButton);
|
exportLayout.setWidget(0, 2, exportCSVButton);
|
||||||
|
|
||||||
exportJSONButton = new TextButton("JSON",
|
exportJSONButton = new TextButton(msgs.exportJSONButton(),
|
||||||
TabularDataResources.INSTANCE.json());
|
TabularDataResources.INSTANCE.json());
|
||||||
exportJSONButton.disable();
|
exportJSONButton.disable();
|
||||||
exportJSONButton.setToolTip("Export JSON document");
|
exportJSONButton.setToolTip(msgs.exportJSONButtonToolTip());
|
||||||
exportJSONButton.addSelectHandler(new SelectHandler() {
|
exportJSONButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
|
@ -316,16 +318,16 @@ public class FileToolBar {
|
||||||
ButtonGroup taskGroup = new ButtonGroup();
|
ButtonGroup taskGroup = new ButtonGroup();
|
||||||
taskGroup.setId("TasksStatus");
|
taskGroup.setId("TasksStatus");
|
||||||
taskGroup.setStyleName("ribbon");
|
taskGroup.setStyleName("ribbon");
|
||||||
taskGroup.setHeadingText("Tasks");
|
taskGroup.setHeadingText(msgs.taskGroupHeadingText());
|
||||||
toolBar.add(taskGroup);
|
toolBar.add(taskGroup);
|
||||||
|
|
||||||
FlexTable taskLayout = new FlexTable();
|
FlexTable taskLayout = new FlexTable();
|
||||||
taskGroup.add(taskLayout);
|
taskGroup.add(taskLayout);
|
||||||
|
|
||||||
timelineButton = new TextButton("Timeline",
|
timelineButton = new TextButton(msgs.timelineButton(),
|
||||||
TabularDataResources.INSTANCE.timeline32());
|
TabularDataResources.INSTANCE.timeline32());
|
||||||
timelineButton.disable();
|
timelineButton.disable();
|
||||||
timelineButton.setToolTip("Timeline");
|
timelineButton.setToolTip(msgs.timelineButtonToolTip());
|
||||||
timelineButton.setScale(ButtonScale.LARGE);
|
timelineButton.setScale(ButtonScale.LARGE);
|
||||||
timelineButton.setIconAlign(IconAlign.TOP);
|
timelineButton.setIconAlign(IconAlign.TOP);
|
||||||
timelineButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
timelineButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
|
@ -339,10 +341,10 @@ public class FileToolBar {
|
||||||
taskLayout.setWidget(0, 0, timelineButton);
|
taskLayout.setWidget(0, 0, timelineButton);
|
||||||
taskLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
taskLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
|
||||||
backgroundButton = new TextButton("Background",
|
backgroundButton = new TextButton(msgs.backgroundButton(),
|
||||||
TabularDataResources.INSTANCE.basketBackground32());
|
TabularDataResources.INSTANCE.basketBackground32());
|
||||||
backgroundButton.enable();
|
backgroundButton.enable();
|
||||||
backgroundButton.setToolTip("Tasks in background");
|
backgroundButton.setToolTip(msgs.backgroundButtonToolTip());
|
||||||
backgroundButton.setScale(ButtonScale.LARGE);
|
backgroundButton.setScale(ButtonScale.LARGE);
|
||||||
backgroundButton.setIconAlign(IconAlign.TOP);
|
backgroundButton.setIconAlign(IconAlign.TOP);
|
||||||
backgroundButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
backgroundButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
|
@ -362,19 +364,19 @@ public class FileToolBar {
|
||||||
ButtonGroup historyGroup = new ButtonGroup();
|
ButtonGroup historyGroup = new ButtonGroup();
|
||||||
historyGroup.setId("History");
|
historyGroup.setId("History");
|
||||||
historyGroup.setStyleName("ribbon");
|
historyGroup.setStyleName("ribbon");
|
||||||
historyGroup.setHeadingText("History");
|
historyGroup.setHeadingText(msgs.historyGroupHeadingText());
|
||||||
historyGroup.enable();
|
historyGroup.enable();
|
||||||
toolBar.add(historyGroup);
|
toolBar.add(historyGroup);
|
||||||
|
|
||||||
FlexTable historyLayout = new FlexTable();
|
FlexTable historyLayout = new FlexTable();
|
||||||
historyGroup.add(historyLayout);
|
historyGroup.add(historyLayout);
|
||||||
|
|
||||||
historyButton = new TextButton("History",
|
historyButton = new TextButton(msgs.historyButton(),
|
||||||
TabularDataResources.INSTANCE.history32());
|
TabularDataResources.INSTANCE.history32());
|
||||||
historyButton.disable();
|
historyButton.disable();
|
||||||
historyButton.setScale(ButtonScale.LARGE);
|
historyButton.setScale(ButtonScale.LARGE);
|
||||||
historyButton.setIconAlign(IconAlign.TOP);
|
historyButton.setIconAlign(IconAlign.TOP);
|
||||||
historyButton.setToolTip("Show history");
|
historyButton.setToolTip(msgs.historyButtonToolTip());
|
||||||
historyButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
historyButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
historyButton.addSelectHandler(new SelectHandler() {
|
historyButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
@ -386,12 +388,12 @@ public class FileToolBar {
|
||||||
historyLayout.setWidget(0, 0, historyButton);
|
historyLayout.setWidget(0, 0, historyButton);
|
||||||
historyLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
historyLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
|
||||||
undoButton = new TextButton("Undo",
|
undoButton = new TextButton(msgs.undoButton(),
|
||||||
TabularDataResources.INSTANCE.discard32());
|
TabularDataResources.INSTANCE.discard32());
|
||||||
undoButton.disable();
|
undoButton.disable();
|
||||||
undoButton.setScale(ButtonScale.LARGE);
|
undoButton.setScale(ButtonScale.LARGE);
|
||||||
undoButton.setIconAlign(IconAlign.TOP);
|
undoButton.setIconAlign(IconAlign.TOP);
|
||||||
undoButton.setToolTip("Discard last operation");
|
undoButton.setToolTip(msgs.undoButtonToolTip());
|
||||||
undoButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
undoButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
undoButton.addSelectHandler(new SelectHandler() {
|
undoButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
|
@ -408,16 +410,16 @@ public class FileToolBar {
|
||||||
ButtonGroup helpGroup = new ButtonGroup();
|
ButtonGroup helpGroup = new ButtonGroup();
|
||||||
helpGroup.setId("Help");
|
helpGroup.setId("Help");
|
||||||
helpGroup.setStyleName("ribbon");
|
helpGroup.setStyleName("ribbon");
|
||||||
helpGroup.setHeadingText("Help");
|
helpGroup.setHeadingText(msgs.helpGroupHeadingText());
|
||||||
toolBar.add(helpGroup);
|
toolBar.add(helpGroup);
|
||||||
|
|
||||||
FlexTable helpLayout = new FlexTable();
|
FlexTable helpLayout = new FlexTable();
|
||||||
helpGroup.add(helpLayout);
|
helpGroup.add(helpLayout);
|
||||||
|
|
||||||
helpButton = new TextButton("Help",
|
helpButton = new TextButton(msgs.helpButton(),
|
||||||
TabularDataResources.INSTANCE.help32());
|
TabularDataResources.INSTANCE.help32());
|
||||||
helpButton.enable();
|
helpButton.enable();
|
||||||
helpButton.setToolTip("Help");
|
helpButton.setToolTip(msgs.helpButtonToolTip());
|
||||||
helpButton.setScale(ButtonScale.LARGE);
|
helpButton.setScale(ButtonScale.LARGE);
|
||||||
helpButton.setIconAlign(IconAlign.TOP);
|
helpButton.setIconAlign(IconAlign.TOP);
|
||||||
helpButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
helpButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
|
|
|
@ -0,0 +1,145 @@
|
||||||
|
package org.gcube.portlets.user.td.client.ribbon;
|
||||||
|
|
||||||
|
import com.google.gwt.i18n.client.Messages;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author giancarlo
|
||||||
|
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface FileToolBarMessages extends Messages {
|
||||||
|
|
||||||
|
//
|
||||||
|
@DefaultMessage("Tabular Resource")
|
||||||
|
String fileGroupHeadingText();
|
||||||
|
|
||||||
|
@DefaultMessage("Open")
|
||||||
|
String openButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Open Tabular Resource")
|
||||||
|
String openButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Close All")
|
||||||
|
String closeButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Close All Tabular Resources")
|
||||||
|
String closeButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Clone")
|
||||||
|
String cloneButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Clone Tabular Resource")
|
||||||
|
String cloneButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Share")
|
||||||
|
String shareButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Share Tabular Resource")
|
||||||
|
String shareButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Delete")
|
||||||
|
String deleteButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Delete Tabular Resource")
|
||||||
|
String deleteButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Properties")
|
||||||
|
String propertiesButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Show properties")
|
||||||
|
String propertiesButtonToolTip();
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
@DefaultMessage("Import")
|
||||||
|
String importGroupHeadingText();
|
||||||
|
|
||||||
|
@DefaultMessage("SDMX")
|
||||||
|
String importSDMXButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Import table from SDMX source")
|
||||||
|
String importSDMXButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("CSV")
|
||||||
|
String importCSVButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Import table from CSV source")
|
||||||
|
String importCSVButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("JSON")
|
||||||
|
String importJSONButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Import table from JSON source")
|
||||||
|
String importJSONButtonToolTip();
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
@DefaultMessage("Export")
|
||||||
|
String exportGroupHeadingText();
|
||||||
|
|
||||||
|
@DefaultMessage("SDMX")
|
||||||
|
String exportSDMXButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Export SDMX document")
|
||||||
|
String exportSDMXButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("CSV")
|
||||||
|
String exportCSVButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Export CSV document")
|
||||||
|
String exportCSVButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("JSON")
|
||||||
|
String exportJSONButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Export JSON document")
|
||||||
|
String exportJSONButtonToolTip();
|
||||||
|
|
||||||
|
//
|
||||||
|
@DefaultMessage("Tasks")
|
||||||
|
String taskGroupHeadingText();
|
||||||
|
|
||||||
|
@DefaultMessage("Timeline")
|
||||||
|
String timelineButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Timeline")
|
||||||
|
String timelineButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Background")
|
||||||
|
String backgroundButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Tasks in background")
|
||||||
|
String backgroundButtonToolTip();
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
@DefaultMessage("History")
|
||||||
|
String historyGroupHeadingText();
|
||||||
|
|
||||||
|
@DefaultMessage("History")
|
||||||
|
String historyButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Show history")
|
||||||
|
String historyButtonToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Undo")
|
||||||
|
String undoButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Discard last operation")
|
||||||
|
String undoButtonToolTip();
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
@DefaultMessage("Help")
|
||||||
|
String helpGroupHeadingText();
|
||||||
|
|
||||||
|
@DefaultMessage("Help")
|
||||||
|
String helpButton();
|
||||||
|
|
||||||
|
@DefaultMessage("Help")
|
||||||
|
String helpButtonToolTip();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -4,6 +4,7 @@
|
||||||
package org.gcube.portlets.user.td.client.ribbon;
|
package org.gcube.portlets.user.td.client.ribbon;
|
||||||
|
|
||||||
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.web.bindery.event.shared.EventBus;
|
import com.google.web.bindery.event.shared.EventBus;
|
||||||
import com.sencha.gxt.widget.core.client.TabPanel;
|
import com.sencha.gxt.widget.core.client.TabPanel;
|
||||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||||
|
@ -19,7 +20,7 @@ import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.Verti
|
||||||
public class TabularDataRibbon {
|
public class TabularDataRibbon {
|
||||||
|
|
||||||
private static final String RIBBON_HEIGHT = "100px";
|
private static final String RIBBON_HEIGHT = "100px";
|
||||||
|
|
||||||
private TabPanel ribbon;
|
private TabPanel ribbon;
|
||||||
|
|
||||||
//private PlainTabPanel ribbon;
|
//private PlainTabPanel ribbon;
|
||||||
|
@ -33,6 +34,8 @@ public class TabularDataRibbon {
|
||||||
|
|
||||||
public TabularDataRibbon(EventBus eventBus) {
|
public TabularDataRibbon(EventBus eventBus) {
|
||||||
try {
|
try {
|
||||||
|
TabularDataRibbonMessages msgs = GWT.create(TabularDataRibbonMessages.class);
|
||||||
|
|
||||||
ribbon = new TabPanel();
|
ribbon = new TabPanel();
|
||||||
ribbon.setId("Ribbon");
|
ribbon.setId("Ribbon");
|
||||||
ribbon.setHeight(RIBBON_HEIGHT);
|
ribbon.setHeight(RIBBON_HEIGHT);
|
||||||
|
@ -42,33 +45,33 @@ public class TabularDataRibbon {
|
||||||
fileToolBar = new FileToolBar(eventBus);
|
fileToolBar = new FileToolBar(eventBus);
|
||||||
VerticalLayoutContainer con = new VerticalLayoutContainer();
|
VerticalLayoutContainer con = new VerticalLayoutContainer();
|
||||||
con.add(fileToolBar.getToolBar(), vldata);
|
con.add(fileToolBar.getToolBar(), vldata);
|
||||||
ribbon.add(con, "Home");
|
ribbon.add(con, msgs.home());
|
||||||
|
|
||||||
curationToolBar = new CurationToolBar(eventBus);
|
curationToolBar = new CurationToolBar(eventBus);
|
||||||
con = new VerticalLayoutContainer();
|
con = new VerticalLayoutContainer();
|
||||||
|
|
||||||
con.add(curationToolBar.getToolBar(), vldata);
|
con.add(curationToolBar.getToolBar(), vldata);
|
||||||
ribbon.add(con, "Curation");
|
ribbon.add(con, msgs.curation());
|
||||||
|
|
||||||
modifyToolBar = new ModifyToolBar(eventBus);
|
modifyToolBar = new ModifyToolBar(eventBus);
|
||||||
con = new VerticalLayoutContainer();
|
con = new VerticalLayoutContainer();
|
||||||
con.add(modifyToolBar.getToolBar(), vldata);
|
con.add(modifyToolBar.getToolBar(), vldata);
|
||||||
ribbon.add(con, "Modify");
|
ribbon.add(con, msgs.modify());
|
||||||
|
|
||||||
ruleToolBar = new RuleToolBar(eventBus);
|
ruleToolBar = new RuleToolBar(eventBus);
|
||||||
con = new VerticalLayoutContainer();
|
con = new VerticalLayoutContainer();
|
||||||
con.add(ruleToolBar.getToolBar(), vldata);
|
con.add(ruleToolBar.getToolBar(), vldata);
|
||||||
ribbon.add(con, "Rule");
|
ribbon.add(con, msgs.rule());
|
||||||
|
|
||||||
templateToolBar = new TemplateToolBar(eventBus);
|
templateToolBar = new TemplateToolBar(eventBus);
|
||||||
con = new VerticalLayoutContainer();
|
con = new VerticalLayoutContainer();
|
||||||
con.add(templateToolBar.getToolBar(), vldata);
|
con.add(templateToolBar.getToolBar(), vldata);
|
||||||
ribbon.add(con, "Template");
|
ribbon.add(con, msgs.template());
|
||||||
|
|
||||||
analyseToolBar = new AnalyseToolBar(eventBus);
|
analyseToolBar = new AnalyseToolBar(eventBus);
|
||||||
con = new VerticalLayoutContainer();
|
con = new VerticalLayoutContainer();
|
||||||
con.add(analyseToolBar.getToolBar(), vldata);
|
con.add(analyseToolBar.getToolBar(), vldata);
|
||||||
ribbon.add(con, "Analyse");
|
ribbon.add(con, msgs.analyse());
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
package org.gcube.portlets.user.td.client.ribbon;
|
||||||
|
|
||||||
|
import com.google.gwt.i18n.client.Messages;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author giancarlo
|
||||||
|
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface TabularDataRibbonMessages extends Messages {
|
||||||
|
|
||||||
|
@DefaultMessage("Home")
|
||||||
|
String home();
|
||||||
|
|
||||||
|
@DefaultMessage("Curation")
|
||||||
|
String curation();
|
||||||
|
|
||||||
|
@DefaultMessage("Modify")
|
||||||
|
String modify();
|
||||||
|
|
||||||
|
@DefaultMessage("Rule")
|
||||||
|
String rule();
|
||||||
|
|
||||||
|
@DefaultMessage("Template")
|
||||||
|
String template();
|
||||||
|
|
||||||
|
@DefaultMessage("Analyse")
|
||||||
|
String analyse();
|
||||||
|
}
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<inherits name='com.google.gwt.user.User' />
|
<inherits name='com.google.gwt.user.User' />
|
||||||
<inherits name="com.google.gwt.http.HTTP"/>
|
<inherits name="com.google.gwt.http.HTTP"/>
|
||||||
<!-- Other module inherits -->
|
<inherits name="com.google.gwt.i18n.I18N" />
|
||||||
|
|
||||||
<!-- <inherits name='com.extjs.gxt.ui.GXT' /> -->
|
<!-- <inherits name='com.extjs.gxt.ui.GXT' /> -->
|
||||||
<inherits name='com.sencha.gxt.ui.GXT' />
|
<inherits name='com.sencha.gxt.ui.GXT' />
|
||||||
|
@ -69,6 +69,25 @@
|
||||||
|
|
||||||
<!-- Specify the app entry point class. -->
|
<!-- Specify the app entry point class. -->
|
||||||
<entry-point class='org.gcube.portlets.user.td.client.TabularDataPortlet' />
|
<entry-point class='org.gcube.portlets.user.td.client.TabularDataPortlet' />
|
||||||
|
|
||||||
|
<set-configuration-property name="locale.cookie"
|
||||||
|
value="lang" />
|
||||||
|
<set-configuration-property name="locale.queryparam"
|
||||||
|
value="lang" />
|
||||||
|
<set-configuration-property name="locale.usemeta"
|
||||||
|
value="Y" />
|
||||||
|
<set-configuration-property name="locale.useragent"
|
||||||
|
value="Y" />
|
||||||
|
|
||||||
|
<set-configuration-property name="locale.searchorder"
|
||||||
|
value="cookie,queryparam,meta,useragent" />
|
||||||
|
|
||||||
|
<extend-property name="locale" values="en" />
|
||||||
|
<extend-property name="locale" values="it" />
|
||||||
|
<extend-property name="locale" values="es" />
|
||||||
|
<set-property name="locale" value="en, it, es" />
|
||||||
|
<set-property-fallback name="locale" value="en" />
|
||||||
|
|
||||||
<!-- <set-property name="log_DivLogger" value="ENABLED" /> <set-property
|
<!-- <set-property name="log_DivLogger" value="ENABLED" /> <set-property
|
||||||
name="log_ConsoleLogger" value="ENABLED" /> <set-property name="log_GWTLogger" value="ENABLED" />
|
name="log_ConsoleLogger" value="ENABLED" /> <set-property name="log_GWTLogger" value="ENABLED" />
|
||||||
<set-property name="log_SystemLogger" value="ENABLED" /> -->
|
<set-property name="log_SystemLogger" value="ENABLED" /> -->
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
newRuleTitle = New Rule
|
|
@ -0,0 +1 @@
|
||||||
|
newRuleTitle = Nuova Regola
|
|
@ -0,0 +1 @@
|
||||||
|
newRuleTitle = Nuova Regola
|
|
@ -0,0 +1,11 @@
|
||||||
|
chartGroupHeadingText = Charts
|
||||||
|
chartCreateButton = Create Charts
|
||||||
|
chartCreateButtonToolTip = Create Charts
|
||||||
|
processGroupHeadingText = Process
|
||||||
|
rstudioButton = R Studio
|
||||||
|
rstudioButtonToolTip = R Studio
|
||||||
|
statisticalButton = Statistical
|
||||||
|
statisticalButtonToolTip = Statistical
|
||||||
|
gisGroupHeadingText = GIS
|
||||||
|
gisButton = Create Map
|
||||||
|
gisButtonToolTip = Create Map
|
|
@ -0,0 +1,11 @@
|
||||||
|
chartGroupHeadingText = Grficos
|
||||||
|
chartCreateButton = Crea Gráfico
|
||||||
|
chartCreateButtonToolTip = Crea Gráficos
|
||||||
|
processGroupHeadingText = Tratamiento
|
||||||
|
rstudioButton = R Studio
|
||||||
|
rstudioButtonToolTip = R Studio
|
||||||
|
statisticalButton = Statistical
|
||||||
|
statisticalButtonToolTip = Statistical
|
||||||
|
gisGroupHeadingText = GIS
|
||||||
|
gisButton = Crear un mapa
|
||||||
|
gisButtonToolTip = Crear un mapa
|
|
@ -0,0 +1,11 @@
|
||||||
|
chartGroupHeadingText = Grafici
|
||||||
|
chartCreateButton = Crea Grafici
|
||||||
|
chartCreateButtonToolTip = Crea Grafici
|
||||||
|
processGroupHeadingText = Elaborazioni
|
||||||
|
rstudioButton = R Studio
|
||||||
|
rstudioButtonToolTip = R Studio
|
||||||
|
statisticalButton = Statistical
|
||||||
|
statisticalButtonToolTip = Statistical
|
||||||
|
gisGroupHeadingText = GIS
|
||||||
|
gisButton = Crea Mappa
|
||||||
|
gisButtonToolTip = Crea Mappa
|
|
@ -0,0 +1,40 @@
|
||||||
|
fileGroupHeadingText = Tabular Resource
|
||||||
|
openButton = Open
|
||||||
|
openButtonToolTip = Open Tabular Resource
|
||||||
|
closeButton = Close All
|
||||||
|
closeButtonToolTip = Close All Tabular Resources
|
||||||
|
cloneButton = Clone
|
||||||
|
cloneButtonToolTip = Clone Tabular Resource
|
||||||
|
shareButton = Share
|
||||||
|
shareButtonToolTip = Share Tabular Resource
|
||||||
|
deleteButton = Delete
|
||||||
|
deleteButtonToolTip = Delete Tabular Resource
|
||||||
|
propertiesButton = Properties
|
||||||
|
propertiesButtonToolTip = Show Properties
|
||||||
|
importGroupHeadingText = Import
|
||||||
|
importSDMXButton = SDMX
|
||||||
|
importSDMXButtonToolTip = Import table from SDMX source
|
||||||
|
importCSVButton = CSV
|
||||||
|
importCSVButtonToolTip = Import table from CSV source
|
||||||
|
importJSONButton = JSON
|
||||||
|
importJSONButtonToolTip = Import table from JSON source
|
||||||
|
exportGroupHeadingText = Export
|
||||||
|
exportSDMXButton = SDMX
|
||||||
|
exportSDMXButtonToolTip = Export SDMX document
|
||||||
|
exportCSVButton = CSV
|
||||||
|
exportCSVButtonToolTip = Export CSV document
|
||||||
|
exportJSONButton = JSON
|
||||||
|
exportJSONButtonToolTip = Export JSON document
|
||||||
|
taskGroupHeadingText = Tasks
|
||||||
|
timelineButton = Timeline
|
||||||
|
timelineButtonToolTip = Timeline
|
||||||
|
backgroundButton = Background
|
||||||
|
backgroundButtonToolTip = Tasks in background
|
||||||
|
historyGroupHeadingText = History
|
||||||
|
historyButton = History
|
||||||
|
historyButtonToolTip = Show history
|
||||||
|
undoButton = Undo
|
||||||
|
undoButtonToolTip = Discard last operation
|
||||||
|
helpGroupHeadingText = Help
|
||||||
|
helpButton = Help
|
||||||
|
helpButtonToolTip = Help
|
|
@ -0,0 +1,40 @@
|
||||||
|
fileGroupHeadingText = Tabular Resource
|
||||||
|
openButton = Abierto
|
||||||
|
openButtonToolTip = Abierto Tabular Resource
|
||||||
|
closeButton = Cerca de todo
|
||||||
|
closeButtonToolTip = Cerrar todas las Tabular Resources
|
||||||
|
cloneButton = Clon
|
||||||
|
cloneButtonToolTip = Clon Tabular Resource
|
||||||
|
shareButton = Cuota
|
||||||
|
shareButtonToolTip = Cuota la Tabular Resource
|
||||||
|
deleteButton = Borrar
|
||||||
|
deleteButtonToolTip = Eliminar la Tabular Resource
|
||||||
|
propertiesButton = Propiedades
|
||||||
|
propertiesButtonToolTip = Muestra las propiedades
|
||||||
|
importGroupHeadingText = Importaciòn
|
||||||
|
importSDMXButton = SDMX
|
||||||
|
importSDMXButtonToolTip = Importar una tabla de una fuente SDMX
|
||||||
|
importCSVButton = CSV
|
||||||
|
importCSVButtonToolTip = Importar una tabla de una fuente CSV
|
||||||
|
importJSONButton = JSON
|
||||||
|
importJSONButtonToolTip = Importar una tabla de una fuente JSON
|
||||||
|
exportGroupHeadingText = Exportaciòn
|
||||||
|
exportSDMXButton = SDMX
|
||||||
|
exportSDMXButtonToolTip = Documento de exportaciòn como SDMX
|
||||||
|
exportCSVButton = CSV
|
||||||
|
exportCSVButtonToolTip = Documento de exportaciòn como CSV
|
||||||
|
exportJSONButton = JSON
|
||||||
|
exportJSONButtonToolTip = Documento de exportaciòn como JSON
|
||||||
|
taskGroupHeadingText = Tareas
|
||||||
|
timelineButton = Timeline
|
||||||
|
timelineButtonToolTip = Timeline
|
||||||
|
backgroundButton = Background
|
||||||
|
backgroundButtonToolTip = Tareas en segundo plano
|
||||||
|
historyGroupHeadingText = Historia
|
||||||
|
historyButton = Historia
|
||||||
|
historyButtonToolTip = Mostrar historial
|
||||||
|
undoButton = Deshacer
|
||||||
|
undoButtonToolTip = Olvidese de la ùltima operaciòn
|
||||||
|
helpGroupHeadingText = Ayuda
|
||||||
|
helpButton = Ayuda
|
||||||
|
helpButtonToolTip = Ayuda
|
|
@ -0,0 +1,40 @@
|
||||||
|
fileGroupHeadingText = Tabular Resource
|
||||||
|
openButton = Apri
|
||||||
|
openButtonToolTip = Apri Tabular Resource
|
||||||
|
closeButton = Chiudi tutto
|
||||||
|
closeButtonToolTip = Chiudi tutte le Tabular Resources
|
||||||
|
cloneButton = Clona
|
||||||
|
cloneButtonToolTip = Clona Tabular Resource
|
||||||
|
shareButton = Condividi
|
||||||
|
shareButtonToolTip = Condividi Tabular Resource
|
||||||
|
deleteButton = Elimina
|
||||||
|
deleteButtonToolTip = Elimina la Tabular Resource
|
||||||
|
propertiesButton = Propietà
|
||||||
|
propertiesButtonToolTip = Mostra Propietà
|
||||||
|
importGroupHeadingText = Importa
|
||||||
|
importSDMXButton = SDMX
|
||||||
|
importSDMXButtonToolTip = Importa una tabella da una sorgente SDMX
|
||||||
|
importCSVButton = CSV
|
||||||
|
importCSVButtonToolTip = Importa una tabella da una sorgente CSV
|
||||||
|
importJSONButton = JSON
|
||||||
|
importJSONButtonToolTip = Importa una tabella da una sorgente JSON
|
||||||
|
exportGroupHeadingText = Esporta
|
||||||
|
exportSDMXButton = SDMX
|
||||||
|
exportSDMXButtonToolTip = Esporta come documento SDMX
|
||||||
|
exportCSVButton = CSV
|
||||||
|
exportCSVButtonToolTip = Esporta come documento CSV
|
||||||
|
exportJSONButton = JSON
|
||||||
|
exportJSONButtonToolTip = Esporta come documento JSON
|
||||||
|
taskGroupHeadingText = Tasks
|
||||||
|
timelineButton = Timeline
|
||||||
|
timelineButtonToolTip = Timeline
|
||||||
|
backgroundButton = Background
|
||||||
|
backgroundButtonToolTip = Tasks in background
|
||||||
|
historyGroupHeadingText = History
|
||||||
|
historyButton = History
|
||||||
|
historyButtonToolTip = Mostra history
|
||||||
|
undoButton = Indietro
|
||||||
|
undoButtonToolTip = Dimentica l''ultima operazione
|
||||||
|
helpGroupHeadingText = Aiuto
|
||||||
|
helpButton = Aiuto
|
||||||
|
helpButtonToolTip = Aiuto
|
|
@ -0,0 +1,6 @@
|
||||||
|
home = Home
|
||||||
|
curation = Curation
|
||||||
|
modify = Modify
|
||||||
|
rule = Rule
|
||||||
|
template = Template
|
||||||
|
analyse = Analyse
|
|
@ -0,0 +1,6 @@
|
||||||
|
home = Home
|
||||||
|
curation = Curación
|
||||||
|
modify = Modificar
|
||||||
|
rule = Regla
|
||||||
|
template = Plantilla
|
||||||
|
analyse = Analizar
|
|
@ -0,0 +1,6 @@
|
||||||
|
home = Home
|
||||||
|
curation = Curation
|
||||||
|
modify = Modifica
|
||||||
|
rule = Regole
|
||||||
|
template = Template
|
||||||
|
analyse = Analisi
|
|
@ -3,7 +3,8 @@
|
||||||
|
|
||||||
<inherits name='com.google.gwt.user.User' />
|
<inherits name='com.google.gwt.user.User' />
|
||||||
<inherits name="com.google.gwt.http.HTTP"/>
|
<inherits name="com.google.gwt.http.HTTP"/>
|
||||||
<!-- Other module inherits -->
|
<inherits name="com.google.gwt.i18n.I18N" />
|
||||||
|
|
||||||
<!-- <inherits name='com.extjs.gxt.ui.GXT' /> -->
|
<!-- <inherits name='com.extjs.gxt.ui.GXT' /> -->
|
||||||
<inherits name='com.sencha.gxt.ui.GXT' />
|
<inherits name='com.sencha.gxt.ui.GXT' />
|
||||||
|
|
||||||
|
@ -76,6 +77,25 @@
|
||||||
<!-- Specify the app entry point class. -->
|
<!-- Specify the app entry point class. -->
|
||||||
<entry-point class='org.gcube.portlets.user.td.client.TabularDataPortlet' />
|
<entry-point class='org.gcube.portlets.user.td.client.TabularDataPortlet' />
|
||||||
|
|
||||||
|
<set-configuration-property name="locale.cookie"
|
||||||
|
value="lang" />
|
||||||
|
<set-configuration-property name="locale.queryparam"
|
||||||
|
value="lang" />
|
||||||
|
<set-configuration-property name="locale.usemeta"
|
||||||
|
value="Y" />
|
||||||
|
<set-configuration-property name="locale.useragent"
|
||||||
|
value="Y" />
|
||||||
|
|
||||||
|
<set-configuration-property name="locale.searchorder"
|
||||||
|
value="cookie,queryparam,meta,useragent" />
|
||||||
|
|
||||||
|
<extend-property name="locale" values="en" />
|
||||||
|
<extend-property name="locale" values="it" />
|
||||||
|
<extend-property name="locale" values="es" />
|
||||||
|
<set-property name="locale" value="en, it, es" />
|
||||||
|
<set-property-fallback name="locale" value="en" />
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<set-property name="log_ConsoleLogger" value="ENABLED" />
|
<set-property name="log_ConsoleLogger" value="ENABLED" />
|
||||||
<set-property name="log_DivLogger" value="ENABLED" />
|
<set-property name="log_DivLogger" value="ENABLED" />
|
||||||
|
|
Loading…
Reference in New Issue