Added Create Point
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-toolbox-widget@111927 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
7c1987054b
commit
9e4287f60c
|
@ -8,6 +8,7 @@ import org.gcube.portlets.user.td.informationwidget.client.TabularResourceProper
|
|||
import org.gcube.portlets.user.td.monitorwidget.client.background.MonitorBackgroundPanel;
|
||||
import org.gcube.portlets.user.td.resourceswidget.client.ResourcesPanel;
|
||||
import org.gcube.portlets.user.td.tablewidget.client.ChangeTableTypePanel;
|
||||
import org.gcube.portlets.user.td.tablewidget.client.geometry.GeometryCreatePointPanel;
|
||||
import org.gcube.portlets.user.td.tablewidget.client.geospatial.GeospatialCreateCoordinatesPanel;
|
||||
import org.gcube.portlets.user.td.tablewidget.client.history.HistoryPanel;
|
||||
import org.gcube.portlets.user.td.tablewidget.client.normalize.DenormalizePanel;
|
||||
|
@ -36,6 +37,12 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
|||
|
||||
//import org.gcube.portlets.user.td.taskswidget.client.TdTaskController;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class ToolBox extends TabPanel {
|
||||
|
||||
private EventBus eventBus;
|
||||
|
@ -60,10 +67,11 @@ public class ToolBox extends TabPanel {
|
|||
private MonitorBackgroundPanel monitorBackgroundPanel;
|
||||
private ResourcesPanel resourcesPanel;
|
||||
private GeospatialCreateCoordinatesPanel geospatialCreateCoordinatesPanel;
|
||||
|
||||
// private TdTaskController tdTaskController;
|
||||
// private DialogBox tdTaskMainWindow;
|
||||
private GeometryCreatePointPanel geometryCreatePointPanel;
|
||||
|
||||
|
||||
private FramedPanel taskPanel;
|
||||
|
||||
|
||||
public ToolBox(String name, EventBus eventBus, ToolBoxPanel toolBoxPanel) {
|
||||
super();
|
||||
|
@ -77,7 +85,7 @@ public class ToolBox extends TabPanel {
|
|||
setTabScroll(true);
|
||||
setCloseContextMenu(true);
|
||||
|
||||
// setResizeTabs(true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -289,6 +297,22 @@ public class ToolBox extends TabPanel {
|
|||
setActiveWidget(geospatialCreateCoordinatesPanel);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void openGeometryCreatePointTab(TRId trId) {
|
||||
Log.debug("Open GeospatialCreateCoordinates Tab");
|
||||
if (geometryCreatePointPanel == null) {
|
||||
addGeometryCreatePointPanel(trId);
|
||||
} else {
|
||||
geometryCreatePointPanel.update(trId);
|
||||
}
|
||||
setActiveWidget(geometryCreatePointPanel);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Close
|
||||
public void closePropertiesTabs() {
|
||||
|
@ -446,7 +470,14 @@ public class ToolBox extends TabPanel {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public void closeGeometryCreatePointPanel() {
|
||||
Log.debug("Close GeometryCreatePoint Tab");
|
||||
if (geometryCreatePointPanel != null) {
|
||||
remove(geometryCreatePointPanel);
|
||||
geometryCreatePointPanel = null;
|
||||
}
|
||||
|
||||
}
|
||||
//
|
||||
|
||||
public void updateTabs() {
|
||||
|
@ -543,6 +574,12 @@ public class ToolBox extends TabPanel {
|
|||
geospatialCreateCoordinatesPanel = null;
|
||||
}
|
||||
|
||||
|
||||
if (geometryCreatePointPanel != null) {
|
||||
remove(geometryCreatePointPanel);
|
||||
geometryCreatePointPanel = null;
|
||||
}
|
||||
|
||||
|
||||
forceLayout();
|
||||
} catch (Throwable e) {
|
||||
|
@ -558,7 +595,7 @@ public class ToolBox extends TabPanel {
|
|||
helpPanel.setHeaderVisible(false);
|
||||
add(helpPanel, propertiesItemConf);
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
protected void addTrProperties() {
|
||||
TabItemConfig propertiesItemConf = new TabItemConfig("Properties", true);
|
||||
|
@ -902,6 +939,31 @@ public class ToolBox extends TabPanel {
|
|||
|
||||
});
|
||||
};
|
||||
|
||||
private void addGeometryCreatePointPanel(TRId trId) {
|
||||
TabItemConfig geometryCreatePointItemConf = new TabItemConfig(
|
||||
"Point", true);
|
||||
|
||||
geometryCreatePointPanel = new GeometryCreatePointPanel(
|
||||
trId, eventBus);
|
||||
add(geometryCreatePointPanel,
|
||||
geometryCreatePointItemConf);
|
||||
|
||||
addBeforeCloseHandler(new BeforeCloseHandler<Widget>() {
|
||||
|
||||
public void onBeforeClose(BeforeCloseEvent<Widget> event) {
|
||||
if (geometryCreatePointPanel == event.getItem()) {
|
||||
remove(geometryCreatePointPanel);
|
||||
geometryCreatePointPanel = null;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void addDuplicatesRowsPanel(TRId trId) {
|
||||
TabItemConfig duplicatesRowsDeleteItemConf = new TabItemConfig(
|
||||
|
@ -1003,4 +1065,6 @@ public class ToolBox extends TabPanel {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -6,7 +6,12 @@ import com.google.gwt.user.client.ui.RootPanel;
|
|||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.google.web.bindery.event.shared.SimpleEventBus;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class ToolBoxEntry implements EntryPoint {
|
||||
|
||||
|
||||
|
|
|
@ -10,6 +10,12 @@ import com.allen_sauer.gwt.log.client.Log;
|
|||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sencha.gxt.widget.core.client.ContentPanel;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class ToolBoxPanel extends ContentPanel {
|
||||
|
||||
private EventBus eventBus;
|
||||
|
@ -166,6 +172,10 @@ public class ToolBoxPanel extends ContentPanel {
|
|||
case GEOSPATIALCREATECOORDINATESPANEL:
|
||||
doGeospatialCreateCoordinatesTab(event);
|
||||
break;
|
||||
case GEOMETRYCREATEPOINTPANEL:
|
||||
doGeometryCreatePointTab(event);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
|
@ -481,6 +491,29 @@ public class ToolBoxPanel extends ContentPanel {
|
|||
}
|
||||
}
|
||||
|
||||
protected void doGeometryCreatePointTab(WidgetRequestEvent event) {
|
||||
Log.debug("WidgetRequestEvent.GeometryCreatePointPanel : ["
|
||||
+ event.getTrId() + "]");
|
||||
if (uiStateType == UIStateType.TR_OPEN
|
||||
|| uiStateType == UIStateType.TABLECURATION
|
||||
|| uiStateType == UIStateType.TABLEUPDATE) {
|
||||
if (state == ToolBoxPanelState.OPENED) {
|
||||
toolBox.openGeometryCreatePointTab(event.getTrId());
|
||||
Log.debug("ToolBoxPanelSTate.OPENED Add Tabs");
|
||||
} else {
|
||||
enable();
|
||||
expand();
|
||||
state = ToolBoxPanelState.OPENED;
|
||||
toolBox.openGeometryCreatePointTab(event.getTrId());
|
||||
}
|
||||
} else {
|
||||
Log.debug("ToolBoxPanel No table open");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void doNormalizeTab(WidgetRequestEvent event) {
|
||||
Log.debug("WidgetRequestEvent.NoramlizePanel : [" + event.getTrId()
|
||||
|
@ -587,6 +620,7 @@ public class ToolBoxPanel extends ContentPanel {
|
|||
toolBox.closeDenormalizePanel();
|
||||
toolBox.closeResourcesPanel();
|
||||
toolBox.closeGeospatialCreateCoordinatesPanel();
|
||||
toolBox.closeGeometryCreatePointPanel();
|
||||
Log.debug("ToolBoxPanel Closed");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package org.gcube.portlets.user.td.toolboxwidget.client;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public enum ToolBoxPanelState {
|
||||
CLOSED,
|
||||
OPENED;
|
||||
|
|
|
@ -10,6 +10,12 @@ 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.form.FieldSet;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class HelpPanel extends FramedPanel {
|
||||
|
||||
protected String headingTitle;
|
||||
|
|
Loading…
Reference in New Issue