id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
147,400 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/paintable/mapaddon/ScaleBar.java | ScaleBar.initialize | public void initialize(UnitType unitType, double unitLength, Coordinate position) {
if (null == unitType) {
throw new IllegalArgumentException("please provide a unitType");
}
this.unitType = unitType;
this.unitLength = unitLength;
backGround = new Rectangle((null == getId() ? "" : getId() + "-bg"));
ba... | java | public void initialize(UnitType unitType, double unitLength, Coordinate position) {
if (null == unitType) {
throw new IllegalArgumentException("please provide a unitType");
}
this.unitType = unitType;
this.unitLength = unitLength;
backGround = new Rectangle((null == getId() ? "" : getId() + "-bg"));
ba... | [
"public",
"void",
"initialize",
"(",
"UnitType",
"unitType",
",",
"double",
"unitLength",
",",
"Coordinate",
"position",
")",
"{",
"if",
"(",
"null",
"==",
"unitType",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"please provide a unitType\"",
")",... | Initialize scale bar.
@param unitType
how are units shown (english/metric/crs)
@param unitLength
length of a unit in meter
@param position
coordinate where scalebar should be drawn on the graphics context | [
"Initialize",
"scale",
"bar",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/paintable/mapaddon/ScaleBar.java#L143-L170 |
147,401 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/paintable/mapaddon/ScaleBar.java | ScaleBar.setMapSize | public void setMapSize(int mapWidth, int mapHeight) {
super.setMapSize(mapWidth, mapHeight);
if (null == unitType) {
throw new IllegalStateException("Please initialize scale bar before using");
}
backGround.getBounds().setX(getUpperLeftCorner().getX());
backGround.getBounds().setY(getUpperLeftCorner().getY... | java | public void setMapSize(int mapWidth, int mapHeight) {
super.setMapSize(mapWidth, mapHeight);
if (null == unitType) {
throw new IllegalStateException("Please initialize scale bar before using");
}
backGround.getBounds().setX(getUpperLeftCorner().getX());
backGround.getBounds().setY(getUpperLeftCorner().getY... | [
"public",
"void",
"setMapSize",
"(",
"int",
"mapWidth",
",",
"int",
"mapHeight",
")",
"{",
"super",
".",
"setMapSize",
"(",
"mapWidth",
",",
"mapHeight",
")",
";",
"if",
"(",
"null",
"==",
"unitType",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",... | Set map size.
@param mapWidth map width
@param mapHeight map height | [
"Set",
"map",
"size",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/paintable/mapaddon/ScaleBar.java#L212-L226 |
147,402 | geomajas/geomajas-project-client-gwt | plugin/widget-layer/layer-gwt/src/main/java/org/geomajas/widget/layer/client/util/LayerIconUtil.java | LayerIconUtil.getSmallLayerIcon | public static Img getSmallLayerIcon(Layer<?> layer) {
String url = getSmallLayerIconUrl(layer);
if (url != null) {
return new Img(url);
} else {
return null;
}
} | java | public static Img getSmallLayerIcon(Layer<?> layer) {
String url = getSmallLayerIconUrl(layer);
if (url != null) {
return new Img(url);
} else {
return null;
}
} | [
"public",
"static",
"Img",
"getSmallLayerIcon",
"(",
"Layer",
"<",
"?",
">",
"layer",
")",
"{",
"String",
"url",
"=",
"getSmallLayerIconUrl",
"(",
"layer",
")",
";",
"if",
"(",
"url",
"!=",
"null",
")",
"{",
"return",
"new",
"Img",
"(",
"url",
")",
"... | Get small layer icon as image.
@param layer
layer
@return image | [
"Get",
"small",
"layer",
"icon",
"as",
"image",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-layer/layer-gwt/src/main/java/org/geomajas/widget/layer/client/util/LayerIconUtil.java#L39-L46 |
147,403 | geomajas/geomajas-project-client-gwt | plugin/widget-layer/layer-gwt/src/main/java/org/geomajas/widget/layer/client/util/LayerIconUtil.java | LayerIconUtil.getSmallLayerIconUrl | public static String getSmallLayerIconUrl(Layer<?> layer) {
ClientExtraLayerInfo eli = (ClientExtraLayerInfo) layer.getLayerInfo().getWidgetInfo(
ClientExtraLayerInfo.IDENTIFIER);
if (eli != null && eli.getSmallLayerIconUrl() != null && !"".equals(eli.getSmallLayerIconUrl())) {
return eli.getSmallLayerIconUr... | java | public static String getSmallLayerIconUrl(Layer<?> layer) {
ClientExtraLayerInfo eli = (ClientExtraLayerInfo) layer.getLayerInfo().getWidgetInfo(
ClientExtraLayerInfo.IDENTIFIER);
if (eli != null && eli.getSmallLayerIconUrl() != null && !"".equals(eli.getSmallLayerIconUrl())) {
return eli.getSmallLayerIconUr... | [
"public",
"static",
"String",
"getSmallLayerIconUrl",
"(",
"Layer",
"<",
"?",
">",
"layer",
")",
"{",
"ClientExtraLayerInfo",
"eli",
"=",
"(",
"ClientExtraLayerInfo",
")",
"layer",
".",
"getLayerInfo",
"(",
")",
".",
"getWidgetInfo",
"(",
"ClientExtraLayerInfo",
... | Get small layer image URL.
@param layer
layer
@return image URL | [
"Get",
"small",
"layer",
"image",
"URL",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-layer/layer-gwt/src/main/java/org/geomajas/widget/layer/client/util/LayerIconUtil.java#L55-L63 |
147,404 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/action/toolbar/PanToSelectionAction.java | PanToSelectionAction.onClick | public void onClick(ClickEvent clickEvent) {
List<Feature> features = new ArrayList<Feature>();
for (VectorLayer layer : mapWidget.getMapModel().getVectorLayers()) {
features.addAll(layer.getSelectedFeatureValues());
}
// only zoom when there where really some items selected
if (features.size() > 0) {
... | java | public void onClick(ClickEvent clickEvent) {
List<Feature> features = new ArrayList<Feature>();
for (VectorLayer layer : mapWidget.getMapModel().getVectorLayers()) {
features.addAll(layer.getSelectedFeatureValues());
}
// only zoom when there where really some items selected
if (features.size() > 0) {
... | [
"public",
"void",
"onClick",
"(",
"ClickEvent",
"clickEvent",
")",
"{",
"List",
"<",
"Feature",
">",
"features",
"=",
"new",
"ArrayList",
"<",
"Feature",
">",
"(",
")",
";",
"for",
"(",
"VectorLayer",
"layer",
":",
"mapWidget",
".",
"getMapModel",
"(",
"... | Pan to the selected features. | [
"Pan",
"to",
"the",
"selected",
"features",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/action/toolbar/PanToSelectionAction.java#L44-L53 |
147,405 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/Legend.java | Legend.render | public void render() {
removeMembers(getMembers());
// Then go over all layers, to draw styles:
for (Layer<?> layer : mapModel.getLayers()) {
if (staticLegend || layer.isShowing()) {
// Go over every truly visible layer:
if (layer instanceof VectorLayer) {
ClientVectorLayerInfo layerInfo = ((Vecto... | java | public void render() {
removeMembers(getMembers());
// Then go over all layers, to draw styles:
for (Layer<?> layer : mapModel.getLayers()) {
if (staticLegend || layer.isShowing()) {
// Go over every truly visible layer:
if (layer instanceof VectorLayer) {
ClientVectorLayerInfo layerInfo = ((Vecto... | [
"public",
"void",
"render",
"(",
")",
"{",
"removeMembers",
"(",
"getMembers",
"(",
")",
")",
";",
"// Then go over all layers, to draw styles:",
"for",
"(",
"Layer",
"<",
"?",
">",
"layer",
":",
"mapModel",
".",
"getLayers",
"(",
")",
")",
"{",
"if",
"(",... | Render the legend. This triggers a complete redraw. | [
"Render",
"the",
"legend",
".",
"This",
"triggers",
"a",
"complete",
"redraw",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/Legend.java#L111-L138 |
147,406 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/Legend.java | Legend.initialize | private void initialize() {
registrations.clear();
for (Layer<?> layer : mapModel.getLayers()) {
registrations.add(layer.addLayerChangedHandler(new LayerChangedHandler() {
public void onLabelChange(LayerLabeledEvent event) {
}
public void onVisibleChange(LayerShownEvent event) {
render();
... | java | private void initialize() {
registrations.clear();
for (Layer<?> layer : mapModel.getLayers()) {
registrations.add(layer.addLayerChangedHandler(new LayerChangedHandler() {
public void onLabelChange(LayerLabeledEvent event) {
}
public void onVisibleChange(LayerShownEvent event) {
render();
... | [
"private",
"void",
"initialize",
"(",
")",
"{",
"registrations",
".",
"clear",
"(",
")",
";",
"for",
"(",
"Layer",
"<",
"?",
">",
"layer",
":",
"mapModel",
".",
"getLayers",
"(",
")",
")",
"{",
"registrations",
".",
"add",
"(",
"layer",
".",
"addLaye... | Called when the MapModel configuration has been loaded. | [
"Called",
"when",
"the",
"MapModel",
"configuration",
"has",
"been",
"loaded",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/Legend.java#L210-L239 |
147,407 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/Legend.java | Legend.onUnload | protected void onUnload() {
if (registrations != null) {
for (HandlerRegistration registration : registrations) {
registration.removeHandler();
}
}
loadedRegistration.removeHandler();
super.onUnload();
} | java | protected void onUnload() {
if (registrations != null) {
for (HandlerRegistration registration : registrations) {
registration.removeHandler();
}
}
loadedRegistration.removeHandler();
super.onUnload();
} | [
"protected",
"void",
"onUnload",
"(",
")",
"{",
"if",
"(",
"registrations",
"!=",
"null",
")",
"{",
"for",
"(",
"HandlerRegistration",
"registration",
":",
"registrations",
")",
"{",
"registration",
".",
"removeHandler",
"(",
")",
";",
"}",
"}",
"loadedRegis... | Remove all handlers on unload. | [
"Remove",
"all",
"handlers",
"on",
"unload",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/Legend.java#L242-L250 |
147,408 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/controller/MeasureDistanceController.java | MeasureDistanceController.onActivate | public void onActivate() {
menu = new Menu();
menu.addItem(new CancelMeasuringAction(this));
Layer selectedLayer = mapWidget.getMapModel().getSelectedLayer();
if (selectedLayer instanceof VectorLayer) {
menu.addItem(new ToggleSnappingAction((VectorLayer) selectedLayer, this));
}
mapWidget.setContextMenu(... | java | public void onActivate() {
menu = new Menu();
menu.addItem(new CancelMeasuringAction(this));
Layer selectedLayer = mapWidget.getMapModel().getSelectedLayer();
if (selectedLayer instanceof VectorLayer) {
menu.addItem(new ToggleSnappingAction((VectorLayer) selectedLayer, this));
}
mapWidget.setContextMenu(... | [
"public",
"void",
"onActivate",
"(",
")",
"{",
"menu",
"=",
"new",
"Menu",
"(",
")",
";",
"menu",
".",
"addItem",
"(",
"new",
"CancelMeasuringAction",
"(",
"this",
")",
")",
";",
"Layer",
"selectedLayer",
"=",
"mapWidget",
".",
"getMapModel",
"(",
")",
... | Create the context menu for this controller. | [
"Create",
"the",
"context",
"menu",
"for",
"this",
"controller",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/controller/MeasureDistanceController.java#L130-L138 |
147,409 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/controller/MeasureDistanceController.java | MeasureDistanceController.onDeactivate | public void onDeactivate() {
onDoubleClick(null);
menu.destroy();
menu = null;
mapWidget.setContextMenu(null);
mapWidget.unregisterWorldPaintable(distanceLine);
mapWidget.unregisterWorldPaintable(lineSegment);
} | java | public void onDeactivate() {
onDoubleClick(null);
menu.destroy();
menu = null;
mapWidget.setContextMenu(null);
mapWidget.unregisterWorldPaintable(distanceLine);
mapWidget.unregisterWorldPaintable(lineSegment);
} | [
"public",
"void",
"onDeactivate",
"(",
")",
"{",
"onDoubleClick",
"(",
"null",
")",
";",
"menu",
".",
"destroy",
"(",
")",
";",
"menu",
"=",
"null",
";",
"mapWidget",
".",
"setContextMenu",
"(",
"null",
")",
";",
"mapWidget",
".",
"unregisterWorldPaintable... | Clean everything up. | [
"Clean",
"everything",
"up",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/controller/MeasureDistanceController.java#L141-L148 |
147,410 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/controller/MeasureDistanceController.java | MeasureDistanceController.onMouseUp | public void onMouseUp(MouseUpEvent event) {
if (event.getNativeButton() != NativeEvent.BUTTON_RIGHT) {
Coordinate coordinate = getWorldPosition(event);
if (distanceLine.getOriginalLocation() == null) {
distanceLine.setGeometry(getFactory().createLineString(new Coordinate[] { coordinate }));
mapWidget.re... | java | public void onMouseUp(MouseUpEvent event) {
if (event.getNativeButton() != NativeEvent.BUTTON_RIGHT) {
Coordinate coordinate = getWorldPosition(event);
if (distanceLine.getOriginalLocation() == null) {
distanceLine.setGeometry(getFactory().createLineString(new Coordinate[] { coordinate }));
mapWidget.re... | [
"public",
"void",
"onMouseUp",
"(",
"MouseUpEvent",
"event",
")",
"{",
"if",
"(",
"event",
".",
"getNativeButton",
"(",
")",
"!=",
"NativeEvent",
".",
"BUTTON_RIGHT",
")",
"{",
"Coordinate",
"coordinate",
"=",
"getWorldPosition",
"(",
"event",
")",
";",
"if"... | Set a new point on the distance-line. | [
"Set",
"a",
"new",
"point",
"on",
"the",
"distance",
"-",
"line",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/controller/MeasureDistanceController.java#L151-L170 |
147,411 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/controller/MeasureDistanceController.java | MeasureDistanceController.onMouseMove | public void onMouseMove(MouseMoveEvent event) {
if (isMeasuring() && distanceLine.getOriginalLocation() != null) {
updateMeasure(event, false);
dispatchState(State.MOVE);
}
} | java | public void onMouseMove(MouseMoveEvent event) {
if (isMeasuring() && distanceLine.getOriginalLocation() != null) {
updateMeasure(event, false);
dispatchState(State.MOVE);
}
} | [
"public",
"void",
"onMouseMove",
"(",
"MouseMoveEvent",
"event",
")",
"{",
"if",
"(",
"isMeasuring",
"(",
")",
"&&",
"distanceLine",
".",
"getOriginalLocation",
"(",
")",
"!=",
"null",
")",
"{",
"updateMeasure",
"(",
"event",
",",
"false",
")",
";",
"dispa... | Update the drawing while moving the mouse. | [
"Update",
"the",
"drawing",
"while",
"moving",
"the",
"mouse",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/controller/MeasureDistanceController.java#L173-L178 |
147,412 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/controller/MeasureDistanceController.java | MeasureDistanceController.onDoubleClick | public void onDoubleClick(DoubleClickEvent event) {
tempLength = 0;
mapWidget.unregisterWorldPaintable(distanceLine);
mapWidget.unregisterWorldPaintable(lineSegment);
distanceLine.setGeometry(null);
lineSegment.setGeometry(null);
if (panel != null) {
panel.destroy();
}
dispatchState(State.STOP);
} | java | public void onDoubleClick(DoubleClickEvent event) {
tempLength = 0;
mapWidget.unregisterWorldPaintable(distanceLine);
mapWidget.unregisterWorldPaintable(lineSegment);
distanceLine.setGeometry(null);
lineSegment.setGeometry(null);
if (panel != null) {
panel.destroy();
}
dispatchState(State.STOP);
} | [
"public",
"void",
"onDoubleClick",
"(",
"DoubleClickEvent",
"event",
")",
"{",
"tempLength",
"=",
"0",
";",
"mapWidget",
".",
"unregisterWorldPaintable",
"(",
"distanceLine",
")",
";",
"mapWidget",
".",
"unregisterWorldPaintable",
"(",
"lineSegment",
")",
";",
"di... | Stop the measuring, and remove all graphics from the map. | [
"Stop",
"the",
"measuring",
"and",
"remove",
"all",
"graphics",
"from",
"the",
"map",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/controller/MeasureDistanceController.java#L181-L191 |
147,413 | geomajas/geomajas-project-client-gwt | plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/map/feature/FeatureSearchServiceImpl.java | FeatureSearchServiceImpl.searchById | public void searchById(final FeaturesSupported layer, final String[] ids, final FeatureArrayCallback callback) {
Layer<?> gwtLayer = map.getMapWidget().getMapModel().getLayer(layer.getId());
if (gwtLayer != null && gwtLayer instanceof VectorLayer) {
VectorLayer vLayer = (VectorLayer) gwtLayer;
SearchCriterion... | java | public void searchById(final FeaturesSupported layer, final String[] ids, final FeatureArrayCallback callback) {
Layer<?> gwtLayer = map.getMapWidget().getMapModel().getLayer(layer.getId());
if (gwtLayer != null && gwtLayer instanceof VectorLayer) {
VectorLayer vLayer = (VectorLayer) gwtLayer;
SearchCriterion... | [
"public",
"void",
"searchById",
"(",
"final",
"FeaturesSupported",
"layer",
",",
"final",
"String",
"[",
"]",
"ids",
",",
"final",
"FeatureArrayCallback",
"callback",
")",
"{",
"Layer",
"<",
"?",
">",
"gwtLayer",
"=",
"map",
".",
"getMapWidget",
"(",
")",
... | Search features within a certain layer, using the feature IDs.
@param layer
The features supported layer wherein to search.
@param ids
The unique IDs of the feature within the layer.
@param callback
Call-back method executed on return (when the feature has been found). | [
"Search",
"features",
"within",
"a",
"certain",
"layer",
"using",
"the",
"feature",
"IDs",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/map/feature/FeatureSearchServiceImpl.java#L71-L104 |
147,414 | geomajas/geomajas-project-client-gwt | plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/map/feature/FeatureSearchServiceImpl.java | FeatureSearchServiceImpl.searchInBounds | public void searchInBounds(final FeaturesSupported layer, Bbox bbox, final FeatureArrayCallback callback) {
MapModel mapModel = map.getMapWidget().getMapModel();
Layer<?> gwtLayer = mapModel.getLayer(layer.getId());
if (gwtLayer != null && gwtLayer instanceof VectorLayer) {
final VectorLayer vLayer = (VectorLa... | java | public void searchInBounds(final FeaturesSupported layer, Bbox bbox, final FeatureArrayCallback callback) {
MapModel mapModel = map.getMapWidget().getMapModel();
Layer<?> gwtLayer = mapModel.getLayer(layer.getId());
if (gwtLayer != null && gwtLayer instanceof VectorLayer) {
final VectorLayer vLayer = (VectorLa... | [
"public",
"void",
"searchInBounds",
"(",
"final",
"FeaturesSupported",
"layer",
",",
"Bbox",
"bbox",
",",
"final",
"FeatureArrayCallback",
"callback",
")",
"{",
"MapModel",
"mapModel",
"=",
"map",
".",
"getMapWidget",
"(",
")",
".",
"getMapModel",
"(",
")",
";... | Search all features within a certain layer that intersect a certain bounding box.
@param layer
The features supported layer wherein to search.
@param bbox
The bounding box wherein to search.
@param callback
Call-back method executed on return (when features have been found). | [
"Search",
"all",
"features",
"within",
"a",
"certain",
"layer",
"that",
"intersect",
"a",
"certain",
"bounding",
"box",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/map/feature/FeatureSearchServiceImpl.java#L116-L151 |
147,415 | geomajas/geomajas-project-client-gwt | plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/map/layer/VectorLayer.java | VectorLayer.getSelectedFeatures | public Feature[] getSelectedFeatures() {
Collection<org.geomajas.gwt.client.map.feature.Feature> selection = getLayer().getSelectedFeatureValues();
Feature[] features = new Feature[selection.size()];
int count = 0;
for (org.geomajas.gwt.client.map.feature.Feature feature : selection) {
features[count] = new ... | java | public Feature[] getSelectedFeatures() {
Collection<org.geomajas.gwt.client.map.feature.Feature> selection = getLayer().getSelectedFeatureValues();
Feature[] features = new Feature[selection.size()];
int count = 0;
for (org.geomajas.gwt.client.map.feature.Feature feature : selection) {
features[count] = new ... | [
"public",
"Feature",
"[",
"]",
"getSelectedFeatures",
"(",
")",
"{",
"Collection",
"<",
"org",
".",
"geomajas",
".",
"gwt",
".",
"client",
".",
"map",
".",
"feature",
".",
"Feature",
">",
"selection",
"=",
"getLayer",
"(",
")",
".",
"getSelectedFeatureValu... | Get the full list of currently selected features within this layer.
@return The list of selected features as an array. | [
"Get",
"the",
"full",
"list",
"of",
"currently",
"selected",
"features",
"within",
"this",
"layer",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/map/layer/VectorLayer.java#L130-L139 |
147,416 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/controller/OverviewMapController.java | OverviewMapController.onMouseMove | @Override
public void onMouseMove(MouseMoveEvent event) {
if (dragging) {
Coordinate current = getScreenPosition(event);
getOverviewMap().movePov(current.getX() - previous.getX(), current.getY() - previous.getY());
previous = current;
}
} | java | @Override
public void onMouseMove(MouseMoveEvent event) {
if (dragging) {
Coordinate current = getScreenPosition(event);
getOverviewMap().movePov(current.getX() - previous.getX(), current.getY() - previous.getY());
previous = current;
}
} | [
"@",
"Override",
"public",
"void",
"onMouseMove",
"(",
"MouseMoveEvent",
"event",
")",
"{",
"if",
"(",
"dragging",
")",
"{",
"Coordinate",
"current",
"=",
"getScreenPosition",
"(",
"event",
")",
";",
"getOverviewMap",
"(",
")",
".",
"movePov",
"(",
"current"... | Only moving rectangle or reticle during drag. | [
"Only",
"moving",
"rectangle",
"or",
"reticle",
"during",
"drag",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/controller/OverviewMapController.java#L52-L59 |
147,417 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/context/VmlStyleUtil.java | VmlStyleUtil.applyStyle | public static void applyStyle(Element element, Style style) {
if (style != null && element != null) {
if (style instanceof ShapeStyle) {
applyShapeStyle(element, (ShapeStyle) style);
} else if (style instanceof FontStyle) {
FontStyle fontStyle = (FontStyle) style;
element.getStyle().setProperty("fon... | java | public static void applyStyle(Element element, Style style) {
if (style != null && element != null) {
if (style instanceof ShapeStyle) {
applyShapeStyle(element, (ShapeStyle) style);
} else if (style instanceof FontStyle) {
FontStyle fontStyle = (FontStyle) style;
element.getStyle().setProperty("fon... | [
"public",
"static",
"void",
"applyStyle",
"(",
"Element",
"element",
",",
"Style",
"style",
")",
"{",
"if",
"(",
"style",
"!=",
"null",
"&&",
"element",
"!=",
"null",
")",
"{",
"if",
"(",
"style",
"instanceof",
"ShapeStyle",
")",
"{",
"applyShapeStyle",
... | Apply the given style onto a DOM element. This decoder will decide how to handle all the details.
@param element
The target element onto whom we apply a style object.
@param style
The style object to be applied. | [
"Apply",
"the",
"given",
"style",
"onto",
"a",
"DOM",
"element",
".",
"This",
"decoder",
"will",
"decide",
"how",
"to",
"handle",
"all",
"the",
"details",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/VmlStyleUtil.java#L46-L66 |
147,418 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/context/VmlStyleUtil.java | VmlStyleUtil.retrieveShapeStyle | public static ShapeStyle retrieveShapeStyle(Element element) {
ShapeStyle style = new ShapeStyle();
// Check the "fill" child-element:
String filled = element.getAttribute("filled");
if ("true".equals(filled)) {
Element fill = element.getElementsByTagName("fill").getItem(0);
style.setFillColor(fill.getAt... | java | public static ShapeStyle retrieveShapeStyle(Element element) {
ShapeStyle style = new ShapeStyle();
// Check the "fill" child-element:
String filled = element.getAttribute("filled");
if ("true".equals(filled)) {
Element fill = element.getElementsByTagName("fill").getItem(0);
style.setFillColor(fill.getAt... | [
"public",
"static",
"ShapeStyle",
"retrieveShapeStyle",
"(",
"Element",
"element",
")",
"{",
"ShapeStyle",
"style",
"=",
"new",
"ShapeStyle",
"(",
")",
";",
"// Check the \"fill\" child-element:",
"String",
"filled",
"=",
"element",
".",
"getAttribute",
"(",
"\"fill... | Retrieve a ShapeStyle object from a DOM element. Note that this function will always return a shapestyle object,
even if nothing is in it.
@param element
The element to retrieve the style from.
@return The ShapeStyle object retrieved from the element. | [
"Retrieve",
"a",
"ShapeStyle",
"object",
"from",
"a",
"DOM",
"element",
".",
"Note",
"that",
"this",
"function",
"will",
"always",
"return",
"a",
"shapestyle",
"object",
"even",
"if",
"nothing",
"is",
"in",
"it",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/VmlStyleUtil.java#L76-L96 |
147,419 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/context/VmlStyleUtil.java | VmlStyleUtil.applyShapeStyle | private static void applyShapeStyle(Element element, ShapeStyle style) {
// First check the presence of the fill and stroke elements:
NodeList<Element> fills = element.getElementsByTagName("fill");
if (fills.getLength() == 0) {
Element stroke = Dom.createElementNS(Dom.NS_VML, "stroke");
element.appendChild(... | java | private static void applyShapeStyle(Element element, ShapeStyle style) {
// First check the presence of the fill and stroke elements:
NodeList<Element> fills = element.getElementsByTagName("fill");
if (fills.getLength() == 0) {
Element stroke = Dom.createElementNS(Dom.NS_VML, "stroke");
element.appendChild(... | [
"private",
"static",
"void",
"applyShapeStyle",
"(",
"Element",
"element",
",",
"ShapeStyle",
"style",
")",
"{",
"// First check the presence of the fill and stroke elements:",
"NodeList",
"<",
"Element",
">",
"fills",
"=",
"element",
".",
"getElementsByTagName",
"(",
"... | When applying ShapeStyles, we create child elements for fill and stroke. According to Microsoft, this is the
proper way to go. | [
"When",
"applying",
"ShapeStyles",
"we",
"create",
"child",
"elements",
"for",
"fill",
"and",
"stroke",
".",
"According",
"to",
"Microsoft",
"this",
"is",
"the",
"proper",
"way",
"to",
"go",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/VmlStyleUtil.java#L106-L136 |
147,420 | geomajas/geomajas-project-client-gwt | plugin/widget-searchandfilter/searchandfilter-gwt/src/main/java/org/geomajas/widget/searchandfilter/client/util/AttributeCriterionUtil.java | AttributeCriterionUtil.getSearchCriterion | public static AttributeCriterion getSearchCriterion(String serverLayerId,
AbstractReadOnlyAttributeInfo selectedAttribute,
FormItem valueFormItem,
String operationCode) {
Object value = valueFormItem.getValue();
if (selectedAttribute != null && operationCode != null) {
... | java | public static AttributeCriterion getSearchCriterion(String serverLayerId,
AbstractReadOnlyAttributeInfo selectedAttribute,
FormItem valueFormItem,
String operationCode) {
Object value = valueFormItem.getValue();
if (selectedAttribute != null && operationCode != null) {
... | [
"public",
"static",
"AttributeCriterion",
"getSearchCriterion",
"(",
"String",
"serverLayerId",
",",
"AbstractReadOnlyAttributeInfo",
"selectedAttribute",
",",
"FormItem",
"valueFormItem",
",",
"String",
"operationCode",
")",
"{",
"Object",
"value",
"=",
"valueFormItem",
... | Return a search criterion object, or null if not all fields have been properly filled.
@param serverLayerId server id of the vector layer that will be searched in
@param selectedAttribute the attributeInfo of the attribute that is subject of the criterion
@param valueFormItem the form element that contains the value of... | [
"Return",
"a",
"search",
"criterion",
"object",
"or",
"null",
"if",
"not",
"all",
"fields",
"have",
"been",
"properly",
"filled",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-searchandfilter/searchandfilter-gwt/src/main/java/org/geomajas/widget/searchandfilter/client/util/AttributeCriterionUtil.java#L140-L207 |
147,421 | geomajas/geomajas-project-client-gwt | plugin/editing/editing-javascript-api/src/main/java/org/geomajas/plugin/editing/jsapi/client/service/JsGeometryIndexService.java | JsGeometryIndexService.create | @ExportInstanceMethod
public static GeometryIndex create(GeometryIndexService instance, String type, int[] values) {
if ("geometry".equalsIgnoreCase(type)) {
return instance.create(GeometryIndexType.TYPE_GEOMETRY, values);
} else if ("vertex".equalsIgnoreCase(type)) {
return instance.create(GeometryIndexType... | java | @ExportInstanceMethod
public static GeometryIndex create(GeometryIndexService instance, String type, int[] values) {
if ("geometry".equalsIgnoreCase(type)) {
return instance.create(GeometryIndexType.TYPE_GEOMETRY, values);
} else if ("vertex".equalsIgnoreCase(type)) {
return instance.create(GeometryIndexType... | [
"@",
"ExportInstanceMethod",
"public",
"static",
"GeometryIndex",
"create",
"(",
"GeometryIndexService",
"instance",
",",
"String",
"type",
",",
"int",
"[",
"]",
"values",
")",
"{",
"if",
"(",
"\"geometry\"",
".",
"equalsIgnoreCase",
"(",
"type",
")",
")",
"{"... | Create a new geometry index instance.
@param instance
The index service instance to help you create the index.
@param type
The type for the deepest index value.
@param values
A list of values for the children to create.
@return The new index. | [
"Create",
"a",
"new",
"geometry",
"index",
"instance",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/editing/editing-javascript-api/src/main/java/org/geomajas/plugin/editing/jsapi/client/service/JsGeometryIndexService.java#L51-L61 |
147,422 | geomajas/geomajas-project-client-gwt | plugin/editing/editing-javascript-api/src/main/java/org/geomajas/plugin/editing/jsapi/client/service/JsGeometryIndexService.java | JsGeometryIndexService.addChildren | @ExportInstanceMethod
public static GeometryIndex addChildren(GeometryIndexService instance, GeometryIndex index, String type,
int[] values) {
if ("geometry".equalsIgnoreCase(type)) {
return instance.addChildren(index, GeometryIndexType.TYPE_GEOMETRY, values);
} else if ("vertex".equalsIgnoreCase(type)) {
... | java | @ExportInstanceMethod
public static GeometryIndex addChildren(GeometryIndexService instance, GeometryIndex index, String type,
int[] values) {
if ("geometry".equalsIgnoreCase(type)) {
return instance.addChildren(index, GeometryIndexType.TYPE_GEOMETRY, values);
} else if ("vertex".equalsIgnoreCase(type)) {
... | [
"@",
"ExportInstanceMethod",
"public",
"static",
"GeometryIndex",
"addChildren",
"(",
"GeometryIndexService",
"instance",
",",
"GeometryIndex",
"index",
",",
"String",
"type",
",",
"int",
"[",
"]",
"values",
")",
"{",
"if",
"(",
"\"geometry\"",
".",
"equalsIgnoreC... | Create a new geometry index instance, by adding more depth to a given parent index.
@param instance
The index service instance to help you create the index.
@param index
The parent index to start from.
@param type
The type for the deepest index value.
@param values
A list of values for the children to attach to the pa... | [
"Create",
"a",
"new",
"geometry",
"index",
"instance",
"by",
"adding",
"more",
"depth",
"to",
"a",
"given",
"parent",
"index",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/editing/editing-javascript-api/src/main/java/org/geomajas/plugin/editing/jsapi/client/service/JsGeometryIndexService.java#L76-L87 |
147,423 | geomajas/geomajas-project-client-gwt | plugin/widget-featureinfo/featureinfo-gwt/src/main/java/org/geomajas/widget/featureinfo/client/widget/factory/WidgetFactory.java | WidgetFactory.put | public static void put(String key, WidgetBuilder builder) {
if (null != key && null != builder) {
WIDGETBUILDERS.put(key, builder);
}
} | java | public static void put(String key, WidgetBuilder builder) {
if (null != key && null != builder) {
WIDGETBUILDERS.put(key, builder);
}
} | [
"public",
"static",
"void",
"put",
"(",
"String",
"key",
",",
"WidgetBuilder",
"builder",
")",
"{",
"if",
"(",
"null",
"!=",
"key",
"&&",
"null",
"!=",
"builder",
")",
"{",
"WIDGETBUILDERS",
".",
"put",
"(",
"key",
",",
"builder",
")",
";",
"}",
"}"
... | Add a builder to the factory.
@param key
@param builder | [
"Add",
"a",
"builder",
"to",
"the",
"factory",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-featureinfo/featureinfo-gwt/src/main/java/org/geomajas/widget/featureinfo/client/widget/factory/WidgetFactory.java#L46-L50 |
147,424 | geomajas/geomajas-project-client-gwt | plugin/widget-featureinfo/featureinfo-gwt/src/main/java/org/geomajas/widget/featureinfo/client/widget/factory/WidgetFactory.java | WidgetFactory.createWidget | public static Canvas createWidget(String key) {
WidgetBuilder builder = WIDGETBUILDERS.get(key);
if (null == builder) {
return null;
}
return builder.createWidget();
} | java | public static Canvas createWidget(String key) {
WidgetBuilder builder = WIDGETBUILDERS.get(key);
if (null == builder) {
return null;
}
return builder.createWidget();
} | [
"public",
"static",
"Canvas",
"createWidget",
"(",
"String",
"key",
")",
"{",
"WidgetBuilder",
"builder",
"=",
"WIDGETBUILDERS",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"null",
"==",
"builder",
")",
"{",
"return",
"null",
";",
"}",
"return",
"builde... | Create a widget of given type.
@param key
key of widgettype
@return widget (canvas) or null when key not found | [
"Create",
"a",
"widget",
"of",
"given",
"type",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-featureinfo/featureinfo-gwt/src/main/java/org/geomajas/widget/featureinfo/client/widget/factory/WidgetFactory.java#L69-L75 |
147,425 | geomajas/geomajas-project-client-gwt | plugin/widget-featureinfo/featureinfo-gwt/src/main/java/org/geomajas/widget/featureinfo/client/action/toolbar/MultiLayerFeatureInfoModalAction.java | MultiLayerFeatureInfoModalAction.setFeaturesListLabels | public void setFeaturesListLabels(Map<String, String> featuresListLabels) {
this.featuresListLabels = featuresListLabels;
controller.setFeaturesListLabels(featuresListLabels);
} | java | public void setFeaturesListLabels(Map<String, String> featuresListLabels) {
this.featuresListLabels = featuresListLabels;
controller.setFeaturesListLabels(featuresListLabels);
} | [
"public",
"void",
"setFeaturesListLabels",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"featuresListLabels",
")",
"{",
"this",
".",
"featuresListLabels",
"=",
"featuresListLabels",
";",
"controller",
".",
"setFeaturesListLabels",
"(",
"featuresListLabels",
")",
"... | Set labels for feature lists.
@param featuresListLabels the featuresListLabels to set | [
"Set",
"labels",
"for",
"feature",
"lists",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-featureinfo/featureinfo-gwt/src/main/java/org/geomajas/widget/featureinfo/client/action/toolbar/MultiLayerFeatureInfoModalAction.java#L131-L134 |
147,426 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/action/ToolbarBaseAction.java | ToolbarBaseAction.setDisabled | public void setDisabled(boolean disabled) {
this.disabled = disabled;
if (disabled) {
handlerManager.fireEvent(new ToolbarActionDisabledEvent());
} else {
handlerManager.fireEvent(new ToolbarActionEnabledEvent());
}
} | java | public void setDisabled(boolean disabled) {
this.disabled = disabled;
if (disabled) {
handlerManager.fireEvent(new ToolbarActionDisabledEvent());
} else {
handlerManager.fireEvent(new ToolbarActionEnabledEvent());
}
} | [
"public",
"void",
"setDisabled",
"(",
"boolean",
"disabled",
")",
"{",
"this",
".",
"disabled",
"=",
"disabled",
";",
"if",
"(",
"disabled",
")",
"{",
"handlerManager",
".",
"fireEvent",
"(",
"new",
"ToolbarActionDisabledEvent",
"(",
")",
")",
";",
"}",
"e... | Is the button for this action disabled or not?
@param disabled
The new value | [
"Is",
"the",
"button",
"for",
"this",
"action",
"disabled",
"or",
"not?"
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/action/ToolbarBaseAction.java#L136-L143 |
147,427 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/spatial/geometry/MultiLineString.java | MultiLineString.getCoordinates | public Coordinate[] getCoordinates() {
if (isEmpty()) {
return null;
}
Coordinate[] coordinates = new Coordinate[getNumPoints()];
int count = 0;
for (LineString lineString : lineStrings) {
for (int j = 0; j < lineString.getNumPoints(); j++) {
coordinates[count++] = lineString.getCoordinateN(j);
}... | java | public Coordinate[] getCoordinates() {
if (isEmpty()) {
return null;
}
Coordinate[] coordinates = new Coordinate[getNumPoints()];
int count = 0;
for (LineString lineString : lineStrings) {
for (int j = 0; j < lineString.getNumPoints(); j++) {
coordinates[count++] = lineString.getCoordinateN(j);
}... | [
"public",
"Coordinate",
"[",
"]",
"getCoordinates",
"(",
")",
"{",
"if",
"(",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"Coordinate",
"[",
"]",
"coordinates",
"=",
"new",
"Coordinate",
"[",
"getNumPoints",
"(",
")",
"]",
";",
"int",
... | Get the full concatenated list of coordinates of all the LineStrings in this MultiLineString geometry. | [
"Get",
"the",
"full",
"concatenated",
"list",
"of",
"coordinates",
"of",
"all",
"the",
"LineStrings",
"in",
"this",
"MultiLineString",
"geometry",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/geometry/MultiLineString.java#L214-L226 |
147,428 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/spatial/geometry/MultiLineString.java | MultiLineString.intersects | public boolean intersects(Geometry geometry) {
if (isEmpty()) {
return false;
}
for (LineString lineString : lineStrings) {
if (lineString.intersects(geometry)) {
return true;
}
}
return false;
} | java | public boolean intersects(Geometry geometry) {
if (isEmpty()) {
return false;
}
for (LineString lineString : lineStrings) {
if (lineString.intersects(geometry)) {
return true;
}
}
return false;
} | [
"public",
"boolean",
"intersects",
"(",
"Geometry",
"geometry",
")",
"{",
"if",
"(",
"isEmpty",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"LineString",
"lineString",
":",
"lineStrings",
")",
"{",
"if",
"(",
"lineString",
".",
"intersec... | Check the LineStrings one by one for intersections with the given geometry. | [
"Check",
"the",
"LineStrings",
"one",
"by",
"one",
"for",
"intersections",
"with",
"the",
"given",
"geometry",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/geometry/MultiLineString.java#L236-L247 |
147,429 | geomajas/geomajas-project-client-gwt | plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/spatial/GeometryServiceImpl.java | GeometryServiceImpl.getBounds | public Bbox getBounds(Geometry geometry) {
org.geomajas.gwt.client.spatial.geometry.Geometry geom = GeometryConverter.toGwt(geometry);
return GeometryConverter.toDto(geom.getBounds());
} | java | public Bbox getBounds(Geometry geometry) {
org.geomajas.gwt.client.spatial.geometry.Geometry geom = GeometryConverter.toGwt(geometry);
return GeometryConverter.toDto(geom.getBounds());
} | [
"public",
"Bbox",
"getBounds",
"(",
"Geometry",
"geometry",
")",
"{",
"org",
".",
"geomajas",
".",
"gwt",
".",
"client",
".",
"spatial",
".",
"geometry",
".",
"Geometry",
"geom",
"=",
"GeometryConverter",
".",
"toGwt",
"(",
"geometry",
")",
";",
"return",
... | Return the bounding box that defines the outer most border of a geometry.
@param geometry
The geometry for which to calculate the bounding box.
@return The outer bounds for the given geometry. | [
"Return",
"the",
"bounding",
"box",
"that",
"defines",
"the",
"outer",
"most",
"border",
"of",
"a",
"geometry",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/spatial/GeometryServiceImpl.java#L43-L46 |
147,430 | geomajas/geomajas-project-client-gwt | plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/spatial/GeometryServiceImpl.java | GeometryServiceImpl.toWkt | public String toWkt(Geometry geometry) {
try {
return WktService.toWkt(geometry);
} catch (WktException e) {
return null;
}
} | java | public String toWkt(Geometry geometry) {
try {
return WktService.toWkt(geometry);
} catch (WktException e) {
return null;
}
} | [
"public",
"String",
"toWkt",
"(",
"Geometry",
"geometry",
")",
"{",
"try",
"{",
"return",
"WktService",
".",
"toWkt",
"(",
"geometry",
")",
";",
"}",
"catch",
"(",
"WktException",
"e",
")",
"{",
"return",
"null",
";",
"}",
"}"
] | Format the given geometry object to Well Known Text representation.
@param geometry
The geometry to format.
@return Get WKT representation of the given geometry, or null in case something went wrong. | [
"Format",
"the",
"given",
"geometry",
"object",
"to",
"Well",
"Known",
"Text",
"representation",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/spatial/GeometryServiceImpl.java#L55-L61 |
147,431 | geomajas/geomajas-project-client-gwt | plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/spatial/GeometryServiceImpl.java | GeometryServiceImpl.toGeometry | public Geometry toGeometry(String wkt) {
try {
return WktService.toGeometry(wkt);
} catch (WktException e) {
return null;
}
} | java | public Geometry toGeometry(String wkt) {
try {
return WktService.toGeometry(wkt);
} catch (WktException e) {
return null;
}
} | [
"public",
"Geometry",
"toGeometry",
"(",
"String",
"wkt",
")",
"{",
"try",
"{",
"return",
"WktService",
".",
"toGeometry",
"(",
"wkt",
")",
";",
"}",
"catch",
"(",
"WktException",
"e",
")",
"{",
"return",
"null",
";",
"}",
"}"
] | Parse the given Well Known Text string into a geometry.
@param wkt
The WKT text.
@return The resulting geometry, or null in case something went wrong. | [
"Parse",
"the",
"given",
"Well",
"Known",
"Text",
"string",
"into",
"a",
"geometry",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/spatial/GeometryServiceImpl.java#L70-L76 |
147,432 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/AttributeListGrid.java | AttributeListGrid.saveOrUpdateValue | public boolean saveOrUpdateValue(AssociationValue associationValue) {
if (idByValue.containsKey(associationValue)) {
updateValue(associationValue);
setData(getRecords());
return true;
} else {
// Calculate id
Object idObject = associationValue.getId().getValue();
String id;
if (idObject != null... | java | public boolean saveOrUpdateValue(AssociationValue associationValue) {
if (idByValue.containsKey(associationValue)) {
updateValue(associationValue);
setData(getRecords());
return true;
} else {
// Calculate id
Object idObject = associationValue.getId().getValue();
String id;
if (idObject != null... | [
"public",
"boolean",
"saveOrUpdateValue",
"(",
"AssociationValue",
"associationValue",
")",
"{",
"if",
"(",
"idByValue",
".",
"containsKey",
"(",
"associationValue",
")",
")",
"{",
"updateValue",
"(",
"associationValue",
")",
";",
"setData",
"(",
"getRecords",
"("... | Adds a new value to the list.
@param associationValue The value to be added to the list.
@return Returns true in case of update, and false if the value is already in the list or the value is null | [
"Adds",
"a",
"new",
"value",
"to",
"the",
"list",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/AttributeListGrid.java#L113-L136 |
147,433 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/AttributeListGrid.java | AttributeListGrid.deleteValue | public boolean deleteValue(AssociationValue associationValue) {
if (idByValue.containsKey(associationValue)) {
for (ListGridRecord record : getRecords()) {
if (record.getAttributeAsObject(VALUE_HOLDER_RECORD_ATTRIBUTE) == associationValue) {
removeData(record);
idByValue.remove(associationValue);
... | java | public boolean deleteValue(AssociationValue associationValue) {
if (idByValue.containsKey(associationValue)) {
for (ListGridRecord record : getRecords()) {
if (record.getAttributeAsObject(VALUE_HOLDER_RECORD_ATTRIBUTE) == associationValue) {
removeData(record);
idByValue.remove(associationValue);
... | [
"public",
"boolean",
"deleteValue",
"(",
"AssociationValue",
"associationValue",
")",
"{",
"if",
"(",
"idByValue",
".",
"containsKey",
"(",
"associationValue",
")",
")",
"{",
"for",
"(",
"ListGridRecord",
"record",
":",
"getRecords",
"(",
")",
")",
"{",
"if",
... | Removes a value to the list.
@param associationValue The value to be removed from the list.
@return Returns true in case of successful removal. | [
"Removes",
"a",
"value",
"to",
"the",
"list",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/AttributeListGrid.java#L144-L155 |
147,434 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/AttributeListGrid.java | AttributeListGrid.updateFields | private void updateFields() {
if (featureInfo != null) {
// Create a header field for each attribute definition:
List<ListGridField> fields = new ArrayList<ListGridField>();
if (idInTable) {
ListGridField gridField = new ListGridField(ID_NAME, "ID");
gridField.setAlign(Alignment.LEFT);
gridField.... | java | private void updateFields() {
if (featureInfo != null) {
// Create a header field for each attribute definition:
List<ListGridField> fields = new ArrayList<ListGridField>();
if (idInTable) {
ListGridField gridField = new ListGridField(ID_NAME, "ID");
gridField.setAlign(Alignment.LEFT);
gridField.... | [
"private",
"void",
"updateFields",
"(",
")",
"{",
"if",
"(",
"featureInfo",
"!=",
"null",
")",
"{",
"// Create a header field for each attribute definition:",
"List",
"<",
"ListGridField",
">",
"fields",
"=",
"new",
"ArrayList",
"<",
"ListGridField",
">",
"(",
")"... | Actually create or update the fields. | [
"Actually",
"create",
"or",
"update",
"the",
"fields",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/AttributeListGrid.java#L308-L327 |
147,435 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/map/workflow/activity/ValidationActivity.java | ValidationActivity.execute | public WorkflowContext execute(WorkflowContext context) throws WorkflowException {
if (context instanceof MapModelWorkflowContext) {
MapModelWorkflowContext mmContext = (MapModelWorkflowContext) context;
FeatureTransaction ft = mmContext.getFeatureTransaction();
if (ft.getNewFeatures() != null) {
for (Fe... | java | public WorkflowContext execute(WorkflowContext context) throws WorkflowException {
if (context instanceof MapModelWorkflowContext) {
MapModelWorkflowContext mmContext = (MapModelWorkflowContext) context;
FeatureTransaction ft = mmContext.getFeatureTransaction();
if (ft.getNewFeatures() != null) {
for (Fe... | [
"public",
"WorkflowContext",
"execute",
"(",
"WorkflowContext",
"context",
")",
"throws",
"WorkflowException",
"{",
"if",
"(",
"context",
"instanceof",
"MapModelWorkflowContext",
")",
"{",
"MapModelWorkflowContext",
"mmContext",
"=",
"(",
"MapModelWorkflowContext",
")",
... | Check for geometry validity.
@param context
Expects a {@link MapModelWorkflowContext}. | [
"Check",
"for",
"geometry",
"validity",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/map/workflow/activity/ValidationActivity.java#L39-L52 |
147,436 | seedstack/i18n-addon | rest/src/main/java/org/seedstack/i18n/rest/internal/translation/TranslationsResource.java | TranslationsResource.getTranslations | @GET
@Produces(MediaType.APPLICATION_JSON)
@RequiresPermissions(I18nPermissions.TRANSLATION_READ)
public Response getTranslations(@QueryParam(PAGE_INDEX) Long pageIndex, @QueryParam(PAGE_SIZE) Integer pageSize,
@QueryParam(IS_MISSING) Boolean isMissing, @QueryParam(IS_APPROX) Boolean isApprox,
... | java | @GET
@Produces(MediaType.APPLICATION_JSON)
@RequiresPermissions(I18nPermissions.TRANSLATION_READ)
public Response getTranslations(@QueryParam(PAGE_INDEX) Long pageIndex, @QueryParam(PAGE_SIZE) Integer pageSize,
@QueryParam(IS_MISSING) Boolean isMissing, @QueryParam(IS_APPROX) Boolean isApprox,
... | [
"@",
"GET",
"@",
"Produces",
"(",
"MediaType",
".",
"APPLICATION_JSON",
")",
"@",
"RequiresPermissions",
"(",
"I18nPermissions",
".",
"TRANSLATION_READ",
")",
"public",
"Response",
"getTranslations",
"(",
"@",
"QueryParam",
"(",
"PAGE_INDEX",
")",
"Long",
"pageInd... | Returns filtered translation with pagination.
@param pageIndex page index
@param pageSize page size
@param isMissing filter indicator on missing translation
@param isApprox filter indicator on approximate translation
@param isOutdated filter indicator on outdated translation
@param searchName filter on key name
... | [
"Returns",
"filtered",
"translation",
"with",
"pagination",
"."
] | 1e65101d8554623f09bda2497b0151fd10a16615 | https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/rest/src/main/java/org/seedstack/i18n/rest/internal/translation/TranslationsResource.java#L72-L92 |
147,437 | seedstack/i18n-addon | rest/src/main/java/org/seedstack/i18n/rest/internal/translation/TranslationsResource.java | TranslationsResource.getTranslation | @GET
@Path("/{key}")
@Produces(MediaType.APPLICATION_JSON)
@RequiresPermissions(I18nPermissions.TRANSLATION_READ)
public TranslationRepresentation getTranslation(@PathParam("key") String key) {
TranslationRepresentation translation = translationFinder.findTranslation(locale, key);
if (tr... | java | @GET
@Path("/{key}")
@Produces(MediaType.APPLICATION_JSON)
@RequiresPermissions(I18nPermissions.TRANSLATION_READ)
public TranslationRepresentation getTranslation(@PathParam("key") String key) {
TranslationRepresentation translation = translationFinder.findTranslation(locale, key);
if (tr... | [
"@",
"GET",
"@",
"Path",
"(",
"\"/{key}\"",
")",
"@",
"Produces",
"(",
"MediaType",
".",
"APPLICATION_JSON",
")",
"@",
"RequiresPermissions",
"(",
"I18nPermissions",
".",
"TRANSLATION_READ",
")",
"public",
"TranslationRepresentation",
"getTranslation",
"(",
"@",
"... | Returns a translation for specified key and locale.
@param key key name
@return status code 200 with a translation or 404 if not found | [
"Returns",
"a",
"translation",
"for",
"specified",
"key",
"and",
"locale",
"."
] | 1e65101d8554623f09bda2497b0151fd10a16615 | https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/rest/src/main/java/org/seedstack/i18n/rest/internal/translation/TranslationsResource.java#L100-L110 |
147,438 | seedstack/i18n-addon | rest/src/main/java/org/seedstack/i18n/rest/internal/translation/TranslationsResource.java | TranslationsResource.updateTranslation | @PUT
@Path("/{key}")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@RequiresPermissions(I18nPermissions.TRANSLATION_WRITE)
public Response updateTranslation(@PathParam("key") String keyName, TranslationRepresentation representation) {
WebAssertions.assertNotNull... | java | @PUT
@Path("/{key}")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@RequiresPermissions(I18nPermissions.TRANSLATION_WRITE)
public Response updateTranslation(@PathParam("key") String keyName, TranslationRepresentation representation) {
WebAssertions.assertNotNull... | [
"@",
"PUT",
"@",
"Path",
"(",
"\"/{key}\"",
")",
"@",
"Consumes",
"(",
"MediaType",
".",
"APPLICATION_JSON",
")",
"@",
"Produces",
"(",
"MediaType",
".",
"APPLICATION_JSON",
")",
"@",
"RequiresPermissions",
"(",
"I18nPermissions",
".",
"TRANSLATION_WRITE",
")",
... | Update translation for the given locale.
@param keyName key name
@param representation translation representation
@return status code 204 (no content) or 404 (not found) if key or target translation is null. | [
"Update",
"translation",
"for",
"the",
"given",
"locale",
"."
] | 1e65101d8554623f09bda2497b0151fd10a16615 | https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/rest/src/main/java/org/seedstack/i18n/rest/internal/translation/TranslationsResource.java#L119-L134 |
147,439 | geomajas/geomajas-project-client-gwt | plugin/widget-featureinfo/featureinfo-gwt/src/main/java/org/geomajas/widget/featureinfo/client/widget/MultiLayerFeaturesList.java | MultiLayerFeaturesList.setFeatures | public void setFeatures(Map<String, List<org.geomajas.layer.feature.Feature>> featureMap) {
MapModel mapModel = mapWidget.getMapModel();
for (Entry<String, List<org.geomajas.layer.feature.Feature>> clientLayerId : featureMap.entrySet()) {
Layer<?> layer = mapModel.getLayer(clientLayerId.getKey());
if (null !... | java | public void setFeatures(Map<String, List<org.geomajas.layer.feature.Feature>> featureMap) {
MapModel mapModel = mapWidget.getMapModel();
for (Entry<String, List<org.geomajas.layer.feature.Feature>> clientLayerId : featureMap.entrySet()) {
Layer<?> layer = mapModel.getLayer(clientLayerId.getKey());
if (null !... | [
"public",
"void",
"setFeatures",
"(",
"Map",
"<",
"String",
",",
"List",
"<",
"org",
".",
"geomajas",
".",
"layer",
".",
"feature",
".",
"Feature",
">",
">",
"featureMap",
")",
"{",
"MapModel",
"mapModel",
"=",
"mapWidget",
".",
"getMapModel",
"(",
")",
... | Feed a map of features to the widget, so it can be built.
@param featureMap feature map | [
"Feed",
"a",
"map",
"of",
"features",
"to",
"the",
"widget",
"so",
"it",
"can",
"be",
"built",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-featureinfo/featureinfo-gwt/src/main/java/org/geomajas/widget/featureinfo/client/widget/MultiLayerFeaturesList.java#L100-L112 |
147,440 | geomajas/geomajas-project-client-gwt | plugin/javascript-api/javascript-api/src/main/java/org/geomajas/plugin/jsapi/client/spatial/Geometry.java | Geometry.constructor | @ExportConstructor
public static org.geomajas.geometry.Geometry constructor(String geometryType, int srid, int precision) {
return new org.geomajas.geometry.Geometry(geometryType, srid, precision);
} | java | @ExportConstructor
public static org.geomajas.geometry.Geometry constructor(String geometryType, int srid, int precision) {
return new org.geomajas.geometry.Geometry(geometryType, srid, precision);
} | [
"@",
"ExportConstructor",
"public",
"static",
"org",
".",
"geomajas",
".",
"geometry",
".",
"Geometry",
"constructor",
"(",
"String",
"geometryType",
",",
"int",
"srid",
",",
"int",
"precision",
")",
"{",
"return",
"new",
"org",
".",
"geomajas",
".",
"geomet... | Create geometry.
@param geometryType
geometry type
@param srid
srid
@param precision
precision | [
"Create",
"geometry",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/javascript-api/javascript-api/src/main/java/org/geomajas/plugin/jsapi/client/spatial/Geometry.java#L42-L45 |
147,441 | seedstack/i18n-addon | rest/src/it/java/org/seedstack/i18n/shared/AbstractI18nRestIT.java | AbstractI18nRestIT.httpGet | protected Response httpGet(String path, int statusCode) {
return httpRequest(statusCode, null).get(baseURL + PATH_PREFIX + path);
} | java | protected Response httpGet(String path, int statusCode) {
return httpRequest(statusCode, null).get(baseURL + PATH_PREFIX + path);
} | [
"protected",
"Response",
"httpGet",
"(",
"String",
"path",
",",
"int",
"statusCode",
")",
"{",
"return",
"httpRequest",
"(",
"statusCode",
",",
"null",
")",
".",
"get",
"(",
"baseURL",
"+",
"PATH_PREFIX",
"+",
"path",
")",
";",
"}"
] | Gets the resource at the path and expect the given status code.
@param path the resource URI
@return the http response | [
"Gets",
"the",
"resource",
"at",
"the",
"path",
"and",
"expect",
"the",
"given",
"status",
"code",
"."
] | 1e65101d8554623f09bda2497b0151fd10a16615 | https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/rest/src/it/java/org/seedstack/i18n/shared/AbstractI18nRestIT.java#L59-L61 |
147,442 | seedstack/i18n-addon | rest/src/it/java/org/seedstack/i18n/shared/AbstractI18nRestIT.java | AbstractI18nRestIT.httpPost | protected Response httpPost(String path, String body, int status) {
return httpRequest(status, null).body(body).post(baseURL + PATH_PREFIX + path);
} | java | protected Response httpPost(String path, String body, int status) {
return httpRequest(status, null).body(body).post(baseURL + PATH_PREFIX + path);
} | [
"protected",
"Response",
"httpPost",
"(",
"String",
"path",
",",
"String",
"body",
",",
"int",
"status",
")",
"{",
"return",
"httpRequest",
"(",
"status",
",",
"null",
")",
".",
"body",
"(",
"body",
")",
".",
"post",
"(",
"baseURL",
"+",
"PATH_PREFIX",
... | Posts the body to the given path and expect a 200 status code.
@param path the resource URI
@param body the resource representation
@return the http response | [
"Posts",
"the",
"body",
"to",
"the",
"given",
"path",
"and",
"expect",
"a",
"200",
"status",
"code",
"."
] | 1e65101d8554623f09bda2497b0151fd10a16615 | https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/rest/src/it/java/org/seedstack/i18n/shared/AbstractI18nRestIT.java#L70-L72 |
147,443 | seedstack/i18n-addon | rest/src/it/java/org/seedstack/i18n/shared/AbstractI18nRestIT.java | AbstractI18nRestIT.httpPostCSV | protected Response httpPostCSV(String path, String csvBody, int status) {
MultiPartSpecBuilder multipart = new MultiPartSpecBuilder(csvBody.getBytes());
multipart.mimeType("multipart/form-data");
multipart.fileName("file.csv");
return httpRequest(status, "multipart/form-data")
... | java | protected Response httpPostCSV(String path, String csvBody, int status) {
MultiPartSpecBuilder multipart = new MultiPartSpecBuilder(csvBody.getBytes());
multipart.mimeType("multipart/form-data");
multipart.fileName("file.csv");
return httpRequest(status, "multipart/form-data")
... | [
"protected",
"Response",
"httpPostCSV",
"(",
"String",
"path",
",",
"String",
"csvBody",
",",
"int",
"status",
")",
"{",
"MultiPartSpecBuilder",
"multipart",
"=",
"new",
"MultiPartSpecBuilder",
"(",
"csvBody",
".",
"getBytes",
"(",
")",
")",
";",
"multipart",
... | Posts the given CSV as multipart form data to the given path and expect a 200 status code.
@param path the resource URI
@param csvBody the resource representation
@return the http response | [
"Posts",
"the",
"given",
"CSV",
"as",
"multipart",
"form",
"data",
"to",
"the",
"given",
"path",
"and",
"expect",
"a",
"200",
"status",
"code",
"."
] | 1e65101d8554623f09bda2497b0151fd10a16615 | https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/rest/src/it/java/org/seedstack/i18n/shared/AbstractI18nRestIT.java#L81-L89 |
147,444 | seedstack/i18n-addon | rest/src/it/java/org/seedstack/i18n/shared/AbstractI18nRestIT.java | AbstractI18nRestIT.httpDelete | protected Response httpDelete(String path, int status) {
return httpRequest(status, null).delete(baseURL + PATH_PREFIX + path);
} | java | protected Response httpDelete(String path, int status) {
return httpRequest(status, null).delete(baseURL + PATH_PREFIX + path);
} | [
"protected",
"Response",
"httpDelete",
"(",
"String",
"path",
",",
"int",
"status",
")",
"{",
"return",
"httpRequest",
"(",
"status",
",",
"null",
")",
".",
"delete",
"(",
"baseURL",
"+",
"PATH_PREFIX",
"+",
"path",
")",
";",
"}"
] | Deletes the resource at the given path.
@param path the resource URI
@return the http response | [
"Deletes",
"the",
"resource",
"at",
"the",
"given",
"path",
"."
] | 1e65101d8554623f09bda2497b0151fd10a16615 | https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/rest/src/it/java/org/seedstack/i18n/shared/AbstractI18nRestIT.java#L119-L121 |
147,445 | geomajas/geomajas-project-client-gwt | plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/map/ViewPortImpl.java | ViewPortImpl.getMaximumBounds | public Bbox getMaximumBounds() {
org.geomajas.gwt.client.spatial.Bbox box = mapView.getMaxBounds();
return new Bbox(box.getX(), box.getY(), box.getWidth(), box.getHeight());
} | java | public Bbox getMaximumBounds() {
org.geomajas.gwt.client.spatial.Bbox box = mapView.getMaxBounds();
return new Bbox(box.getX(), box.getY(), box.getWidth(), box.getHeight());
} | [
"public",
"Bbox",
"getMaximumBounds",
"(",
")",
"{",
"org",
".",
"geomajas",
".",
"gwt",
".",
"client",
".",
"spatial",
".",
"Bbox",
"box",
"=",
"mapView",
".",
"getMaxBounds",
"(",
")",
";",
"return",
"new",
"Bbox",
"(",
"box",
".",
"getX",
"(",
")"... | Get the maximum zooming extent that is allowed on this view port. These bounds are determined by the map
configuration.
@return The maximum zooming extent that is allowed on this view port. | [
"Get",
"the",
"maximum",
"zooming",
"extent",
"that",
"is",
"allowed",
"on",
"this",
"view",
"port",
".",
"These",
"bounds",
"are",
"determined",
"by",
"the",
"map",
"configuration",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/map/ViewPortImpl.java#L128-L131 |
147,446 | geomajas/geomajas-project-client-gwt | plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/map/ViewPortImpl.java | ViewPortImpl.transform | public Coordinate transform(Coordinate coordinate, String from, String to) {
if (from.equalsIgnoreCase(to)) {
return coordinate;
}
org.geomajas.geometry.Coordinate transformed;
if (SCREEN.equalsIgnoreCase(from) && WORLD.equalsIgnoreCase(to)) {
transformed = mapView.getWorldViewTransformer().viewToWorld(c... | java | public Coordinate transform(Coordinate coordinate, String from, String to) {
if (from.equalsIgnoreCase(to)) {
return coordinate;
}
org.geomajas.geometry.Coordinate transformed;
if (SCREEN.equalsIgnoreCase(from) && WORLD.equalsIgnoreCase(to)) {
transformed = mapView.getWorldViewTransformer().viewToWorld(c... | [
"public",
"Coordinate",
"transform",
"(",
"Coordinate",
"coordinate",
",",
"String",
"from",
",",
"String",
"to",
")",
"{",
"if",
"(",
"from",
".",
"equalsIgnoreCase",
"(",
"to",
")",
")",
"{",
"return",
"coordinate",
";",
"}",
"org",
".",
"geomajas",
".... | Transform the given coordinate from a certain rendering space to another.
@param coordinate
The coordinate to transform. The X and Y ordinates are expected to be expressed in the 'from'
rendering space.
@param from
The rendering space that expresses the X and Y ordinates of the given coordinate. Options are:
<ul>
<li>... | [
"Transform",
"the",
"given",
"coordinate",
"from",
"a",
"certain",
"rendering",
"space",
"to",
"another",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/map/ViewPortImpl.java#L168-L182 |
147,447 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/painter/ImagePainter.java | ImagePainter.paint | public void paint(Paintable paintable, Object group, MapContext context) {
Image image = (Image) paintable;
context.getVectorContext().drawImage(group, image.getId(), image.getHref(), image.getBounds(),
image.getStyle());
} | java | public void paint(Paintable paintable, Object group, MapContext context) {
Image image = (Image) paintable;
context.getVectorContext().drawImage(group, image.getId(), image.getHref(), image.getBounds(),
image.getStyle());
} | [
"public",
"void",
"paint",
"(",
"Paintable",
"paintable",
",",
"Object",
"group",
",",
"MapContext",
"context",
")",
"{",
"Image",
"image",
"=",
"(",
"Image",
")",
"paintable",
";",
"context",
".",
"getVectorContext",
"(",
")",
".",
"drawImage",
"(",
"grou... | The actual painting function. Draws the images with the object's id.
@param paintable
A {@link org.geomajas.gwt.client.gfx.paintable.Image} object.
@param group
The group where the object resides in (optional).
@param context
A MapContext object, responsible for actual drawing. | [
"The",
"actual",
"painting",
"function",
".",
"Draws",
"the",
"images",
"with",
"the",
"object",
"s",
"id",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/painter/ImagePainter.java#L48-L52 |
147,448 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/spatial/snapping/ClosestPointAlgorithm.java | ClosestPointAlgorithm.getCoordinates | private List<Coordinate> getCoordinates(List<Geometry> geometries) {
List<Coordinate> coordinates = new ArrayList<Coordinate>();
for (Geometry geometry : geometries) {
Coordinate[] geometryCoordinates = geometry.getCoordinates();
for (int i = 0; i < geometryCoordinates.length; i++) {
coordinates.add(geome... | java | private List<Coordinate> getCoordinates(List<Geometry> geometries) {
List<Coordinate> coordinates = new ArrayList<Coordinate>();
for (Geometry geometry : geometries) {
Coordinate[] geometryCoordinates = geometry.getCoordinates();
for (int i = 0; i < geometryCoordinates.length; i++) {
coordinates.add(geome... | [
"private",
"List",
"<",
"Coordinate",
">",
"getCoordinates",
"(",
"List",
"<",
"Geometry",
">",
"geometries",
")",
"{",
"List",
"<",
"Coordinate",
">",
"coordinates",
"=",
"new",
"ArrayList",
"<",
"Coordinate",
">",
"(",
")",
";",
"for",
"(",
"Geometry",
... | Get a single list of coordinates from a list of geometries. | [
"Get",
"a",
"single",
"list",
"of",
"coordinates",
"from",
"a",
"list",
"of",
"geometries",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/snapping/ClosestPointAlgorithm.java#L106-L115 |
147,449 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/spatial/snapping/ClosestPointAlgorithm.java | ClosestPointAlgorithm.getPossibleCoordinates | private List<Coordinate> getPossibleCoordinates(Coordinate coordinate) {
int xMin = Collections.binarySearch(sortedX, new Coordinate(coordinate.getX() - ruleDistance, 0),
new XComparator());
int xMax = Collections.binarySearch(sortedX, new Coordinate(coordinate.getX() + ruleDistance, 0),
new XComparator());... | java | private List<Coordinate> getPossibleCoordinates(Coordinate coordinate) {
int xMin = Collections.binarySearch(sortedX, new Coordinate(coordinate.getX() - ruleDistance, 0),
new XComparator());
int xMax = Collections.binarySearch(sortedX, new Coordinate(coordinate.getX() + ruleDistance, 0),
new XComparator());... | [
"private",
"List",
"<",
"Coordinate",
">",
"getPossibleCoordinates",
"(",
"Coordinate",
"coordinate",
")",
"{",
"int",
"xMin",
"=",
"Collections",
".",
"binarySearch",
"(",
"sortedX",
",",
"new",
"Coordinate",
"(",
"coordinate",
".",
"getX",
"(",
")",
"-",
"... | Return a possible list of coordinates that are within range of the given coordinate. This function is very fast
as it uses binary search, and it returns a small subset of coordinates. The perfect set to start calculating
from. | [
"Return",
"a",
"possible",
"list",
"of",
"coordinates",
"that",
"are",
"within",
"range",
"of",
"the",
"given",
"coordinate",
".",
"This",
"function",
"is",
"very",
"fast",
"as",
"it",
"uses",
"binary",
"search",
"and",
"it",
"returns",
"a",
"small",
"subs... | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/snapping/ClosestPointAlgorithm.java#L140-L171 |
147,450 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/spatial/snapping/NearestAlgorithm.java | NearestAlgorithm.getCoordinateArrays | private List<Coordinate[]> getCoordinateArrays(List<Geometry> geometries) {
List<Coordinate[]> res = new ArrayList<Coordinate[]>();
for (Geometry geometry : geometries) {
res.add(geometry.getCoordinates());
}
return res;
} | java | private List<Coordinate[]> getCoordinateArrays(List<Geometry> geometries) {
List<Coordinate[]> res = new ArrayList<Coordinate[]>();
for (Geometry geometry : geometries) {
res.add(geometry.getCoordinates());
}
return res;
} | [
"private",
"List",
"<",
"Coordinate",
"[",
"]",
">",
"getCoordinateArrays",
"(",
"List",
"<",
"Geometry",
">",
"geometries",
")",
"{",
"List",
"<",
"Coordinate",
"[",
"]",
">",
"res",
"=",
"new",
"ArrayList",
"<",
"Coordinate",
"[",
"]",
">",
"(",
")",... | Transform the list of geometries into a list of coordinate arrays. | [
"Transform",
"the",
"list",
"of",
"geometries",
"into",
"a",
"list",
"of",
"coordinate",
"arrays",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/snapping/NearestAlgorithm.java#L95-L101 |
147,451 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/controller/SingleSelectionController.java | SingleSelectionController.onUp | public void onUp(HumanInputEvent<?> event) {
if (!isRightMouseButton(event)) {
ToggleSelectionAction action = new ToggleSelectionAction(mapWidget, pixelTolerance);
action.setPriorityToSelectedLayer(priorityToSelectedLayer);
action.toggleSingle(getLocation(event, RenderSpace.SCREEN));
}
} | java | public void onUp(HumanInputEvent<?> event) {
if (!isRightMouseButton(event)) {
ToggleSelectionAction action = new ToggleSelectionAction(mapWidget, pixelTolerance);
action.setPriorityToSelectedLayer(priorityToSelectedLayer);
action.toggleSingle(getLocation(event, RenderSpace.SCREEN));
}
} | [
"public",
"void",
"onUp",
"(",
"HumanInputEvent",
"<",
"?",
">",
"event",
")",
"{",
"if",
"(",
"!",
"isRightMouseButton",
"(",
"event",
")",
")",
"{",
"ToggleSelectionAction",
"action",
"=",
"new",
"ToggleSelectionAction",
"(",
"mapWidget",
",",
"pixelToleranc... | Toggle selection at the event location.
@param event
event | [
"Toggle",
"selection",
"at",
"the",
"event",
"location",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/controller/SingleSelectionController.java#L66-L72 |
147,452 | seedstack/i18n-addon | rest/src/main/java/org/seedstack/i18n/rest/internal/messages/MessageResource.java | MessageResource.getTranslations | @GET
@Path("/{locale}")
@Produces(MediaType.APPLICATION_JSON)
public Response getTranslations(@PathParam("locale") String locale) {
Map<String, String> messages = getMessages(locale);
if (!messages.isEmpty()) {
return Response.ok(messages).build();
}
return Response.ok("{}").bui... | java | @GET
@Path("/{locale}")
@Produces(MediaType.APPLICATION_JSON)
public Response getTranslations(@PathParam("locale") String locale) {
Map<String, String> messages = getMessages(locale);
if (!messages.isEmpty()) {
return Response.ok(messages).build();
}
return Response.ok("{}").bui... | [
"@",
"GET",
"@",
"Path",
"(",
"\"/{locale}\"",
")",
"@",
"Produces",
"(",
"MediaType",
".",
"APPLICATION_JSON",
")",
"public",
"Response",
"getTranslations",
"(",
"@",
"PathParam",
"(",
"\"locale\"",
")",
"String",
"locale",
")",
"{",
"Map",
"<",
"String",
... | Returns a map of key, translation for the given locale.
@param locale locale identifier
@return status code 200 with all application messages or "{}" if no message | [
"Returns",
"a",
"map",
"of",
"key",
"translation",
"for",
"the",
"given",
"locale",
"."
] | 1e65101d8554623f09bda2497b0151fd10a16615 | https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/rest/src/main/java/org/seedstack/i18n/rest/internal/messages/MessageResource.java#L44-L53 |
147,453 | seedstack/i18n-addon | core/src/main/java/org/seedstack/i18n/internal/domain/model/key/Key.java | Key.getTranslation | public Translation getTranslation(String locale) {
LocaleCodeSpecification.assertCode(locale);
return this.getTranslations().get(locale);
} | java | public Translation getTranslation(String locale) {
LocaleCodeSpecification.assertCode(locale);
return this.getTranslations().get(locale);
} | [
"public",
"Translation",
"getTranslation",
"(",
"String",
"locale",
")",
"{",
"LocaleCodeSpecification",
".",
"assertCode",
"(",
"locale",
")",
";",
"return",
"this",
".",
"getTranslations",
"(",
")",
".",
"get",
"(",
"locale",
")",
";",
"}"
] | Returns the translation corresponding to the given locale code.
@param locale locale code
@return the translation
@throws java.lang.IllegalArgumentException if the locale is null or empty
or contains other characters than letters and "-". | [
"Returns",
"the",
"translation",
"corresponding",
"to",
"the",
"given",
"locale",
"code",
"."
] | 1e65101d8554623f09bda2497b0151fd10a16615 | https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/core/src/main/java/org/seedstack/i18n/internal/domain/model/key/Key.java#L116-L120 |
147,454 | seedstack/i18n-addon | core/src/main/java/org/seedstack/i18n/internal/domain/model/key/Key.java | Key.removeTranslation | public void removeTranslation(String locale) {
LocaleCodeSpecification.assertCode(locale);
Translation translation = getTranslation(locale);
if (translation != null) {
this.translations.remove(translation.getId());
}
} | java | public void removeTranslation(String locale) {
LocaleCodeSpecification.assertCode(locale);
Translation translation = getTranslation(locale);
if (translation != null) {
this.translations.remove(translation.getId());
}
} | [
"public",
"void",
"removeTranslation",
"(",
"String",
"locale",
")",
"{",
"LocaleCodeSpecification",
".",
"assertCode",
"(",
"locale",
")",
";",
"Translation",
"translation",
"=",
"getTranslation",
"(",
"locale",
")",
";",
"if",
"(",
"translation",
"!=",
"null",... | Removes the translation corresponding to the given locale code.
@param locale locale code
@throws java.lang.IllegalArgumentException if the locale is null or empty
or contains other characters than letters and "-". | [
"Removes",
"the",
"translation",
"corresponding",
"to",
"the",
"given",
"locale",
"code",
"."
] | 1e65101d8554623f09bda2497b0151fd10a16615 | https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/core/src/main/java/org/seedstack/i18n/internal/domain/model/key/Key.java#L129-L136 |
147,455 | seedstack/i18n-addon | core/src/main/java/org/seedstack/i18n/internal/domain/model/key/Key.java | Key.checkOutdatedStatus | public void checkOutdatedStatus() {
boolean newStatus = false;
for (Translation translation : translations.values()) {
if (translation.isOutdated()) {
newStatus = true;
break;
}
}
outdated = newStatus;
} | java | public void checkOutdatedStatus() {
boolean newStatus = false;
for (Translation translation : translations.values()) {
if (translation.isOutdated()) {
newStatus = true;
break;
}
}
outdated = newStatus;
} | [
"public",
"void",
"checkOutdatedStatus",
"(",
")",
"{",
"boolean",
"newStatus",
"=",
"false",
";",
"for",
"(",
"Translation",
"translation",
":",
"translations",
".",
"values",
"(",
")",
")",
"{",
"if",
"(",
"translation",
".",
"isOutdated",
"(",
")",
")",... | Checks if the key has outdated translations and then update the outdated status of the key. | [
"Checks",
"if",
"the",
"key",
"has",
"outdated",
"translations",
"and",
"then",
"update",
"the",
"outdated",
"status",
"of",
"the",
"key",
"."
] | 1e65101d8554623f09bda2497b0151fd10a16615 | https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/core/src/main/java/org/seedstack/i18n/internal/domain/model/key/Key.java#L141-L150 |
147,456 | seedstack/i18n-addon | core/src/main/java/org/seedstack/i18n/internal/domain/model/key/Key.java | Key.getTranslations | public Map<String, Translation> getTranslations() {
Map<String, Translation> map = new HashMap<>();
for (Map.Entry<TranslationId, Translation> translationEntry : translations.entrySet()) {
map.put(translationEntry.getKey().getLocale(), translationEntry.getValue());
}
return m... | java | public Map<String, Translation> getTranslations() {
Map<String, Translation> map = new HashMap<>();
for (Map.Entry<TranslationId, Translation> translationEntry : translations.entrySet()) {
map.put(translationEntry.getKey().getLocale(), translationEntry.getValue());
}
return m... | [
"public",
"Map",
"<",
"String",
",",
"Translation",
">",
"getTranslations",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"Translation",
">",
"map",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"TranslationId",
",",
"... | Returns the translation set.
@return the translations | [
"Returns",
"the",
"translation",
"set",
"."
] | 1e65101d8554623f09bda2497b0151fd10a16615 | https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/core/src/main/java/org/seedstack/i18n/internal/domain/model/key/Key.java#L195-L201 |
147,457 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java | Bbox.toDtoBbox | public org.geomajas.geometry.Bbox toDtoBbox() {
return new org.geomajas.geometry.Bbox(getX(), getY(), getWidth(), getHeight());
} | java | public org.geomajas.geometry.Bbox toDtoBbox() {
return new org.geomajas.geometry.Bbox(getX(), getY(), getWidth(), getHeight());
} | [
"public",
"org",
".",
"geomajas",
".",
"geometry",
".",
"Bbox",
"toDtoBbox",
"(",
")",
"{",
"return",
"new",
"org",
".",
"geomajas",
".",
"geometry",
".",
"Bbox",
"(",
"getX",
"(",
")",
",",
"getY",
"(",
")",
",",
"getWidth",
"(",
")",
",",
"getHei... | Convert the GWT bounding box to a DTO bounding box.
@return the bbox | [
"Convert",
"the",
"GWT",
"bounding",
"box",
"to",
"a",
"DTO",
"bounding",
"box",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java#L109-L111 |
147,458 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java | Bbox.getCoordinates | public Coordinate[] getCoordinates() {
Coordinate[] result = new Coordinate[5];
result[0] = new Coordinate(x, y);
result[1] = new Coordinate(x + width, y);
result[2] = new Coordinate(x + width, y + height);
result[3] = new Coordinate(x, y + height);
result[4] = new Coordinate(x, y);
return result;
} | java | public Coordinate[] getCoordinates() {
Coordinate[] result = new Coordinate[5];
result[0] = new Coordinate(x, y);
result[1] = new Coordinate(x + width, y);
result[2] = new Coordinate(x + width, y + height);
result[3] = new Coordinate(x, y + height);
result[4] = new Coordinate(x, y);
return result;
} | [
"public",
"Coordinate",
"[",
"]",
"getCoordinates",
"(",
")",
"{",
"Coordinate",
"[",
"]",
"result",
"=",
"new",
"Coordinate",
"[",
"5",
"]",
";",
"result",
"[",
"0",
"]",
"=",
"new",
"Coordinate",
"(",
"x",
",",
"y",
")",
";",
"result",
"[",
"1",
... | Get the coordinates of the bounding box as an array.
@return Returns 5 coordinates so that the array is closed. This can be useful when using this array to creating a
<code>LinearRing</code>. | [
"Get",
"the",
"coordinates",
"of",
"the",
"bounding",
"box",
"as",
"an",
"array",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java#L162-L171 |
147,459 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java | Bbox.contains | public boolean contains(Bbox other) {
if (other.getX() < this.getX()) {
return false;
}
if (other.getY() < this.getY()) {
return false;
}
if (other.getEndPoint().getX() > this.getEndPoint().getX()) {
return false;
}
if (other.getEndPoint().getY() > this.getEndPoint().getY()) {
return false;
... | java | public boolean contains(Bbox other) {
if (other.getX() < this.getX()) {
return false;
}
if (other.getY() < this.getY()) {
return false;
}
if (other.getEndPoint().getX() > this.getEndPoint().getX()) {
return false;
}
if (other.getEndPoint().getY() > this.getEndPoint().getY()) {
return false;
... | [
"public",
"boolean",
"contains",
"(",
"Bbox",
"other",
")",
"{",
"if",
"(",
"other",
".",
"getX",
"(",
")",
"<",
"this",
".",
"getX",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"other",
".",
"getY",
"(",
")",
"<",
"this",
".",
... | Does this bounding box contain the given bounding box?
@param other
Another Bbox.
@return true if the other is completely surrounded by this one, false otherwise. | [
"Does",
"this",
"bounding",
"box",
"contain",
"the",
"given",
"bounding",
"box?"
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java#L180-L194 |
147,460 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java | Bbox.intersects | public boolean intersects(Bbox other) {
if (other.getX() > this.getEndPoint().getX()) {
return false;
}
if (other.getY() > this.getEndPoint().getY()) {
return false;
}
if (other.getEndPoint().getX() < this.getX()) {
return false;
}
if (other.getEndPoint().getY() < this.getY()) {
return false;
... | java | public boolean intersects(Bbox other) {
if (other.getX() > this.getEndPoint().getX()) {
return false;
}
if (other.getY() > this.getEndPoint().getY()) {
return false;
}
if (other.getEndPoint().getX() < this.getX()) {
return false;
}
if (other.getEndPoint().getY() < this.getY()) {
return false;
... | [
"public",
"boolean",
"intersects",
"(",
"Bbox",
"other",
")",
"{",
"if",
"(",
"other",
".",
"getX",
"(",
")",
">",
"this",
".",
"getEndPoint",
"(",
")",
".",
"getX",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"other",
".",
"getY"... | Does this bounding box intersect the given bounding box?
@param other
Another Bbox.
@return true if the other intersects this one, false otherwise. | [
"Does",
"this",
"bounding",
"box",
"intersect",
"the",
"given",
"bounding",
"box?"
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java#L226-L240 |
147,461 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java | Bbox.intersection | public Bbox intersection(Bbox other) {
if (!this.intersects(other)) {
return null;
} else {
double minx = other.getX() > this.getX() ? other.getX() : this.getX();
double maxx = other.getEndPoint().getX() < this.getEndPoint().getX() ? other.getEndPoint().getX() : this
.getEndPoint().getX();
double m... | java | public Bbox intersection(Bbox other) {
if (!this.intersects(other)) {
return null;
} else {
double minx = other.getX() > this.getX() ? other.getX() : this.getX();
double maxx = other.getEndPoint().getX() < this.getEndPoint().getX() ? other.getEndPoint().getX() : this
.getEndPoint().getX();
double m... | [
"public",
"Bbox",
"intersection",
"(",
"Bbox",
"other",
")",
"{",
"if",
"(",
"!",
"this",
".",
"intersects",
"(",
"other",
")",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"double",
"minx",
"=",
"other",
".",
"getX",
"(",
")",
">",
"this",
... | Computes the intersection of this bounding box with the specified bounding box.
@param other
Another Bbox.
@return bounding box of intersection or null if they do not intersect. | [
"Computes",
"the",
"intersection",
"of",
"this",
"bounding",
"box",
"with",
"the",
"specified",
"bounding",
"box",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java#L249-L261 |
147,462 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java | Bbox.buffer | public Bbox buffer(double range) {
if (range > 0) {
double r2 = range * 2;
return new Bbox(x - range, y - range, width + r2, height + r2);
}
return null;
} | java | public Bbox buffer(double range) {
if (range > 0) {
double r2 = range * 2;
return new Bbox(x - range, y - range, width + r2, height + r2);
}
return null;
} | [
"public",
"Bbox",
"buffer",
"(",
"double",
"range",
")",
"{",
"if",
"(",
"range",
">",
"0",
")",
"{",
"double",
"r2",
"=",
"range",
"*",
"2",
";",
"return",
"new",
"Bbox",
"(",
"x",
"-",
"range",
",",
"y",
"-",
"range",
",",
"width",
"+",
"r2",... | Return a new bounding box that has increased in size by adding a range to this bounding box.
@param range Must be a positive number, otherwise null will be returned.
@return new buffered bounding box | [
"Return",
"a",
"new",
"bounding",
"box",
"that",
"has",
"increased",
"in",
"size",
"by",
"adding",
"a",
"range",
"to",
"this",
"bounding",
"box",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java#L292-L298 |
147,463 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java | Bbox.transform | public Bbox transform(Matrix t) {
Coordinate c1 = transform(t, new Coordinate(x, y));
Coordinate c2 = transform(t, new Coordinate(x + width, y + height));
Coordinate origin = new Coordinate(Math.min(c1.getX(), c2.getX()), Math.min(c1.getY(), c2.getY()));
Coordinate endPoint = new Coordinate(Math.max(c1.getX(), ... | java | public Bbox transform(Matrix t) {
Coordinate c1 = transform(t, new Coordinate(x, y));
Coordinate c2 = transform(t, new Coordinate(x + width, y + height));
Coordinate origin = new Coordinate(Math.min(c1.getX(), c2.getX()), Math.min(c1.getY(), c2.getY()));
Coordinate endPoint = new Coordinate(Math.max(c1.getX(), ... | [
"public",
"Bbox",
"transform",
"(",
"Matrix",
"t",
")",
"{",
"Coordinate",
"c1",
"=",
"transform",
"(",
"t",
",",
"new",
"Coordinate",
"(",
"x",
",",
"y",
")",
")",
";",
"Coordinate",
"c2",
"=",
"transform",
"(",
"t",
",",
"new",
"Coordinate",
"(",
... | Create a new bounds by transforming this bounds with the specified tranformation matrix.
@param t
the transformation matrix
@return the transformed bounds | [
"Create",
"a",
"new",
"bounds",
"by",
"transforming",
"this",
"bounds",
"with",
"the",
"specified",
"tranformation",
"matrix",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java#L365-L371 |
147,464 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java | Bbox.setCenterPoint | public void setCenterPoint(Coordinate coordinate) {
this.x = coordinate.getX() - 0.5 * this.width;
this.y = coordinate.getY() - 0.5 * this.height;
} | java | public void setCenterPoint(Coordinate coordinate) {
this.x = coordinate.getX() - 0.5 * this.width;
this.y = coordinate.getY() - 0.5 * this.height;
} | [
"public",
"void",
"setCenterPoint",
"(",
"Coordinate",
"coordinate",
")",
"{",
"this",
".",
"x",
"=",
"coordinate",
".",
"getX",
"(",
")",
"-",
"0.5",
"*",
"this",
".",
"width",
";",
"this",
".",
"y",
"=",
"coordinate",
".",
"getY",
"(",
")",
"-",
... | Moves center to the specified coordinate.
@param coordinate
new center point | [
"Moves",
"center",
"to",
"the",
"specified",
"coordinate",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java#L379-L382 |
147,465 | geomajas/geomajas-project-client-gwt | plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/map/MapImpl.java | MapImpl.getMapController | public MapController getMapController() {
final GraphicsController controller = mapWidget.getController();
MapController mapController = new MapController(this, controller);
mapController.setActivationHandler(new ExportableFunction() {
public void execute() {
controller.onActivate();
}
});
mapContr... | java | public MapController getMapController() {
final GraphicsController controller = mapWidget.getController();
MapController mapController = new MapController(this, controller);
mapController.setActivationHandler(new ExportableFunction() {
public void execute() {
controller.onActivate();
}
});
mapContr... | [
"public",
"MapController",
"getMapController",
"(",
")",
"{",
"final",
"GraphicsController",
"controller",
"=",
"mapWidget",
".",
"getController",
"(",
")",
";",
"MapController",
"mapController",
"=",
"new",
"MapController",
"(",
"this",
",",
"controller",
")",
";... | Return the currently active controller on the map.
@return The currently active controller. | [
"Return",
"the",
"currently",
"active",
"controller",
"on",
"the",
"map",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/map/MapImpl.java#L147-L163 |
147,466 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/PainterVisitor.java | PainterVisitor.registerPainter | public void registerPainter(Painter painter) {
if (painters.containsKey(painter.getPaintableClassName())) {
List<Painter> list = painters.remove(painter.getPaintableClassName());
list.add(painter);
this.painters.put(painter.getPaintableClassName(), list);
} else {
List<Painter> list = new ArrayList<Pain... | java | public void registerPainter(Painter painter) {
if (painters.containsKey(painter.getPaintableClassName())) {
List<Painter> list = painters.remove(painter.getPaintableClassName());
list.add(painter);
this.painters.put(painter.getPaintableClassName(), list);
} else {
List<Painter> list = new ArrayList<Pain... | [
"public",
"void",
"registerPainter",
"(",
"Painter",
"painter",
")",
"{",
"if",
"(",
"painters",
".",
"containsKey",
"(",
"painter",
".",
"getPaintableClassName",
"(",
")",
")",
")",
"{",
"List",
"<",
"Painter",
">",
"list",
"=",
"painters",
".",
"remove",... | Register a new painter to this visitor.
@param painter
The painter itself. | [
"Register",
"a",
"new",
"painter",
"to",
"this",
"visitor",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/PainterVisitor.java#L57-L67 |
147,467 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/PainterVisitor.java | PainterVisitor.unregisterPainter | public void unregisterPainter(Painter painter) {
String className = painter.getPaintableClassName();
if (painters.containsKey(className)) {
List<Painter> list = painters.remove(className);
if (list.size() > 1) {
list.remove(painter);
painters.put(className, list);
}
}
} | java | public void unregisterPainter(Painter painter) {
String className = painter.getPaintableClassName();
if (painters.containsKey(className)) {
List<Painter> list = painters.remove(className);
if (list.size() > 1) {
list.remove(painter);
painters.put(className, list);
}
}
} | [
"public",
"void",
"unregisterPainter",
"(",
"Painter",
"painter",
")",
"{",
"String",
"className",
"=",
"painter",
".",
"getPaintableClassName",
"(",
")",
";",
"if",
"(",
"painters",
".",
"containsKey",
"(",
"className",
")",
")",
"{",
"List",
"<",
"Painter"... | Unregister an existing painter from this visitor.
@param painter
The painter itself. | [
"Unregister",
"an",
"existing",
"painter",
"from",
"this",
"visitor",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/PainterVisitor.java#L75-L84 |
147,468 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/PainterVisitor.java | PainterVisitor.visit | public void visit(Paintable paintable, Object group) {
if (context.isReady()) {
String className = paintable.getClass().getName();
if (painters.containsKey(className)) {
List<Painter> list = painters.get(className);
for (Painter painter : list) {
painter.paint(paintable, group, context);
}
}... | java | public void visit(Paintable paintable, Object group) {
if (context.isReady()) {
String className = paintable.getClass().getName();
if (painters.containsKey(className)) {
List<Painter> list = painters.get(className);
for (Painter painter : list) {
painter.paint(paintable, group, context);
}
}... | [
"public",
"void",
"visit",
"(",
"Paintable",
"paintable",
",",
"Object",
"group",
")",
"{",
"if",
"(",
"context",
".",
"isReady",
"(",
")",
")",
"{",
"String",
"className",
"=",
"paintable",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
";",
"... | The visitors visit function.
@param paintable object to draw
@param group group to draw | [
"The",
"visitors",
"visit",
"function",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/PainterVisitor.java#L92-L102 |
147,469 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/PainterVisitor.java | PainterVisitor.remove | public void remove(Paintable paintable, Object group) {
String className = paintable.getClass().getName();
if (painters.containsKey(className)) {
List<Painter> list = painters.get(className);
for (Painter painter : list) {
painter.deleteShape(paintable, group, context);
}
}
} | java | public void remove(Paintable paintable, Object group) {
String className = paintable.getClass().getName();
if (painters.containsKey(className)) {
List<Painter> list = painters.get(className);
for (Painter painter : list) {
painter.deleteShape(paintable, group, context);
}
}
} | [
"public",
"void",
"remove",
"(",
"Paintable",
"paintable",
",",
"Object",
"group",
")",
"{",
"String",
"className",
"=",
"paintable",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
";",
"if",
"(",
"painters",
".",
"containsKey",
"(",
"className",
"... | Remove a paintable object from the graphics.
@param paintable paintable object
@param group group to draw | [
"Remove",
"a",
"paintable",
"object",
"from",
"the",
"graphics",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/PainterVisitor.java#L110-L118 |
147,470 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/PainterVisitor.java | PainterVisitor.getPaintersForObject | public List<Painter> getPaintersForObject(Paintable paintable) {
String className = paintable.getClass().getName();
if (painters.containsKey(className)) {
return painters.get(className);
}
return null;
} | java | public List<Painter> getPaintersForObject(Paintable paintable) {
String className = paintable.getClass().getName();
if (painters.containsKey(className)) {
return painters.get(className);
}
return null;
} | [
"public",
"List",
"<",
"Painter",
">",
"getPaintersForObject",
"(",
"Paintable",
"paintable",
")",
"{",
"String",
"className",
"=",
"paintable",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
";",
"if",
"(",
"painters",
".",
"containsKey",
"(",
"clas... | Retrieve the full list of painter for a specific type of paintable object.
@param paintable
The type of object to retrieve painter for.
@return Return a list of painter, or null. | [
"Retrieve",
"the",
"full",
"list",
"of",
"painter",
"for",
"a",
"specific",
"type",
"of",
"paintable",
"object",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/PainterVisitor.java#L127-L133 |
147,471 | geomajas/geomajas-project-client-gwt | common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/AttributeUtil.java | AttributeUtil.createEmptyAssociationValue | public static AssociationValue createEmptyAssociationValue(AssociationAttributeInfo attributeInfo) {
AssociationValue value = new AssociationValue();
Map<String, Attribute<?>> attributes = new HashMap<String, Attribute<?>>();
for (AbstractAttributeInfo attrInfo : attributeInfo.getFeature().getAttributes()) {
a... | java | public static AssociationValue createEmptyAssociationValue(AssociationAttributeInfo attributeInfo) {
AssociationValue value = new AssociationValue();
Map<String, Attribute<?>> attributes = new HashMap<String, Attribute<?>>();
for (AbstractAttributeInfo attrInfo : attributeInfo.getFeature().getAttributes()) {
a... | [
"public",
"static",
"AssociationValue",
"createEmptyAssociationValue",
"(",
"AssociationAttributeInfo",
"attributeInfo",
")",
"{",
"AssociationValue",
"value",
"=",
"new",
"AssociationValue",
"(",
")",
";",
"Map",
"<",
"String",
",",
"Attribute",
"<",
"?",
">",
">",... | Creates an empty association value. An empty association value is a value for which the attributes and identifier
are empty.
@param attributeInfo attribute info
@return an empty value | [
"Creates",
"an",
"empty",
"association",
"value",
".",
"An",
"empty",
"association",
"value",
"is",
"a",
"value",
"for",
"which",
"the",
"attributes",
"and",
"identifier",
"are",
"empty",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/AttributeUtil.java#L55-L64 |
147,472 | geomajas/geomajas-project-client-gwt | common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/AttributeUtil.java | AttributeUtil.createEmptyAttribute | public static Attribute<?> createEmptyAttribute(AbstractAttributeInfo attrInfo) {
if (attrInfo instanceof PrimitiveAttributeInfo) {
return createEmptyPrimitiveAttribute((PrimitiveAttributeInfo) attrInfo);
} else if (attrInfo instanceof AssociationAttributeInfo) {
return createEmptyAssociationAttribute((Associ... | java | public static Attribute<?> createEmptyAttribute(AbstractAttributeInfo attrInfo) {
if (attrInfo instanceof PrimitiveAttributeInfo) {
return createEmptyPrimitiveAttribute((PrimitiveAttributeInfo) attrInfo);
} else if (attrInfo instanceof AssociationAttributeInfo) {
return createEmptyAssociationAttribute((Associ... | [
"public",
"static",
"Attribute",
"<",
"?",
">",
"createEmptyAttribute",
"(",
"AbstractAttributeInfo",
"attrInfo",
")",
"{",
"if",
"(",
"attrInfo",
"instanceof",
"PrimitiveAttributeInfo",
")",
"{",
"return",
"createEmptyPrimitiveAttribute",
"(",
"(",
"PrimitiveAttributeI... | Creates an empty attribute. An empty attribute is an attribute which has null as its value.
@param attrInfo attribute info
@return an empty attribute. | [
"Creates",
"an",
"empty",
"attribute",
".",
"An",
"empty",
"attribute",
"is",
"an",
"attribute",
"which",
"has",
"null",
"as",
"its",
"value",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/AttributeUtil.java#L72-L79 |
147,473 | geomajas/geomajas-project-client-gwt | common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/AttributeUtil.java | AttributeUtil.createEmptyPrimitiveAttribute | public static PrimitiveAttribute<?> createEmptyPrimitiveAttribute(PrimitiveAttributeInfo info) {
PrimitiveAttribute<?> attribute;
switch (info.getType()) {
case BOOLEAN:
attribute = new BooleanAttribute();
break;
case SHORT:
attribute = new ShortAttribute();
break;
case INTEGER:
attribu... | java | public static PrimitiveAttribute<?> createEmptyPrimitiveAttribute(PrimitiveAttributeInfo info) {
PrimitiveAttribute<?> attribute;
switch (info.getType()) {
case BOOLEAN:
attribute = new BooleanAttribute();
break;
case SHORT:
attribute = new ShortAttribute();
break;
case INTEGER:
attribu... | [
"public",
"static",
"PrimitiveAttribute",
"<",
"?",
">",
"createEmptyPrimitiveAttribute",
"(",
"PrimitiveAttributeInfo",
"info",
")",
"{",
"PrimitiveAttribute",
"<",
"?",
">",
"attribute",
";",
"switch",
"(",
"info",
".",
"getType",
"(",
")",
")",
"{",
"case",
... | Creates an empty primitive attribute. An empty attribute is an attribute which has null as its value.
@param info attribute info
@return an empty primitive attribute of the right type. | [
"Creates",
"an",
"empty",
"primitive",
"attribute",
".",
"An",
"empty",
"attribute",
"is",
"an",
"attribute",
"which",
"has",
"null",
"as",
"its",
"value",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/AttributeUtil.java#L87-L130 |
147,474 | geomajas/geomajas-project-client-gwt | common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/AttributeUtil.java | AttributeUtil.createEmptyAssociationAttribute | public static AssociationAttribute<?> createEmptyAssociationAttribute(AssociationAttributeInfo info) {
AssociationAttribute<?> association;
switch (info.getType()) {
case MANY_TO_ONE:
association = new ManyToOneAttribute();
break;
case ONE_TO_MANY:
association = new OneToManyAttribute();
break... | java | public static AssociationAttribute<?> createEmptyAssociationAttribute(AssociationAttributeInfo info) {
AssociationAttribute<?> association;
switch (info.getType()) {
case MANY_TO_ONE:
association = new ManyToOneAttribute();
break;
case ONE_TO_MANY:
association = new OneToManyAttribute();
break... | [
"public",
"static",
"AssociationAttribute",
"<",
"?",
">",
"createEmptyAssociationAttribute",
"(",
"AssociationAttributeInfo",
"info",
")",
"{",
"AssociationAttribute",
"<",
"?",
">",
"association",
";",
"switch",
"(",
"info",
".",
"getType",
"(",
")",
")",
"{",
... | Creates an empty association attribute. An empty attribute is an attribute which has null as its value.
@param info attribute info
@return an empty association attribute of the right type. | [
"Creates",
"an",
"empty",
"association",
"attribute",
".",
"An",
"empty",
"attribute",
"is",
"an",
"attribute",
"which",
"has",
"null",
"as",
"its",
"value",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/AttributeUtil.java#L138-L154 |
147,475 | geomajas/geomajas-project-client-gwt | plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/event/JsEventBusImpl.java | JsEventBusImpl.addLayersModelChangedHandler | public JsHandlerRegistration addLayersModelChangedHandler(final LayersModelChangedHandler handler) {
HandlerRegistration registration = ((MapImpl) map).getMapWidget().getMapModel()
.addMapModelChangedHandler(new MapModelChangedHandler() {
public void onMapModelChanged(MapModelChangedEvent event) {
han... | java | public JsHandlerRegistration addLayersModelChangedHandler(final LayersModelChangedHandler handler) {
HandlerRegistration registration = ((MapImpl) map).getMapWidget().getMapModel()
.addMapModelChangedHandler(new MapModelChangedHandler() {
public void onMapModelChanged(MapModelChangedEvent event) {
han... | [
"public",
"JsHandlerRegistration",
"addLayersModelChangedHandler",
"(",
"final",
"LayersModelChangedHandler",
"handler",
")",
"{",
"HandlerRegistration",
"registration",
"=",
"(",
"(",
"MapImpl",
")",
"map",
")",
".",
"getMapWidget",
"(",
")",
".",
"getMapModel",
"(",... | Add a handler to change events in the layer configuration from the map. This event is fired for example when the
map gets it's configuration from the server. Only then can it know what layers it has available. | [
"Add",
"a",
"handler",
"to",
"change",
"events",
"in",
"the",
"layer",
"configuration",
"from",
"the",
"map",
".",
"This",
"event",
"is",
"fired",
"for",
"example",
"when",
"the",
"map",
"gets",
"it",
"s",
"configuration",
"from",
"the",
"server",
".",
"... | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/event/JsEventBusImpl.java#L66-L75 |
147,476 | geomajas/geomajas-project-client-gwt | plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/event/JsEventBusImpl.java | JsEventBusImpl.addFeatureSelectionHandler | public JsHandlerRegistration addFeatureSelectionHandler(final FeatureSelectedHandler selectedHandler,
final FeatureDeselectedHandler deselectedHandler) {
if (((MapImpl) map).getMapWidget().getMapModel().isInitialized()) {
return addFeatureSelectionHandler2(selectedHandler, deselectedHandler);
}
final Callba... | java | public JsHandlerRegistration addFeatureSelectionHandler(final FeatureSelectedHandler selectedHandler,
final FeatureDeselectedHandler deselectedHandler) {
if (((MapImpl) map).getMapWidget().getMapModel().isInitialized()) {
return addFeatureSelectionHandler2(selectedHandler, deselectedHandler);
}
final Callba... | [
"public",
"JsHandlerRegistration",
"addFeatureSelectionHandler",
"(",
"final",
"FeatureSelectedHandler",
"selectedHandler",
",",
"final",
"FeatureDeselectedHandler",
"deselectedHandler",
")",
"{",
"if",
"(",
"(",
"(",
"MapImpl",
")",
"map",
")",
".",
"getMapWidget",
"("... | Add a handler for feature selection. | [
"Add",
"a",
"handler",
"for",
"feature",
"selection",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/event/JsEventBusImpl.java#L80-L94 |
147,477 | daisy/jhyphen | src/main/java/ch/sbs/jhyphen/Hyphenator.java | Hyphenator.hyphenate | public String hyphenate(String text, Character shy, Character zwsp) throws StandardHyphenationException {
if (shy == null && zwsp == null)
return text;
byte[] hyphens = hyphenate(text);
StringBuffer hyphenatedText = new StringBuffer();
int i;
for (i = 0; i < hyphens.length; i++) {
hyphenatedText.append(... | java | public String hyphenate(String text, Character shy, Character zwsp) throws StandardHyphenationException {
if (shy == null && zwsp == null)
return text;
byte[] hyphens = hyphenate(text);
StringBuffer hyphenatedText = new StringBuffer();
int i;
for (i = 0; i < hyphens.length; i++) {
hyphenatedText.append(... | [
"public",
"String",
"hyphenate",
"(",
"String",
"text",
",",
"Character",
"shy",
",",
"Character",
"zwsp",
")",
"throws",
"StandardHyphenationException",
"{",
"if",
"(",
"shy",
"==",
"null",
"&&",
"zwsp",
"==",
"null",
")",
"return",
"text",
";",
"byte",
"... | Returns the fully hyphenated string.
The given hyphen characters are inserted at all possible hyphenation points.
@param text The string to be hyphenated
@param shy The character to be used as soft hyphen.
@param zwsp The character to be used as zero-width space.
@return The hyphenated string
@throws StandardHyphenatio... | [
"Returns",
"the",
"fully",
"hyphenated",
"string",
".",
"The",
"given",
"hyphen",
"characters",
"are",
"inserted",
"at",
"all",
"possible",
"hyphenation",
"points",
"."
] | a66a6ca29bf47aba9a07562c5dc90c3192bec0fc | https://github.com/daisy/jhyphen/blob/a66a6ca29bf47aba9a07562c5dc90c3192bec0fc/src/main/java/ch/sbs/jhyphen/Hyphenator.java#L80-L95 |
147,478 | daisy/jhyphen | src/main/java/ch/sbs/jhyphen/Hyphenator.java | Hyphenator.hyphenate | public byte[] hyphenate(String text) throws StandardHyphenationException {
// TODO: what if word already contains soft hyphens?
Matcher matcher = Pattern.compile("['\\p{L}]+").matcher(text);
StringBuffer hyphenBuffer = new StringBuffer();
int pos = 0;
// iterate words
while (matcher.find()) {
i... | java | public byte[] hyphenate(String text) throws StandardHyphenationException {
// TODO: what if word already contains soft hyphens?
Matcher matcher = Pattern.compile("['\\p{L}]+").matcher(text);
StringBuffer hyphenBuffer = new StringBuffer();
int pos = 0;
// iterate words
while (matcher.find()) {
i... | [
"public",
"byte",
"[",
"]",
"hyphenate",
"(",
"String",
"text",
")",
"throws",
"StandardHyphenationException",
"{",
"// TODO: what if word already contains soft hyphens?",
"Matcher",
"matcher",
"=",
"Pattern",
".",
"compile",
"(",
"\"['\\\\p{L}]+\"",
")",
".",
"matcher"... | Returns all possible hyphenation opportunities within a string
@param text The string to be hyphenated
@return A byte array which represents the break opportunities. The length of the
hyphen array is the length of the input string minus 1. A hyphen at index i
corresponds to characters i and i+1 of the string. Possible ... | [
"Returns",
"all",
"possible",
"hyphenation",
"opportunities",
"within",
"a",
"string"
] | a66a6ca29bf47aba9a07562c5dc90c3192bec0fc | https://github.com/daisy/jhyphen/blob/a66a6ca29bf47aba9a07562c5dc90c3192bec0fc/src/main/java/ch/sbs/jhyphen/Hyphenator.java#L109-L173 |
147,479 | daisy/jhyphen | src/main/java/ch/sbs/jhyphen/Hyphenator.java | Hyphenator.getCharset | private static Charset getCharset(File dictionaryFile)
throws UnsupportedCharsetException, FileNotFoundException {
Charset cs = charsets.get(dictionaryFile);
if (cs == null) {
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader(dictionaryFile));
String charsetName = re... | java | private static Charset getCharset(File dictionaryFile)
throws UnsupportedCharsetException, FileNotFoundException {
Charset cs = charsets.get(dictionaryFile);
if (cs == null) {
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader(dictionaryFile));
String charsetName = re... | [
"private",
"static",
"Charset",
"getCharset",
"(",
"File",
"dictionaryFile",
")",
"throws",
"UnsupportedCharsetException",
",",
"FileNotFoundException",
"{",
"Charset",
"cs",
"=",
"charsets",
".",
"get",
"(",
"dictionaryFile",
")",
";",
"if",
"(",
"cs",
"==",
"n... | Reads the first line of the dictionary file which is the encoding
@param dictionaryFile The dictionary file
@return The encoding
@throws FileNotFoundException if the dictionary file cannot be found.
@throws UnsupportedCharsetException if the encoding of the file is not supported. | [
"Reads",
"the",
"first",
"line",
"of",
"the",
"dictionary",
"file",
"which",
"is",
"the",
"encoding"
] | a66a6ca29bf47aba9a07562c5dc90c3192bec0fc | https://github.com/daisy/jhyphen/blob/a66a6ca29bf47aba9a07562c5dc90c3192bec0fc/src/main/java/ch/sbs/jhyphen/Hyphenator.java#L382-L407 |
147,480 | geomajas/geomajas-project-client-gwt | plugin/widget-advancedviews/advancedviews-gwt/src/main/java/org/geomajas/widget/advancedviews/client/widget/ExpandingThemeWidget.java | ExpandingThemeWidget.resetIcons | protected void resetIcons() {
for (ViewConfigItem item : viewConfigItems) {
RangeConfig config = getRangeConfigForCurrentScale(item.getViewConfig(), mapWidget.getMapModel()
.getMapView().getCurrentScale());
if (null != config && null != config.getIcon()) {
((MenuItem) item.getButton()).setIcon(Geomajas... | java | protected void resetIcons() {
for (ViewConfigItem item : viewConfigItems) {
RangeConfig config = getRangeConfigForCurrentScale(item.getViewConfig(), mapWidget.getMapModel()
.getMapView().getCurrentScale());
if (null != config && null != config.getIcon()) {
((MenuItem) item.getButton()).setIcon(Geomajas... | [
"protected",
"void",
"resetIcons",
"(",
")",
"{",
"for",
"(",
"ViewConfigItem",
"item",
":",
"viewConfigItems",
")",
"{",
"RangeConfig",
"config",
"=",
"getRangeConfigForCurrentScale",
"(",
"item",
".",
"getViewConfig",
"(",
")",
",",
"mapWidget",
".",
"getMapMo... | Reset all icons. | [
"Reset",
"all",
"icons",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-advancedviews/advancedviews-gwt/src/main/java/org/geomajas/widget/advancedviews/client/widget/ExpandingThemeWidget.java#L217-L229 |
147,481 | geomajas/geomajas-project-client-gwt | plugin/staticsecurity/staticsecurity-gwt/src/main/java/org/geomajas/plugin/staticsecurity/client/Authentication.java | Authentication.loginUser | private void loginUser(final String userId, final String password, final BooleanCallback callback) {
LoginRequest request = new LoginRequest();
request.setLogin(userId);
request.setPassword(password);
GwtCommand command = new GwtCommand(loginCommandName);
command.setCommandRequest(request);
GwtCommandDispat... | java | private void loginUser(final String userId, final String password, final BooleanCallback callback) {
LoginRequest request = new LoginRequest();
request.setLogin(userId);
request.setPassword(password);
GwtCommand command = new GwtCommand(loginCommandName);
command.setCommandRequest(request);
GwtCommandDispat... | [
"private",
"void",
"loginUser",
"(",
"final",
"String",
"userId",
",",
"final",
"String",
"password",
",",
"final",
"BooleanCallback",
"callback",
")",
"{",
"LoginRequest",
"request",
"=",
"new",
"LoginRequest",
"(",
")",
";",
"request",
".",
"setLogin",
"(",
... | Effectively log in a certain user. | [
"Effectively",
"log",
"in",
"a",
"certain",
"user",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/staticsecurity/staticsecurity-gwt/src/main/java/org/geomajas/plugin/staticsecurity/client/Authentication.java#L207-L237 |
147,482 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/paintable/mapaddon/PanButtonCollection.java | PanButtonCollection.accept | public void accept(PainterVisitor visitor, Object group, Bbox bounds, boolean recursive) {
// Apply position on all pan buttons:
applyPosition();
// Then render them:
map.getVectorContext().drawGroup(group, this);
map.getVectorContext().drawImage(this, background.getId(), background.getHref(), background.get... | java | public void accept(PainterVisitor visitor, Object group, Bbox bounds, boolean recursive) {
// Apply position on all pan buttons:
applyPosition();
// Then render them:
map.getVectorContext().drawGroup(group, this);
map.getVectorContext().drawImage(this, background.getId(), background.getHref(), background.get... | [
"public",
"void",
"accept",
"(",
"PainterVisitor",
"visitor",
",",
"Object",
"group",
",",
"Bbox",
"bounds",
",",
"boolean",
"recursive",
")",
"{",
"// Apply position on all pan buttons:",
"applyPosition",
"(",
")",
";",
"// Then render them:",
"map",
".",
"getVecto... | Apply the correct positions on all panning buttons, and render them. | [
"Apply",
"the",
"correct",
"positions",
"on",
"all",
"panning",
"buttons",
"and",
"render",
"them",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/paintable/mapaddon/PanButtonCollection.java#L104-L116 |
147,483 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/map/cache/tile/VectorTile.java | VectorTile.fetch | public void fetch(final String filter, final TileFunction<VectorTile> callback) {
final GetVectorTileRequest request = createRequest(filter);
GwtCommand command = new GwtCommand(GetVectorTileRequest.COMMAND);
command.setCommandRequest(request);
final VectorTile self = this;
lastRequest = request;
deferred =... | java | public void fetch(final String filter, final TileFunction<VectorTile> callback) {
final GetVectorTileRequest request = createRequest(filter);
GwtCommand command = new GwtCommand(GetVectorTileRequest.COMMAND);
command.setCommandRequest(request);
final VectorTile self = this;
lastRequest = request;
deferred =... | [
"public",
"void",
"fetch",
"(",
"final",
"String",
"filter",
",",
"final",
"TileFunction",
"<",
"VectorTile",
">",
"callback",
")",
"{",
"final",
"GetVectorTileRequest",
"request",
"=",
"createRequest",
"(",
"filter",
")",
";",
"GwtCommand",
"command",
"=",
"n... | Fetch all data related to this tile.
@param filter When fetching it is possible to filter the data with this filter object. Null otherwise.
@param callback When this node's data comes from the server, it will be handled by this callback function. | [
"Fetch",
"all",
"data",
"related",
"to",
"this",
"tile",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/map/cache/tile/VectorTile.java#L85-L113 |
147,484 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/map/cache/tile/VectorTile.java | VectorTile.apply | public void apply(final String filter, final TileFunction<VectorTile> callback) {
switch (getStatus()) {
case EMPTY:
fetch(filter, callback);
break;
case LOADING:
if (needsReload(filter)) {
deferred.cancel();
fetch(filter, callback);
} else {
final VectorTile self = this;
def... | java | public void apply(final String filter, final TileFunction<VectorTile> callback) {
switch (getStatus()) {
case EMPTY:
fetch(filter, callback);
break;
case LOADING:
if (needsReload(filter)) {
deferred.cancel();
fetch(filter, callback);
} else {
final VectorTile self = this;
def... | [
"public",
"void",
"apply",
"(",
"final",
"String",
"filter",
",",
"final",
"TileFunction",
"<",
"VectorTile",
">",
"callback",
")",
"{",
"switch",
"(",
"getStatus",
"(",
")",
")",
"{",
"case",
"EMPTY",
":",
"fetch",
"(",
"filter",
",",
"callback",
")",
... | Execute a TileFunction on this tile. If the tile is not yet loaded, attach it to the isLoaded event.
@param filter filter which needs to be applied when fetching
@param callback callback to call | [
"Execute",
"a",
"TileFunction",
"on",
"this",
"tile",
".",
"If",
"the",
"tile",
"is",
"not",
"yet",
"loaded",
"attach",
"it",
"to",
"the",
"isLoaded",
"event",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/map/cache/tile/VectorTile.java#L149-L179 |
147,485 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java | DomHelper.moveToBack | public void moveToBack(Object parent, String name) {
Element parentElement = getGroup(parent);
if (parentElement == null) {
throw new IllegalArgumentException("moveToBack failed: could not find parent group.");
}
Element element = getElement(parent, name);
if (element == null) {
throw new IllegalArgume... | java | public void moveToBack(Object parent, String name) {
Element parentElement = getGroup(parent);
if (parentElement == null) {
throw new IllegalArgumentException("moveToBack failed: could not find parent group.");
}
Element element = getElement(parent, name);
if (element == null) {
throw new IllegalArgume... | [
"public",
"void",
"moveToBack",
"(",
"Object",
"parent",
",",
"String",
"name",
")",
"{",
"Element",
"parentElement",
"=",
"getGroup",
"(",
"parent",
")",
";",
"if",
"(",
"parentElement",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(... | Within a certain group, move an element to the back. All siblings will be rendered after this one.
@param object
The group wherein to search for the element.
@param name
The name of the element to move to the back.
@since 1.10.0 | [
"Within",
"a",
"certain",
"group",
"move",
"an",
"element",
"to",
"the",
"back",
".",
"All",
"siblings",
"will",
"be",
"rendered",
"after",
"this",
"one",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L381-L395 |
147,486 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java | DomHelper.applyAbsolutePosition | private void applyAbsolutePosition(Element element, Coordinate position) {
Dom.setStyleAttribute(element, "position", "absolute");
Dom.setStyleAttribute(element, "left", (int) position.getX() + "px");
Dom.setStyleAttribute(element, "top", (int) position.getY() + "px");
} | java | private void applyAbsolutePosition(Element element, Coordinate position) {
Dom.setStyleAttribute(element, "position", "absolute");
Dom.setStyleAttribute(element, "left", (int) position.getX() + "px");
Dom.setStyleAttribute(element, "top", (int) position.getY() + "px");
} | [
"private",
"void",
"applyAbsolutePosition",
"(",
"Element",
"element",
",",
"Coordinate",
"position",
")",
"{",
"Dom",
".",
"setStyleAttribute",
"(",
"element",
",",
"\"position\"",
",",
"\"absolute\"",
")",
";",
"Dom",
".",
"setStyleAttribute",
"(",
"element",
... | Apply an absolute position on an element.
@param element
The element that needs an absolute position.
@param position
The position as a Coordinate. | [
"Apply",
"an",
"absolute",
"position",
"on",
"an",
"element",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L492-L496 |
147,487 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java | DomHelper.applyElementSize | private void applyElementSize(Element element, int width, int height, boolean addCoordSize) {
if (width >= 0 && height >= 0) {
if (addCoordSize) {
Dom.setElementAttribute(element, "coordsize", width + " " + height);
}
Dom.setStyleAttribute(element, "width", width + "px");
Dom.setStyleAttribute(element... | java | private void applyElementSize(Element element, int width, int height, boolean addCoordSize) {
if (width >= 0 && height >= 0) {
if (addCoordSize) {
Dom.setElementAttribute(element, "coordsize", width + " " + height);
}
Dom.setStyleAttribute(element, "width", width + "px");
Dom.setStyleAttribute(element... | [
"private",
"void",
"applyElementSize",
"(",
"Element",
"element",
",",
"int",
"width",
",",
"int",
"height",
",",
"boolean",
"addCoordSize",
")",
"{",
"if",
"(",
"width",
">=",
"0",
"&&",
"height",
">=",
"0",
")",
"{",
"if",
"(",
"addCoordSize",
")",
"... | Apply a size on an element.
@param element
The element that needs sizing.
@param width
The new width to apply on the element.
@param height
The new height to apply on the element.
@param addCoordSize
Should a coordsize attribute be added as well? | [
"Apply",
"a",
"size",
"on",
"an",
"element",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L510-L518 |
147,488 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java | DomHelper.parse | private String parse(Matrix matrix) {
String transform = "";
if (matrix != null) {
double dx = matrix.getDx();
double dy = matrix.getDy();
if (matrix.getXx() != 0 && matrix.getYy() != 0 && matrix.getXx() != 1 && matrix.getYy() != 1) {
transform += "scale(" + matrix.getXx() + ", " + matrix.getYy() + ")"... | java | private String parse(Matrix matrix) {
String transform = "";
if (matrix != null) {
double dx = matrix.getDx();
double dy = matrix.getDy();
if (matrix.getXx() != 0 && matrix.getYy() != 0 && matrix.getXx() != 1 && matrix.getYy() != 1) {
transform += "scale(" + matrix.getXx() + ", " + matrix.getYy() + ")"... | [
"private",
"String",
"parse",
"(",
"Matrix",
"matrix",
")",
"{",
"String",
"transform",
"=",
"\"\"",
";",
"if",
"(",
"matrix",
"!=",
"null",
")",
"{",
"double",
"dx",
"=",
"matrix",
".",
"getDx",
"(",
")",
";",
"double",
"dy",
"=",
"matrix",
".",
"... | Parse a matrix object into a string, suitable for the SVG 'transform' attribute.
@param matrix
The matrix to parse.
@return The transform string. | [
"Parse",
"a",
"matrix",
"object",
"into",
"a",
"string",
"suitable",
"for",
"the",
"SVG",
"transform",
"attribute",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L527-L542 |
147,489 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java | DomHelper.createGroup | protected Element createGroup(String namespace, Object parent, Object group, String type) {
Element parentElement;
if (parent == null) {
parentElement = getRootElement();
} else {
parentElement = getGroup(parent);
}
if (parentElement == null) {
return null;
} else {
Element element;
String id... | java | protected Element createGroup(String namespace, Object parent, Object group, String type) {
Element parentElement;
if (parent == null) {
parentElement = getRootElement();
} else {
parentElement = getGroup(parent);
}
if (parentElement == null) {
return null;
} else {
Element element;
String id... | [
"protected",
"Element",
"createGroup",
"(",
"String",
"namespace",
",",
"Object",
"parent",
",",
"Object",
"group",
",",
"String",
"type",
")",
"{",
"Element",
"parentElement",
";",
"if",
"(",
"parent",
"==",
"null",
")",
"{",
"parentElement",
"=",
"getRootE... | Generic creation method for group elements.
@param namespace
the name space (HTML, SVG or VML,...)
@param parent
the parent group
@param group
group
@param type
type
@return the newly created group element or null if creation failed | [
"Generic",
"creation",
"method",
"for",
"group",
"elements",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L793-L818 |
147,490 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java | DomHelper.getElement | protected Element getElement(Object parent, String name) {
if (name == null) {
return null;
}
String id;
if (parent == null) {
id = getRootElement().getId();
} else {
id = groupToId.get(parent);
}
return Dom.getElementById(Dom.assembleId(id, name));
} | java | protected Element getElement(Object parent, String name) {
if (name == null) {
return null;
}
String id;
if (parent == null) {
id = getRootElement().getId();
} else {
id = groupToId.get(parent);
}
return Dom.getElementById(Dom.assembleId(id, name));
} | [
"protected",
"Element",
"getElement",
"(",
"Object",
"parent",
",",
"String",
"name",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"String",
"id",
";",
"if",
"(",
"parent",
"==",
"null",
")",
"{",
"id",
"=",
"get... | Returns the element that is a child of the specified parent and has the specified local group name.
@param parent
the parent group
@param name
the local group name
@return the element or null if it does not exist or the name was null | [
"Returns",
"the",
"element",
"that",
"is",
"a",
"child",
"of",
"the",
"specified",
"parent",
"and",
"has",
"the",
"specified",
"local",
"group",
"name",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L829-L840 |
147,491 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java | DomHelper.createElement | protected Element createElement(Object parent, String name, String type, Style style, boolean generateId) {
if (null == name) {
return null;
}
Element parentElement;
if (parent == null) {
parentElement = getRootElement();
} else {
parentElement = getGroup(parent);
}
if (parentElement == null) {
... | java | protected Element createElement(Object parent, String name, String type, Style style, boolean generateId) {
if (null == name) {
return null;
}
Element parentElement;
if (parent == null) {
parentElement = getRootElement();
} else {
parentElement = getGroup(parent);
}
if (parentElement == null) {
... | [
"protected",
"Element",
"createElement",
"(",
"Object",
"parent",
",",
"String",
"name",
",",
"String",
"type",
",",
"Style",
"style",
",",
"boolean",
"generateId",
")",
"{",
"if",
"(",
"null",
"==",
"name",
")",
"{",
"return",
"null",
";",
"}",
"Element... | Generic creation method for non-group elements.
@param parent
the parent group
@param name
local group name of the element (should be unique within the group)
@param type
the type of the element (tag name, e.g. 'image')
@param style
The style to apply on the element.
@param generateId
true if a unique id may be genera... | [
"Generic",
"creation",
"method",
"for",
"non",
"-",
"group",
"elements",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L857-L907 |
147,492 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java | DomHelper.deleteGroup | public void deleteGroup(Object object) {
Element element = getGroup(object);
if (element != null) {
Element parent = (Element) element.getParentElement();
if (parent != null) {
deleteRecursively(parent, element);
}
}
} | java | public void deleteGroup(Object object) {
Element element = getGroup(object);
if (element != null) {
Element parent = (Element) element.getParentElement();
if (parent != null) {
deleteRecursively(parent, element);
}
}
} | [
"public",
"void",
"deleteGroup",
"(",
"Object",
"object",
")",
"{",
"Element",
"element",
"=",
"getGroup",
"(",
"object",
")",
";",
"if",
"(",
"element",
"!=",
"null",
")",
"{",
"Element",
"parent",
"=",
"(",
"Element",
")",
"element",
".",
"getParentEle... | Delete this group from the graphics DOM structure.
@param object
The group's object. | [
"Delete",
"this",
"group",
"from",
"the",
"graphics",
"DOM",
"structure",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L933-L941 |
147,493 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java | DomHelper.applyStyle | public void applyStyle(Element element, Style style) {
if (element != null && style != null) {
switch (namespace) {
case VML:
VmlStyleUtil.applyStyle(element, style);
break;
case SVG:
if (style instanceof ShapeStyle) {
applySvgStyle(element, (ShapeStyle) style);
} else if (style i... | java | public void applyStyle(Element element, Style style) {
if (element != null && style != null) {
switch (namespace) {
case VML:
VmlStyleUtil.applyStyle(element, style);
break;
case SVG:
if (style instanceof ShapeStyle) {
applySvgStyle(element, (ShapeStyle) style);
} else if (style i... | [
"public",
"void",
"applyStyle",
"(",
"Element",
"element",
",",
"Style",
"style",
")",
"{",
"if",
"(",
"element",
"!=",
"null",
"&&",
"style",
"!=",
"null",
")",
"{",
"switch",
"(",
"namespace",
")",
"{",
"case",
"VML",
":",
"VmlStyleUtil",
".",
"apply... | Apply the style.
@param element
DOM element
@param style
style | [
"Apply",
"the",
"style",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L974-L1000 |
147,494 | telegram-s/telegram-mt | src/main/java/org/telegram/mtproto/backoff/ExponentalBackoff.java | ExponentalBackoff.onFailure | public void onFailure() throws InterruptedException {
int val = currentFailureCount.incrementAndGet();
if (val > 50) {
currentFailureCount.compareAndSet(val, MAX_FAILURE_COUNT);
val = MAX_FAILURE_COUNT;
}
int delay = MIN_DELAY + ((MAX_DELAY - MIN_DELAY) / MAX_FAI... | java | public void onFailure() throws InterruptedException {
int val = currentFailureCount.incrementAndGet();
if (val > 50) {
currentFailureCount.compareAndSet(val, MAX_FAILURE_COUNT);
val = MAX_FAILURE_COUNT;
}
int delay = MIN_DELAY + ((MAX_DELAY - MIN_DELAY) / MAX_FAI... | [
"public",
"void",
"onFailure",
"(",
")",
"throws",
"InterruptedException",
"{",
"int",
"val",
"=",
"currentFailureCount",
".",
"incrementAndGet",
"(",
")",
";",
"if",
"(",
"val",
">",
"50",
")",
"{",
"currentFailureCount",
".",
"compareAndSet",
"(",
"val",
"... | Called on failure, wait required time before exiting method
@throws InterruptedException if waiting was interrupted | [
"Called",
"on",
"failure",
"wait",
"required",
"time",
"before",
"exiting",
"method"
] | 57e3f635a6508705081eba9396ae24db050bc943 | https://github.com/telegram-s/telegram-mt/blob/57e3f635a6508705081eba9396ae24db050bc943/src/main/java/org/telegram/mtproto/backoff/ExponentalBackoff.java#L37-L50 |
147,495 | telegram-s/telegram-mt | src/main/java/org/telegram/mtproto/backoff/ExponentalBackoff.java | ExponentalBackoff.onFailureNoWait | public void onFailureNoWait() {
Logger.d(TAG, "onFailureNoWait");
int val = currentFailureCount.incrementAndGet();
if (val > 50) {
currentFailureCount.compareAndSet(val, MAX_FAILURE_COUNT);
val = MAX_FAILURE_COUNT;
}
} | java | public void onFailureNoWait() {
Logger.d(TAG, "onFailureNoWait");
int val = currentFailureCount.incrementAndGet();
if (val > 50) {
currentFailureCount.compareAndSet(val, MAX_FAILURE_COUNT);
val = MAX_FAILURE_COUNT;
}
} | [
"public",
"void",
"onFailureNoWait",
"(",
")",
"{",
"Logger",
".",
"d",
"(",
"TAG",
",",
"\"onFailureNoWait\"",
")",
";",
"int",
"val",
"=",
"currentFailureCount",
".",
"incrementAndGet",
"(",
")",
";",
"if",
"(",
"val",
">",
"50",
")",
"{",
"currentFail... | onFailure without waiting | [
"onFailure",
"without",
"waiting"
] | 57e3f635a6508705081eba9396ae24db050bc943 | https://github.com/telegram-s/telegram-mt/blob/57e3f635a6508705081eba9396ae24db050bc943/src/main/java/org/telegram/mtproto/backoff/ExponentalBackoff.java#L55-L62 |
147,496 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/controller/editing/EditController.java | EditController.showGeometricInfo | public void showGeometricInfo() {
FeatureTransaction ft = getFeatureTransaction();
if (infoLabel == null && ft != null && ft.getNewFeatures() != null && ft.getNewFeatures().length > 0) {
infoLabel = new GeometricInfoLabel();
infoLabel.addClickHandler(new DestroyLabelInfoOnClick());
infoLabel.setGeometry(ft... | java | public void showGeometricInfo() {
FeatureTransaction ft = getFeatureTransaction();
if (infoLabel == null && ft != null && ft.getNewFeatures() != null && ft.getNewFeatures().length > 0) {
infoLabel = new GeometricInfoLabel();
infoLabel.addClickHandler(new DestroyLabelInfoOnClick());
infoLabel.setGeometry(ft... | [
"public",
"void",
"showGeometricInfo",
"(",
")",
"{",
"FeatureTransaction",
"ft",
"=",
"getFeatureTransaction",
"(",
")",
";",
"if",
"(",
"infoLabel",
"==",
"null",
"&&",
"ft",
"!=",
"null",
"&&",
"ft",
".",
"getNewFeatures",
"(",
")",
"!=",
"null",
"&&",
... | Show an overview of geometric attributes of the geometry that's being edited. | [
"Show",
"an",
"overview",
"of",
"geometric",
"attributes",
"of",
"the",
"geometry",
"that",
"s",
"being",
"edited",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/controller/editing/EditController.java#L132-L140 |
147,497 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/controller/editing/EditController.java | EditController.updateGeometricInfo | public void updateGeometricInfo() {
FeatureTransaction ft = getFeatureTransaction();
if (infoLabel != null && ft != null && ft.getNewFeatures() != null && ft.getNewFeatures().length > 0) {
infoLabel.setGeometry(ft.getNewFeatures()[0].getGeometry());
}
} | java | public void updateGeometricInfo() {
FeatureTransaction ft = getFeatureTransaction();
if (infoLabel != null && ft != null && ft.getNewFeatures() != null && ft.getNewFeatures().length > 0) {
infoLabel.setGeometry(ft.getNewFeatures()[0].getGeometry());
}
} | [
"public",
"void",
"updateGeometricInfo",
"(",
")",
"{",
"FeatureTransaction",
"ft",
"=",
"getFeatureTransaction",
"(",
")",
";",
"if",
"(",
"infoLabel",
"!=",
"null",
"&&",
"ft",
"!=",
"null",
"&&",
"ft",
".",
"getNewFeatures",
"(",
")",
"!=",
"null",
"&&"... | Update the overview of geometric attributes of the geometry that's being edited. | [
"Update",
"the",
"overview",
"of",
"geometric",
"attributes",
"of",
"the",
"geometry",
"that",
"s",
"being",
"edited",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/controller/editing/EditController.java#L145-L150 |
147,498 | geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/action/menu/CancelEditingAction.java | CancelEditingAction.onClick | public void onClick(MenuItemClickEvent event) {
FeatureTransaction featureTransaction = mapWidget.getMapModel().getFeatureEditor().getFeatureTransaction();
if (featureTransaction != null) {
controller.cleanup();
mapWidget.render(featureTransaction, RenderGroup.VECTOR, RenderStatus.DELETE);
mapWidget.getMa... | java | public void onClick(MenuItemClickEvent event) {
FeatureTransaction featureTransaction = mapWidget.getMapModel().getFeatureEditor().getFeatureTransaction();
if (featureTransaction != null) {
controller.cleanup();
mapWidget.render(featureTransaction, RenderGroup.VECTOR, RenderStatus.DELETE);
mapWidget.getMa... | [
"public",
"void",
"onClick",
"(",
"MenuItemClickEvent",
"event",
")",
"{",
"FeatureTransaction",
"featureTransaction",
"=",
"mapWidget",
".",
"getMapModel",
"(",
")",
".",
"getFeatureEditor",
"(",
")",
".",
"getFeatureTransaction",
"(",
")",
";",
"if",
"(",
"fea... | Cancels editing, and also removes the FeatureTransaction object from the map.
@param event
The {@link MenuItemClickEvent} from clicking the action. | [
"Cancels",
"editing",
"and",
"also",
"removes",
"the",
"FeatureTransaction",
"object",
"from",
"the",
"map",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/action/menu/CancelEditingAction.java#L57-L64 |
147,499 | geomajas/geomajas-project-client-gwt | plugin/widget-utility/utility-gwt-example-jar/src/main/java/org/geomajas/widget/utility/gwt/example/client/MyCustomRibbonColumn.java | MyCustomRibbonColumn.configure | public void configure(String key, String value) {
if ("x".equalsIgnoreCase(key)) {
xText = value;
} else if ("y".equalsIgnoreCase(key)) {
yText = value;
}
} | java | public void configure(String key, String value) {
if ("x".equalsIgnoreCase(key)) {
xText = value;
} else if ("y".equalsIgnoreCase(key)) {
yText = value;
}
} | [
"public",
"void",
"configure",
"(",
"String",
"key",
",",
"String",
"value",
")",
"{",
"if",
"(",
"\"x\"",
".",
"equalsIgnoreCase",
"(",
"key",
")",
")",
"{",
"xText",
"=",
"value",
";",
"}",
"else",
"if",
"(",
"\"y\"",
".",
"equalsIgnoreCase",
"(",
... | Can accept "X and "Y" text values to be printed out. | [
"Can",
"accept",
"X",
"and",
"Y",
"text",
"values",
"to",
"be",
"printed",
"out",
"."
] | 1c1adc48deb192ed825265eebcc74d70bbf45670 | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-utility/utility-gwt-example-jar/src/main/java/org/geomajas/widget/utility/gwt/example/client/MyCustomRibbonColumn.java#L83-L89 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.