Search in sources :

Example 1 with BBox

use of org.geosdi.geoplatform.gui.shared.bean.BBox in project geo-platform by geosdi.

the class BindingUtility method convertBBoxTypeToBBox.

public static BBox convertBBoxTypeToBBox(BoundingBoxType bBoxType) {
    if (bBoxType == null) {
        return null;
    }
    BBox bBox = new BBox();
    bBox.setMaxX(bBoxType.getLowerCorner().get(0));
    bBox.setMinY(bBoxType.getLowerCorner().get(1));
    bBox.setMinX(bBoxType.getUpperCorner().get(0));
    bBox.setMaxY(bBoxType.getUpperCorner().get(1));
    return bBox;
}
Also used : BBox(org.geosdi.geoplatform.gui.shared.bean.BBox)

Example 2 with BBox

use of org.geosdi.geoplatform.gui.shared.bean.BBox in project geo-platform by geosdi.

the class CatalogBBoxComponent method addRightComponents.

private void addRightComponents(FlexTable table) {
    table.getCellFormatter().setHorizontalAlignment(1, 4, HasHorizontalAlignment.ALIGN_CENTER);
    Label maxLonLabel = new Label(CatalogFinderConstants.INSTANCE.CatalogBBoxComponent_maxLonLabelText());
    maxLonLabel.setStyleName("catalogBBOX-Label");
    table.setWidget(1, 4, maxLonLabel);
    table.getCellFormatter().getElement(1, 4).getStyle().setPaddingLeft(40, Unit.PX);
    maxLonField = new GPSecureStringTextField();
    maxLonField.setWidth(55);
    maxLonField.setReadOnly(true);
    maxLonField.setFireChangeEventOnSetValue(true);
    maxLonField.addListener(Events.Change, new Listener<FieldEvent>() {

        @Override
        public void handleEvent(FieldEvent fe) {
            BBox bBox = areaInfo.getBBox();
            double value = (fe.getValue() != null) ? Double.valueOf(fe.getValue().toString()).doubleValue() : 0;
            bBox.setMaxX(value);
        }
    });
    table.getCellFormatter().setHorizontalAlignment(1, 5, HasHorizontalAlignment.ALIGN_CENTER);
    table.setWidget(1, 5, maxLonField);
}
Also used : GPSecureStringTextField(org.geosdi.geoplatform.gui.configuration.GPSecureStringTextField) FieldEvent(com.extjs.gxt.ui.client.event.FieldEvent) BBox(org.geosdi.geoplatform.gui.shared.bean.BBox) Label(com.extjs.gxt.ui.client.widget.Label)

Example 3 with BBox

use of org.geosdi.geoplatform.gui.shared.bean.BBox in project geo-platform by geosdi.

the class CatalogBBoxComponent method getTopComponent.

public FlexTable getTopComponent() {
    FlexTable table = new FlexTable();
    table.setCellSpacing(4);
    table.setCellPadding(1);
    table.getElement().getStyle().setMarginLeft(120, Unit.PX);
    table.getCellFormatter().setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_CENTER);
    Label maxLatLabel = new Label(CatalogFinderConstants.INSTANCE.CatalogBBoxComponent_maxLatLabelText());
    maxLatLabel.setStyleName("catalogBBOX-Label");
    table.setWidget(1, 1, maxLatLabel);
    maxLatField = new GPSecureStringTextField();
    maxLatField.setWidth(55);
    maxLatField.setReadOnly(true);
    maxLatField.setFireChangeEventOnSetValue(true);
    maxLatField.addListener(Events.Change, new Listener<FieldEvent>() {

        @Override
        public void handleEvent(FieldEvent fe) {
            BBox bBox = areaInfo.getBBox();
            double value = (fe.getValue() != null) ? Double.valueOf(fe.getValue().toString()).doubleValue() : 0;
            bBox.setMaxY(value);
        }
    });
    table.getCellFormatter().setHorizontalAlignment(1, 2, HasHorizontalAlignment.ALIGN_CENTER);
    table.setWidget(1, 2, maxLatField);
    return table;
}
Also used : GPSecureStringTextField(org.geosdi.geoplatform.gui.configuration.GPSecureStringTextField) FieldEvent(com.extjs.gxt.ui.client.event.FieldEvent) BBox(org.geosdi.geoplatform.gui.shared.bean.BBox) FlexTable(com.google.gwt.user.client.ui.FlexTable) Label(com.extjs.gxt.ui.client.widget.Label)

