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;
}
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);
}
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;
}
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;
}
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));
}
};
}
Aggregations