updated pom version at 1.2.0
updated css fixed bug pn wms dialog git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/gis-viewer-app@113594 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
eee59a55b1
commit
ae3562bf4c
2
pom.xml
2
pom.xml
|
@ -14,7 +14,7 @@
|
|||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>gis-viewer-app</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>1.1.0-SNAPSHOT</version>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<name>Gis Viewer App</name>
|
||||
<description>
|
||||
The Gis Viewer App
|
||||
|
|
|
@ -10,10 +10,11 @@ import org.gcube.portlets.user.gisviewer.client.DataPanelOpenListener;
|
|||
import org.gcube.portlets.user.gisviewer.client.GisViewerPanel;
|
||||
import org.gcube.portlets.user.gisviewer.client.GisViewerParameters;
|
||||
|
||||
import com.extjs.gxt.ui.client.event.BaseEvent;
|
||||
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
||||
import com.extjs.gxt.ui.client.event.Events;
|
||||
import com.extjs.gxt.ui.client.event.Listener;
|
||||
import com.extjs.gxt.ui.client.fx.Resizable;
|
||||
import com.extjs.gxt.ui.client.widget.Component;
|
||||
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
||||
import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
||||
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
||||
|
@ -42,6 +43,7 @@ public class ApplicationController implements WmsDialogHandler{
|
|||
private LayoutContainer lcWMS = new LayoutContainer();
|
||||
private WmsRequestConverter wmsRequestConverter;
|
||||
private final ApplicationController INSTANCE = this;
|
||||
private RootPanel gwtRootPanel;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -118,6 +120,7 @@ public class ApplicationController implements WmsDialogHandler{
|
|||
* @param rootPanel
|
||||
*/
|
||||
public void go(final RootPanel rootPanel) {
|
||||
this.gwtRootPanel = rootPanel;
|
||||
rootPanel.add(mainPanel);
|
||||
|
||||
String wmsRequest = Window.Location.getParameter(ConstantGisViewerApp.GET_WMS_PARAMETER);
|
||||
|
@ -156,32 +159,11 @@ public class ApplicationController implements WmsDialogHandler{
|
|||
|
||||
}
|
||||
};
|
||||
baloonWMS = new BaloonPanel("+WMS", false, cmd);
|
||||
|
||||
lcWMS.addListener(Events.Render, new Listener<BaseEvent>() {
|
||||
baloonWMS = new BaloonPanel("+WMS", false, cmd);
|
||||
|
||||
@Override
|
||||
public void handleEvent(BaseEvent be) {
|
||||
Timer tm = new Timer() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
String zi = rootPanel.getElement().getStyle().getZIndex();
|
||||
GWT.log("zindex "+zi);
|
||||
int zIndex = 50;
|
||||
try{
|
||||
zIndex += Integer.parseInt(zi);
|
||||
}catch(NumberFormatException e){
|
||||
|
||||
}
|
||||
baloonWMS.getElement().getStyle().setZIndex(zIndex);
|
||||
}
|
||||
};
|
||||
|
||||
tm.schedule(1000);
|
||||
}
|
||||
});
|
||||
SetZIndex setZIndex = new SetZIndex();
|
||||
safeFunctionCallOn(lcWMS,setZIndex);
|
||||
}
|
||||
|
||||
|
||||
|
@ -224,5 +206,67 @@ public class ApplicationController implements WmsDialogHandler{
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Safe function call on a component, which was rendered or not.
|
||||
*
|
||||
* @param c
|
||||
* Component object that must be not null.
|
||||
* @param f
|
||||
* Function object with the function that must be called.
|
||||
*/
|
||||
public static void safeFunctionCallOn(final Component c, final Function f) {
|
||||
c.enableEvents(true);
|
||||
if (c.isRendered()) {
|
||||
GWT.log("fire c.isRendered()");
|
||||
f.execute();
|
||||
} else {
|
||||
|
||||
final Listener<ComponentEvent> lsnr = new Listener<ComponentEvent>() {
|
||||
|
||||
@Override
|
||||
public void handleEvent(ComponentEvent be) {
|
||||
GWT.log("fire function.execute");
|
||||
f.execute();
|
||||
|
||||
}
|
||||
};
|
||||
c.addListener(Events.Render, lsnr);
|
||||
}
|
||||
}
|
||||
|
||||
public interface Function {
|
||||
public void execute();
|
||||
}
|
||||
|
||||
class SetZIndex implements Function {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.gcube.portlets.user.gisviewerapp.client.ApplicationController
|
||||
* .Function#execute()
|
||||
*/
|
||||
@Override
|
||||
public void execute() {
|
||||
|
||||
final Timer tm = new Timer() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
int zi = lcWMS.el().getZIndex();
|
||||
GWT.log("zindex: "+zi);
|
||||
int zIndex = zi<300?300:zi;
|
||||
baloonWMS.getElement().getStyle().setZIndex(zIndex);
|
||||
}
|
||||
};
|
||||
|
||||
tm.schedule(1000);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,7 +31,22 @@ public class GisViewerApp implements EntryPoint {
|
|||
});
|
||||
|
||||
updateSize();
|
||||
|
||||
|
||||
/*
|
||||
XYZOptions options = new XYZOptions();
|
||||
options.setNumZoomLevels(Constants.numZoomLevels);
|
||||
options.setSphericalMercator(true);
|
||||
options.setDisplayInLayerSwitcher(true);
|
||||
options.setIsBaseLayer(true);
|
||||
|
||||
String name = "MapBox";
|
||||
String url = "https://b.tiles.mapbox.com/v4/examples.map-2k9d7u0c/${z}/${x}/${y}.png?access_token=pk.eyJ1IjoidHJpc3RlbiIsImEiOiJiUzBYOEJzIn0.VyXs9qNWgTfABLzSI3YcrQ";
|
||||
XYZ layer = new XYZ(name, url, options);
|
||||
|
||||
MapWidget widget = appController.getGisViewerPanel().getOpenLayersMap().getMapWidget();
|
||||
widget.getMap().addLayer(layer);
|
||||
*/
|
||||
|
||||
/*
|
||||
OSMOptions options = new OSMOptions();
|
||||
options.setNumZoomLevels(Constants.numZoomLevels);
|
||||
|
|
|
@ -33,22 +33,24 @@ h1 {
|
|||
|
||||
.baloonPanel {
|
||||
padding: 5px;
|
||||
border: solid;
|
||||
border-width: 1px;
|
||||
/* border: solid; */
|
||||
/* border-width: 1px; */
|
||||
border-color: rgb(200, 210, 240);
|
||||
/* border-radius: 15px; */
|
||||
-webkit-border-top-right-radius: 10px;
|
||||
-webkit-border-bottom-right-radius: 10px;
|
||||
-moz-border-radius-topright: 10px;
|
||||
-moz-border-radius-bottomright: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
background-color: #0B3C9E;
|
||||
-webkit-border-top-right-radius: 5px;
|
||||
-webkit-border-bottom-right-radius: 5px;
|
||||
-moz-border-radius-topright: 5px;
|
||||
-moz-border-radius-bottomright: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
background-color: #4B79B4;
|
||||
color: #D2D2D2;
|
||||
font-family: verdana, arial;
|
||||
font-size: 10px;
|
||||
margin-left: 1px;
|
||||
/* font-family: verdana, arial; */
|
||||
font-size: 12px;
|
||||
margin-left: 2px;
|
||||
opacity: 0.8;
|
||||
font-family: sans-serif, arial;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.baloonPanel :HOVER {
|
||||
|
|
Loading…
Reference in New Issue