List of usage examples for com.google.gwt.core.client.impl StringBuilderImpl append
public void append(String toAppend)
From source file:org.geomajas.widget.featureinfo.client.action.toolbar.TooltipOnMouseoverListener.java
License:Open Source License
private void writeLayerStart(StringBuilderImpl sb, String label) { sb.append("<span class='tblcLayerLabel'>"); sb.append(label);/*from w w w .j a v a2 s .c o m*/ sb.append("</span><ul class='tblcFeatureLabelList'>"); }
From source file:org.geomajas.widget.featureinfo.client.action.toolbar.TooltipOnMouseoverListener.java
License:Open Source License
private void writeFeature(StringBuilderImpl sb, String label) { sb.append("<li class='tblcFeatureLabel'>"); sb.append(label);/*w ww. j ava2 s . com*/ sb.append("</li>"); }
From source file:org.geomajas.widget.featureinfo.client.action.toolbar.TooltipOnMouseoverListener.java
License:Open Source License
private void writeLayerEnd(StringBuilderImpl sb) { sb.append("</ul>"); }
From source file:org.geomajas.widget.featureinfo.client.action.toolbar.TooltipOnMouseoverListener.java
License:Open Source License
private void writeNone(StringBuilderImpl sb) { sb.append("<span class='tblcMore'>("); sb.append(MESSAGES.tooltipOnMouseoverNoResult()); sb.append(")</span>"); }
From source file:org.geomajas.widget.featureinfo.client.action.toolbar.TooltipOnMouseoverListener.java
License:Open Source License
private void writeTooMany(StringBuilderImpl sb, int tooMany) { sb.append("<span class='tblcMore'>"); sb.append(Integer.toString(tooMany)); sb.append("</span>"); }
From source file:org.geomajas.widget.featureinfo.client.action.toolbar.TooltipOnMouseoverListener.java
License:Open Source License
private void setTooltipData(Coordinate coordUsedForRetrieval, Map<String, List<Feature>> featureMap) { if (coordUsedForRetrieval.equals(worldPosition) && tooltip != null) { StringBuilderImpl sb = new StringBuilderImpl.ImplStringAppend(); sb.append(CSS); widest = 10;/*from ww w . j av a 2s .c om*/ count = 0; for (Layer<?> layer : mapWidget.getMapModel().getLayers()) { if (featureMap.containsKey(layer.getId()) && useLayer(layer.getId())) { List<Feature> features = featureMap.get(layer.getId()); if (features.size() > 0) { if (useFeatureDetail) { setTooltipDetailData(sb, layer, features); } else { setTooltipDefaultData(sb, layer, features); } } } } int left = tooltip.getLeft(); int top = tooltip.getTop(); destroyTooltip(); if (count > maxLabelCount) { writeTooMany(sb, count - maxLabelCount); } else if (count == 0 && showEmptyResults) { writeNone(sb); } else if (count == 0) { return; } Canvas content = new Canvas(); content.setContents(sb.toString()); int width = (int) (widest * 4.8) + 40; if (width < 150) { width = 150; } content.setWidth(width); content.setAutoHeight(); content.setMargin(5); createTooltip(left, top, content); } // else - mouse moved between request and data retrieval }