changed query interaction
This commit is contained in:
parent
cfbda812fe
commit
b62bcaed5b
|
@ -1,42 +1,49 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<wb-module deploy-name="geoportal-data-viewer-app-1.0.0-SNAPSHOT">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="geoportal-logic-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-logic/geoportal-logic">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<property name="java-output-path" value="/geoportal-data-viewer-app/target/geoportal-data-viewer-app-0.0.1-SNAPSHOT/WEB-INF/classes"/>
|
||||
|
||||
|
||||
|
||||
<property name="context-root" value="geoportal-data-viewer-app"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</wb-module>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</project-modules>
|
||||
|
|
|
@ -3,7 +3,7 @@ package org.gcube.portlets.user.geoportaldataviewer.client.ui;
|
|||
import org.gcube.portlets.user.geoportaldataviewer.client.gis.OpenLayerOSM;
|
||||
|
||||
import com.github.gwtbootstrap.client.ui.Button;
|
||||
import com.github.gwtbootstrap.client.ui.ButtonGroup;
|
||||
import com.github.gwtbootstrap.client.ui.NavLink;
|
||||
import com.github.gwtbootstrap.client.ui.Tab;
|
||||
import com.github.gwtbootstrap.client.ui.constants.IconType;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
|
@ -25,13 +25,16 @@ public class GeonaDataViewMainPanel extends Composite {
|
|||
Tab mapTabPanel;
|
||||
|
||||
@UiField
|
||||
Button dataPointSelection;
|
||||
NavLink dataPointSelection;
|
||||
|
||||
@UiField
|
||||
Button dataBoxSelection;
|
||||
|
||||
NavLink dataBoxSelection;
|
||||
|
||||
@UiField
|
||||
ButtonGroup buttonGroup;
|
||||
Button removeQuery;
|
||||
|
||||
// @UiField
|
||||
// ButtonGroup buttonGroup;
|
||||
|
||||
private MapPanel mapPanel;
|
||||
|
||||
|
@ -44,6 +47,8 @@ public class GeonaDataViewMainPanel extends Composite {
|
|||
bindHandlers();
|
||||
dataPointSelection.setIcon(IconType.SCREENSHOT);
|
||||
dataBoxSelection.setIcon(IconType.BOOKMARK);
|
||||
|
||||
removeQuery.setIcon(IconType.REMOVE);
|
||||
}
|
||||
|
||||
public void setMapHeight(int height) {
|
||||
|
@ -69,7 +74,8 @@ public class GeonaDataViewMainPanel extends Composite {
|
|||
if (!dataPointSelection.isActive()) {
|
||||
map.addPointVectorSource();
|
||||
}
|
||||
dataBoxSelection.setActive(false);
|
||||
removeQuery.setVisible(true);
|
||||
//dataBoxSelection.setActive(false);
|
||||
//dataBoxSelection.getElement().removeClassName("active");
|
||||
}
|
||||
});
|
||||
|
@ -83,10 +89,20 @@ public class GeonaDataViewMainPanel extends Composite {
|
|||
if (!dataBoxSelection.isActive()) {
|
||||
map.addExtentInteraction();
|
||||
}
|
||||
dataPointSelection.setActive(false);
|
||||
removeQuery.setVisible(true);
|
||||
//dataPointSelection.setActive(false);
|
||||
//dataPointSelection.getElement().removeClassName("active");
|
||||
}
|
||||
});
|
||||
|
||||
removeQuery.addClickHandler(new ClickHandler() {
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
map.removeQueryInteractions();
|
||||
removeQuery.setVisible(false);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -3,21 +3,23 @@
|
|||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
|
||||
<ui:style>
|
||||
.margin-right-10{
|
||||
.margin-right-10 {
|
||||
margin-right: 10px;
|
||||
}
|
||||
</ui:style>
|
||||
<g:HTMLPanel ui:field="mainHTMLPanel">
|
||||
<b:TabPanel ui:field="mainTabPanel" tabPosition="top">
|
||||
<b:Tab ui:field="mapTabPanel" active="true" heading="Map">
|
||||
<b:ButtonToolbar>
|
||||
<b:ButtonGroup toggle="checkbox" ui:field="buttonGroup">
|
||||
<b:Button ui:field="dataPointSelection" type="INFO" addStyleNames="{style.margin-right-10}">Data Point
|
||||
Selection</b:Button>
|
||||
<b:Button ui:field="dataBoxSelection" type="INFO">Data Box
|
||||
Selection</b:Button>
|
||||
</b:ButtonGroup>
|
||||
</b:ButtonToolbar>
|
||||
<b:DropdownButton type="LINK" text="Query">
|
||||
<!-- <b:ButtonGroup toggle="checkbox" ui:field="buttonGroup"> -->
|
||||
<b:NavLink ui:field="dataPointSelection"
|
||||
addStyleNames="{style.margin-right-10}">Data Point
|
||||
Selection</b:NavLink>
|
||||
<b:NavLink ui:field="dataBoxSelection">Data Box
|
||||
Selection</b:NavLink>
|
||||
<!-- </b:ButtonGroup> -->
|
||||
</b:DropdownButton>
|
||||
<b:Button type="LINK" ui:field="removeQuery" text="Remove Query" visible="false"></b:Button>
|
||||
</b:Tab>
|
||||
</b:TabPanel>
|
||||
</g:HTMLPanel>
|
||||
|
|
Loading…
Reference in New Issue