2013-10-24 16:12:50 +02:00
|
|
|
package org.gcube.portlets.user.td.openwidget.client;
|
2013-10-24 12:12:33 +02:00
|
|
|
|
2014-07-30 14:36:23 +02:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
2013-12-06 12:16:41 +01:00
|
|
|
import org.gcube.portlets.user.td.wizardwidget.client.WizardWindow;
|
2014-07-25 20:03:51 +02:00
|
|
|
import org.gcube.portlets.user.td.wizardwidget.client.dataresource.ResourceBundle;
|
2013-11-21 10:23:56 +01:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.open.TDOpenSession;
|
2013-10-24 12:12:33 +02:00
|
|
|
|
|
|
|
import com.allen_sauer.gwt.log.client.Log;
|
2014-05-16 15:42:51 +02:00
|
|
|
import com.google.web.bindery.event.shared.EventBus;
|
2014-07-25 20:03:51 +02:00
|
|
|
import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign;
|
2013-10-24 12:12:33 +02:00
|
|
|
|
|
|
|
/**
|
2013-12-06 12:20:23 +01:00
|
|
|
*
|
|
|
|
* @author "Giancarlo Panichi"
|
|
|
|
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
|
|
|
*
|
2013-10-24 12:12:33 +02:00
|
|
|
*/
|
|
|
|
public class TDOpen extends WizardWindow {
|
2014-10-24 11:36:42 +02:00
|
|
|
protected static final int WITHWIZARD=750;
|
2014-07-02 13:11:25 +02:00
|
|
|
protected static final int HEIGHTWIZARD=520;
|
|
|
|
|
2013-10-24 12:12:33 +02:00
|
|
|
protected TDOpenSession tdOpenSession;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The id of the {@link CSVTarget} to use.
|
|
|
|
* @param targetId
|
|
|
|
*/
|
|
|
|
|
2014-07-30 14:36:23 +02:00
|
|
|
public TDOpen(TRId trId,String title,EventBus eventBus) {
|
2014-05-16 15:42:51 +02:00
|
|
|
super(title,eventBus);
|
2014-07-30 14:36:23 +02:00
|
|
|
Log.info("TDOpen: "+title+", current tr: "+trId);
|
2014-07-02 13:11:25 +02:00
|
|
|
setWidth(WITHWIZARD);
|
|
|
|
setHeight(HEIGHTWIZARD);
|
2013-11-28 19:57:15 +01:00
|
|
|
BUTTONNEXTLABEL="Open";
|
2013-12-06 12:35:23 +01:00
|
|
|
nextButton.setText(BUTTONNEXTLABEL);
|
2014-07-25 20:03:51 +02:00
|
|
|
nextButton.setIcon(ResourceBundle.INSTANCE.wizardGo());
|
|
|
|
nextButton.setIconAlign(IconAlign.RIGHT);
|
2013-10-24 12:12:33 +02:00
|
|
|
|
2014-01-27 12:26:29 +01:00
|
|
|
setEnableNextButton(false);
|
2013-10-24 12:12:33 +02:00
|
|
|
tdOpenSession= new TDOpenSession();
|
|
|
|
|
|
|
|
|
2014-07-30 14:36:23 +02:00
|
|
|
TabResourcesSelectionCard tabResourcesSelection= new TabResourcesSelectionCard(trId,tdOpenSession);
|
2013-10-24 12:12:33 +02:00
|
|
|
addCard(tabResourcesSelection);
|
2013-11-28 19:57:15 +01:00
|
|
|
tabResourcesSelection.setup();
|
2013-10-24 12:12:33 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|