layer_switcher #3

Closed
francesco.mangiacrapa wants to merge 12 commits from layer_switcher into master
4 changed files with 21 additions and 9 deletions
Showing only changes of commit c899839220 - Show all commits

View File

@ -10,7 +10,7 @@ import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.FlowPanel;
public class OverlayLayerManager extends DialogBox {
public class OverlayLayerManager {
ArrayList<LayerItem> layers = new ArrayList<LayerItem>();
FlowPanel fp = new FlowPanel();
@ -18,12 +18,12 @@ public class OverlayLayerManager extends DialogBox {
public OverlayLayerManager(HandlerManager applicationBus) {
this.applicationBus = applicationBus;
setText("Layers");
getElement().addClassName("myOverlayLayerManager");
//setText("Layers");
//getElement().addClassName("myOverlayLayerManager");
fp.getElement().getStyle().setMarginTop(10, Unit.PX);
fp.getElement().getStyle().setMarginBottom(10, Unit.PX);
add(fp);
//getElement().getStyle().setZIndex(100);
//add(fp);
// getElement().getStyle().setZIndex(100);
}
void addLayerItem(LayerItem layer) {
@ -37,4 +37,8 @@ public class OverlayLayerManager extends DialogBox {
fp.clear();
}
FlowPanel getPanel() {
return fp;
}
}

View File

@ -11,6 +11,7 @@ import org.gcube.portlets.user.geoportaldataviewer.client.ui.map.ExtentMapUtil;
import org.gcube.portlets.user.geoportaldataviewer.client.ui.map.ExtentMapUtil.Location;
import com.github.gwtbootstrap.client.ui.Button;
import com.github.gwtbootstrap.client.ui.DropdownButton;
import com.github.gwtbootstrap.client.ui.NavLink;
import com.github.gwtbootstrap.client.ui.constants.IconType;
import com.google.gwt.core.client.GWT;
@ -69,6 +70,9 @@ public class GeonaDataViewMainPanel extends Composite {
@UiField
Button extentToEarth;
@UiField
DropdownButton detailLayers;
private MapPanel mapPanel;
@ -228,5 +232,9 @@ public class GeonaDataViewMainPanel extends Composite {
public RecordDV getDisplyedRecord() {
return detailsPanel.getDisplayedRecord();
}
public DropdownButton getDetailLayers() {
return detailLayers;
}
}

View File

@ -32,8 +32,8 @@
</b:Paragraph>
</g:HTMLPanel>
</b:DropdownButton>
<b:DropdownButton type="LINK" text="Preset Location"
icon="TH_LARGE">
<b:DropdownButton type="LINK"
text="Preset Location" icon="TH_LARGE">
<b:Nav>
<b:Button type="LINK" ui:field="extentToItaly"
text="Italy" title="Center to Italy"></b:Button>
@ -55,6 +55,8 @@
</b:DropdownButton>
<b:Button type="LINK" ui:field="removeQuery"
text="Remove Query" visible="false"></b:Button>
<b:DropdownButton type="LINK" text="Layers" ui:field="detailLayers" visible="false">
</b:DropdownButton>
</g:HTMLPanel>
</g:HTMLPanel>
<c:DetailsPanel ui:field="detailsPanel"

View File

@ -10,8 +10,6 @@ import com.github.gwtbootstrap.client.ui.constants.IconType;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.DragLeaveEvent;
import com.google.gwt.event.dom.client.DragLeaveHandler;
import com.google.gwt.event.dom.client.DragOverEvent;