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:
Giancarlo Panichi 2013-12-16 09:57:07 +00:00
parent 9c84bef478
commit e563973c93
3 changed files with 61 additions and 37 deletions

View File

@ -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>

View File

@ -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() {
@ -142,11 +164,8 @@ public class TabularDataController {
}
/*
protected void updateUIProperties(){
if (uiToolBox == UIToolBox.OPENED) {
trProperties.update();
}
}
* protected void updateUIProperties(){ if (uiToolBox == UIToolBox.OPENED) {
* trProperties.update(); } }
*/
protected void closeTabularResource() {
@ -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 {
}
});
}
/**

View File

@ -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);
@ -271,4 +280,7 @@ public class TabularDataPortlet implements EntryPoint {
* }
*/
}