Minor updated
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@86954 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9c84bef478
commit
e563973c93
|
@ -10,6 +10,9 @@
|
|||
<dependent-module archiveName="tabular-data-widgetx-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-widgetx/tabular-data-widgetx">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="tabular-data-widget-common-event-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-widget-common-event/tabular-data-widget-common-event">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="tabular-data-toolbox-widget-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-toolbox-widget/tabular-data-toolbox-widget">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
|
|
|
@ -9,6 +9,7 @@ import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
|||
import org.gcube.portlets.user.td.openwidget.client.TDOpen;
|
||||
import org.gcube.portlets.user.td.sdmxexportwidget.client.SDMXExportWizardTD;
|
||||
import org.gcube.portlets.user.td.sdmximportwidget.client.SDMXImportWizardTD;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.GridHeaderColumnMenuItemEvent;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.RibbonEvent;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.UIStateEvent;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.RibbonType;
|
||||
|
@ -81,8 +82,6 @@ public class TabularDataController {
|
|||
this.toolBoxPanel = toolBoxPanel;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public BorderLayoutData getEastData() {
|
||||
return eastData;
|
||||
}
|
||||
|
@ -92,6 +91,29 @@ public class TabularDataController {
|
|||
}
|
||||
|
||||
protected void bindToEvents() {
|
||||
eventBus.addHandler(
|
||||
GridHeaderColumnMenuItemEvent.TYPE,
|
||||
new GridHeaderColumnMenuItemEvent.GridHeaderColumnMenuItemEventHandler() {
|
||||
|
||||
public void onGridHeaderColumnMenuItemEvent(
|
||||
GridHeaderColumnMenuItemEvent event) {
|
||||
Log.debug("Catch Event HeaderColumnMenuItemEvent");
|
||||
final AlertMessageBox d = new AlertMessageBox(
|
||||
"HeaderMenu Fire Event", "OperationId: "
|
||||
+ event.getOperationId()
|
||||
+ " Column: \n"
|
||||
+ event.getColumnSelected());
|
||||
d.addHideHandler(new HideEvent.HideHandler() {
|
||||
|
||||
public void onHide(HideEvent event) {
|
||||
d.hide();
|
||||
}
|
||||
});
|
||||
d.show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
eventBus.addHandler(RibbonEvent.TYPE,
|
||||
new RibbonEvent.RibbonEventHandler() {
|
||||
|
||||
|
@ -121,7 +143,7 @@ public class TabularDataController {
|
|||
|
||||
protected void resumeUIState() {
|
||||
if (uiState == UIStateType.TR_OPEN) {
|
||||
UIStateEvent uiStateEvent=new UIStateEvent(UIStateType.TR_OPEN);
|
||||
UIStateEvent uiStateEvent = new UIStateEvent(UIStateType.TR_OPEN);
|
||||
uiStateEvent.setTrId(trId);
|
||||
eventBus.fireEvent(uiStateEvent);
|
||||
} else {
|
||||
|
@ -130,36 +152,33 @@ public class TabularDataController {
|
|||
}
|
||||
|
||||
protected void openTable(TRId tabularResourceId) {
|
||||
Log.debug("openTabe: "+tabularResourceId);
|
||||
Log.debug("openTabe: " + tabularResourceId);
|
||||
trId = tabularResourceId;
|
||||
tableOpening = new TableId(Constants.TDX_DATASOURCE_FACTORY_ID,
|
||||
trId.getTableId());
|
||||
tabularData.openTable(tableOpening);
|
||||
uiState = UIStateType.TR_OPEN;
|
||||
UIStateEvent uiStateEvent=new UIStateEvent(UIStateType.TR_OPEN);
|
||||
UIStateEvent uiStateEvent = new UIStateEvent(UIStateType.TR_OPEN);
|
||||
uiStateEvent.setTrId(tabularResourceId);
|
||||
eventBus.fireEvent(uiStateEvent);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
protected void updateUIProperties(){
|
||||
if (uiToolBox == UIToolBox.OPENED) {
|
||||
trProperties.update();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
* protected void updateUIProperties(){ if (uiToolBox == UIToolBox.OPENED) {
|
||||
* trProperties.update(); } }
|
||||
*/
|
||||
|
||||
protected void closeTabularResource() {
|
||||
if (uiState == UIStateType.TR_OPEN) {
|
||||
tabularData.closeTable();
|
||||
uiState = UIStateType.TR_CLOSE;
|
||||
eventBus.fireEvent(new UIStateEvent(UIStateType.TR_CLOSE));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void deleteTabularResource() {
|
||||
Log.debug("Remove TR:"+trId);
|
||||
Log.debug("Remove TR:" + trId);
|
||||
TDGWTServiceAsync.INSTANCE.removeTabularResource(trId,
|
||||
new AsyncCallback<Void>() {
|
||||
@Override
|
||||
|
@ -223,27 +242,18 @@ public class TabularDataController {
|
|||
}
|
||||
|
||||
/*
|
||||
protected void openToolBox() {
|
||||
if (uiState == UIStateType.TR_OPEN) {
|
||||
if (uiToolBox == UIToolBox.OPENED) {
|
||||
toolBoxPanel.collapse();
|
||||
toolBoxPanel.disable();
|
||||
|
||||
uiToolBox = UIToolBox.CLOSED;
|
||||
eventBus.fireEvent(new UIStateEvent(UIStateType.TOOLBOX_CLOSE));
|
||||
toolBox.remove(trProperties);
|
||||
Info.display("Properties", "Closed");
|
||||
} else {
|
||||
eventBus.fireEvent(new UIStateEvent(UIStateType.TOOLBOX_OPEN));
|
||||
toolBoxPanel.enable();
|
||||
toolBoxPanel.expand();
|
||||
uiToolBox = UIToolBox.OPENED;
|
||||
|
||||
}
|
||||
} else {
|
||||
Info.display("Properties", "No table open");
|
||||
}
|
||||
};*/
|
||||
* protected void openToolBox() { if (uiState == UIStateType.TR_OPEN) { if
|
||||
* (uiToolBox == UIToolBox.OPENED) { toolBoxPanel.collapse();
|
||||
* toolBoxPanel.disable();
|
||||
*
|
||||
* uiToolBox = UIToolBox.CLOSED; eventBus.fireEvent(new
|
||||
* UIStateEvent(UIStateType.TOOLBOX_CLOSE)); toolBox.remove(trProperties);
|
||||
* Info.display("Properties", "Closed"); } else { eventBus.fireEvent(new
|
||||
* UIStateEvent(UIStateType.TOOLBOX_OPEN)); toolBoxPanel.enable();
|
||||
* toolBoxPanel.expand(); uiToolBox = UIToolBox.OPENED;
|
||||
*
|
||||
* } } else { Info.display("Properties", "No table open"); } };
|
||||
*/
|
||||
|
||||
protected void openSDMXImportWizard() {
|
||||
GWT.runAsync(new RunAsyncCallback() {
|
||||
|
@ -362,7 +372,6 @@ public class TabularDataController {
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package org.gcube.portlets.user.td.client;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.td.client.grid.ColumnHeaderMenu;
|
||||
import org.gcube.portlets.user.td.client.ribbon.TabularDataRibbon;
|
||||
import org.gcube.portlets.user.td.client.rpc.TabularDataService;
|
||||
import org.gcube.portlets.user.td.client.rpc.TabularDataServiceAsync;
|
||||
|
@ -14,6 +16,7 @@ import org.gcube.portlets.user.tdwx.client.event.FailureEventHandler;
|
|||
import org.gcube.portlets.user.tdwx.client.model.grid.DataRowColumnConfig;
|
||||
import org.gcube.portlets.user.tdwx.shared.model.DataRow;
|
||||
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
|
@ -136,6 +139,12 @@ public class TabularDataPortlet implements EntryPoint {
|
|||
final TabularDataXGridPanel gridPanel = tabularData.getGridPanel();
|
||||
gridPanel.setHeaderVisible(false);
|
||||
|
||||
ColumnHeaderMenu columnHeaderMenu=new ColumnHeaderMenu();
|
||||
|
||||
|
||||
gridPanel.addGridHeaderContextMenuItems(columnHeaderMenu.getMenu(),eventBus);
|
||||
|
||||
|
||||
MarginData gridData = new MarginData();
|
||||
mainPanelLayout.setCenterWidget(gridPanel, gridData);
|
||||
|
||||
|
@ -270,5 +279,8 @@ public class TabularDataPortlet implements EntryPoint {
|
|||
*
|
||||
* }
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue