2014-10-08 19:01:25 +02:00
|
|
|
package org.gcube.portlets.user.td.mainboxwidget.client.tdx;
|
|
|
|
|
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.dataview.TabularResourceDataView;
|
|
|
|
import org.gcube.portlets.user.tdwx.client.TabularDataX;
|
|
|
|
|
|
|
|
import com.google.web.bindery.event.shared.EventBus;
|
|
|
|
import com.sencha.gxt.widget.core.client.FramedPanel;
|
|
|
|
|
2014-10-10 17:58:35 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @author giancarlo email: <a
|
|
|
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
|
|
|
*
|
|
|
|
*/
|
2014-10-08 19:01:25 +02:00
|
|
|
public class TDXPanel extends FramedPanel {
|
|
|
|
|
2014-10-10 17:58:35 +02:00
|
|
|
// private static final String HEIGHT = "600px";
|
2015-06-04 19:02:19 +02:00
|
|
|
private TDXTabPanel tdxTabPanel;
|
|
|
|
private EventBus eventBus;
|
2014-10-08 19:01:25 +02:00
|
|
|
|
2014-10-09 18:50:41 +02:00
|
|
|
public TDXPanel(EventBus eventBus) {
|
2014-10-08 19:01:25 +02:00
|
|
|
super();
|
|
|
|
this.eventBus = eventBus;
|
2014-10-10 17:58:35 +02:00
|
|
|
init();
|
2015-06-04 19:02:19 +02:00
|
|
|
addTDXTabPanel();
|
2014-10-09 18:50:41 +02:00
|
|
|
forceLayout();
|
2014-10-08 19:01:25 +02:00
|
|
|
}
|
|
|
|
|
2014-10-10 17:58:35 +02:00
|
|
|
protected void init() {
|
|
|
|
// setWidth(WIDTH);
|
|
|
|
// setHeight(HEIGHT);
|
|
|
|
setHeaderVisible(false);
|
|
|
|
setBodyBorder(false);
|
|
|
|
setBorders(false);
|
|
|
|
setResize(true);
|
|
|
|
forceLayoutOnResize = true;
|
|
|
|
}
|
|
|
|
|
2015-06-04 19:02:19 +02:00
|
|
|
protected void addTDXTabPanel() {
|
|
|
|
tdxTabPanel=new TDXTabPanel(eventBus);
|
|
|
|
add(tdxTabPanel);
|
2014-10-08 19:01:25 +02:00
|
|
|
}
|
|
|
|
|
2014-10-09 18:50:41 +02:00
|
|
|
public void open(TabularResourceDataView dataView) {
|
2015-06-04 19:02:19 +02:00
|
|
|
tdxTabPanel.open(dataView);
|
2014-10-09 18:50:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public void update(TabularResourceDataView dataView) {
|
2015-06-04 19:02:19 +02:00
|
|
|
tdxTabPanel.update(dataView);
|
2014-10-08 19:01:25 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-10-14 19:35:25 +02:00
|
|
|
public boolean isValidDataViewRequest(TabularResourceDataView dataViewRequest) {
|
2015-06-04 19:02:19 +02:00
|
|
|
return tdxTabPanel.isValidDataViewRequest(dataViewRequest);
|
2014-10-08 19:01:25 +02:00
|
|
|
}
|
|
|
|
|
2014-10-14 19:35:25 +02:00
|
|
|
public TabularDataX getTabularData() {
|
2015-06-04 19:02:19 +02:00
|
|
|
return tdxTabPanel.getTabularData();
|
2014-10-14 19:35:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public TabularResourceDataView getTabularResourceDataView() {
|
2015-06-04 19:02:19 +02:00
|
|
|
return tdxTabPanel.getTabularResourceDataView();
|
2014-10-14 19:35:25 +02:00
|
|
|
}
|
|
|
|
|
2014-10-08 19:01:25 +02:00
|
|
|
}
|