Example 4 with BBox

use of org.geosdi.geoplatform.gui.shared.bean.BBox in project geo-platform by geosdi.

the class AreaInfoProvider method get.

@Override
public AreaInfo get() {
    AreaInfo areaInfo = new AreaInfo();
    areaInfo.setBBox(new BBox());
    return areaInfo;
}
Also used : BBox(org.geosdi.geoplatform.gui.shared.bean.BBox) AreaInfo(org.geosdi.geoplatform.gui.responce.AreaInfo)

Example 5 with BBox

use of org.geosdi.geoplatform.gui.shared.bean.BBox in project geo-platform by geosdi.

the class GPWFSSearchFeaturesByBboxRequestValidatorTest method createWFSSearchFeaturesByBboxRequest.

/**
 * @return {@link GPWFSSearchFeaturesByBboxRequest}
 */
public static GPWFSSearchFeaturesByBboxRequest createWFSSearchFeaturesByBboxRequest() {
    return new GPWFSSearchFeaturesByBboxRequest() {

        {
            super.setServerURL("http://150.145.141.92/geoserver/wfs");
            super.setTypeName("topp:states");
            super.setMaxFeatures(50);
            super.setBBox(new BBox(-75.102613, 40.212597, -72.361859, 41.512517));
        }
    };
}
Also used : BBox(org.geosdi.geoplatform.gui.shared.bean.BBox) GPWFSSearchFeaturesByBboxRequest(org.geosdi.geoplatform.services.request.GPWFSSearchFeaturesByBboxRequest)

Aggregations

BBox (org.geosdi.geoplatform.gui.shared.bean.BBox)26 Test (org.junit.Test)14 FeatureCollectionType (org.geosdi.geoplatform.xml.wfs.v110.FeatureCollectionType)7 FeatureCollectionDTO (org.geosdi.geoplatform.connector.wfs.response.FeatureCollectionDTO)6 LayerSchemaDTO (org.geosdi.geoplatform.connector.wfs.response.LayerSchemaDTO)5 QueryDTO (org.geosdi.geoplatform.connector.wfs.response.QueryDTO)5 AreaInfo (org.geosdi.geoplatform.gui.responce.AreaInfo)5 FieldEvent (com.extjs.gxt.ui.client.event.FieldEvent)4 Label (com.extjs.gxt.ui.client.widget.Label)4 StringReader (java.io.StringReader)4 URL (java.net.URL)4 QName (javax.xml.namespace.QName)4 GPSecureStringTextField (org.geosdi.geoplatform.gui.configuration.GPSecureStringTextField)4 JAXBElement (javax.xml.bind.JAXBElement)3 GPWFSConnectorStore (org.geosdi.geoplatform.connector.GPWFSConnectorStore)3 WFSGetFeatureRequest (org.geosdi.geoplatform.connector.server.request.WFSGetFeatureRequest)3 WFSGetFeatureStaxReader (org.geosdi.geoplatform.support.wfs.feature.reader.WFSGetFeatureStaxReader)3 FlexTable (com.google.gwt.user.client.ui.FlexTable)2 AreaSearchType (org.geosdi.geoplatform.gui.responce.AreaInfo.AreaSearchType)2 BBOXType (org.geosdi.geoplatform.xml.filter.v110.BBOXType)2