Added wiki link

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-toolbox-widget@114585 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-04-29 14:59:43 +00:00 committed by Giancarlo Panichi
parent e4f173109f
commit 8322c7e287
12 changed files with 116 additions and 41 deletions

View File

@ -1,31 +1,45 @@
package org.gcube.portlets.user.td.toolboxwidget.client.help;
import org.gcube.portlets.user.td.monitorwidget.client.utils.UtilsGXT3;
import org.gcube.portlets.user.td.toolboxwidget.client.resources.ResourceBundle;
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ResourceCallback;
import com.google.gwt.resources.client.ResourceException;
import com.google.gwt.resources.client.TextResource;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.HTML;
import com.google.web.bindery.event.shared.EventBus;
import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign;
import com.sencha.gxt.core.client.util.Margins;
import com.sencha.gxt.widget.core.client.FramedPanel;
import com.sencha.gxt.widget.core.client.button.TextButton;
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
import com.sencha.gxt.widget.core.client.event.SelectEvent;
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
import com.sencha.gxt.widget.core.client.form.FieldSet;
/**
*
* @author giancarlo
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author giancarlo email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class HelpPanel extends FramedPanel {
private HelpPanelMessages msgs;
//private String headingTitle;
//private HashMap<String, String> tabularResourcePropertiesMap;
// private String headingTitle;
// private HashMap<String, String> tabularResourcePropertiesMap;
private VerticalLayoutContainer vl;
//private EventBus eventBus;
// private EventBus eventBus;
private FieldSet contents;
private VerticalLayoutContainer layoutCaptions;
private TextButton wikiButton;
public HelpPanel(String name, EventBus eventBus) {
super();
@ -40,11 +54,9 @@ public class HelpPanel extends FramedPanel {
this.add(vl);
}
public void addContents() {
HTML title = new HTML("<H2>"+msgs.helpPanelTitle()+"<H2>");
HTML title = new HTML("<H2>" + msgs.helpPanelTitle() + "<H2>");
vl.add(title, new VerticalLayoutData(-1, -1, new Margins(1, 1, 10, 1)));
contents = new FieldSet();
@ -56,44 +68,60 @@ public class HelpPanel extends FramedPanel {
contents.add(layoutCaptions);
HTML info = new HTML(msgs.info());
layoutCaptions
.add(info, new VerticalLayoutData(1, -1, new Margins(1)));
wikiButton = new TextButton(msgs.wikiButton());
wikiButton.setIcon(ResourceBundle.INSTANCE.wiki());
wikiButton.setIconAlign(IconAlign.RIGHT);
wikiButton.setToolTip(msgs.wikiButtonToolTip());
SelectHandler wikiHandler = new SelectHandler() {
public void onSelect(SelectEvent event) {
onWiki();
}
};
wikiButton.addSelectHandler(wikiHandler);
layoutCaptions.add(info, new VerticalLayoutData(1, -1, new Margins(1)));
layoutCaptions.add(wikiButton, new VerticalLayoutData(-1, -1,
new Margins(1)));
vl.add(contents, new VerticalLayoutData(1, -1, new Margins(1)));
}
/*
* protected void getLastTable(TRId trId) { TDGWTServiceAsync.INSTANCE
* .getLastTable(trId,new AsyncCallback<TableData>() {
*
* public void onSuccess(TableData result) { updateTable(result);
* Log.info("Retrived LastTable:" + result.getName());
*
* }
*
* public void onFailure(Throwable caught) { AlertMessageBox d = new
* AlertMessageBox("Error", "Error retrienving Last Table: " +
* caught.getLocalizedMessage()); d.addHideHandler(new HideHandler() {
*
* public void onHide(HideEvent event) { //
*
* }
*
* }); d.show();
*
* }
*
* }); }
*/
private void onWiki() {
try {
ResourceBundle.INSTANCE.linksProperties().getText(
new ResourceCallback<TextResource>() {
public void onError(ResourceException e) {
Log.error("Error retrieving wiki link!: "
+ e.getLocalizedMessage());
UtilsGXT3.alert("Error",
"Error retrieving wiki link!");
}
public void onSuccess(TextResource r) {
openWiki(r);
}
});
} catch (ResourceException e) {
Log.error("Error retrieving wiki link!: " + e.getLocalizedMessage());
UtilsGXT3.alert("Error", "Error retrieving wiki link!");
e.printStackTrace();
}
}
private void openWiki(TextResource r) {
String s = r.getText();
Window.open(s,
"Tabular Data Manager Wiki", "");
}
public void initInformation() {
addContents();
}
}

View File

@ -21,4 +21,11 @@ public interface HelpPanelMessages extends Messages {
String info();
@DefaultMessage("Wiki")
String wikiButton();
@DefaultMessage("Tabular Data Manager Wiki")
String wikiButtonToolTip();
}

View File

@ -0,0 +1,32 @@
package org.gcube.portlets.user.td.toolboxwidget.client.resources;
import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.resources.client.ExternalTextResource;
import com.google.gwt.resources.client.ImageResource;
/**
* Resource Bundle
*
* @author "Giancarlo Panichi"
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public interface ResourceBundle extends ClientBundle {
public static final ResourceBundle INSTANCE=GWT.create(ResourceBundle.class);
@Source("wiki_link.txt")
ExternalTextResource linksProperties();
@Source("tabular-data-wiki.png")
ImageResource wiki();
@Source("tabular-data-wiki_32.png")
ImageResource wiki32();
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1 @@
http://gcube.wiki.gcube-system.org/gcube/index.php/Tabular_Data_Manager

View File

@ -8,4 +8,6 @@ Tabular Resource are used in many domains ranging from statistics to signal proc
and econometrics. Tabular Data Manager offers a rich set of facilities ranging \
from those supporting the assessment of data correctness to those supporting \
the verification of the compliance of data with given code lists, \
the aggregation and filtering of data.</p>
the aggregation and filtering of data.</p>
wikiButton=Wiki
wikiButtonToolTip=Tabular Data Manager Wiki

View File

@ -8,4 +8,6 @@ de un determinado evento o fenómeno en diferentes intervalos de tiempo. \
y econometría. Tabular Data Manager ofrece un amplio conjunto de servicios que van \
por quienes soliciten la evaluación de la corrección de datos a los que apoyan \
la verificación del cumplimiento de los datos con listas de códigos dados, \
la agregación y filtrado de datos. </p>
la agregación y filtrado de datos. </p>
wikiButton=Wiki
wikiButtonToolTip=Tabular Data Manager Wiki

View File

@ -9,4 +9,6 @@ Le <em>Tabular Resources</em> sono usate in molti domini, nella statistica, nel
e nell''econometria. Tabular Data Manager offre un ricco insieme di strumenti sia \
quelli di sostegno alla valutazione della correttezza dei dati, sia quelli di supporto \
alla verifica della conformità dei dati con determinate codelist e sia quelli per \
l''aggregazione ed il filtro dei dati.</p>
l''aggregazione ed il filtro dei dati.</p>
wikiButton=Wiki
wikiButtonToolTip=Tabular Data Manager Wiki

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1 @@
http://gcube.wiki.gcube-system.org/gcube/index.php/Tabular_Data_Manager