本文整理匯總了Java中org.geomajas.plugin.printing.component.dto.LegendComponentInfo類的典型用法代碼示例。如果您正苦於以下問題:Java LegendComponentInfo類的具體用法?Java LegendComponentInfo怎麽用?Java LegendComponentInfo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
LegendComponentInfo類屬於org.geomajas.plugin.printing.component.dto包,在下文中一共展示了LegendComponentInfo類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: buildMap
import org.geomajas.plugin.printing.component.dto.LegendComponentInfo; //導入依賴的package包/類
protected MapComponentInfo buildMap(Bbox bounds) {
MapComponentInfo map = new MapComponentInfo();
if (PrintLayout.templateIncludeScaleBar) {
map.addChild(buildScaleBar());
}
if (PrintLayout.templateIncludeLegend) {
LegendComponentInfo legend;
if (null == bounds) {
legend = buildLegend();
} else {
legend = buildLegend(bounds);
}
map.addChild(legend);
}
if (PrintLayout.templateIncludeNorthArrow) {
map.addChild(buildArrow());
}
return map;
}
示例2: getLegendLabel
import org.geomajas.plugin.printing.component.dto.LegendComponentInfo; //導入依賴的package包/類
private LabelComponentInfo getLegendLabel(LegendComponentInfo legend, String text) {
LabelComponentInfo legendLabel = new LabelComponentInfo();
legendLabel.setBackgroundColor(PrintingLayout.templateDefaultBackgroundColor);
legendLabel.setBorderColor(PrintingLayout.templateDefaultBorderColor);
legendLabel.setFontColor(PrintingLayout.templateDefaultColor);
legendLabel.setFont(legend.getFont());
legendLabel.setText(text);
legendLabel.setTextOnly(true);
return legendLabel;
}
示例3: getLegendLabel
import org.geomajas.plugin.printing.component.dto.LegendComponentInfo; //導入依賴的package包/類
private LabelComponentInfo getLegendLabel(LegendComponentInfo legend, String text) {
LabelComponentInfo legendLabel = new LabelComponentInfo();
legendLabel.setBackgroundColor(PrintLayout.templateDefaultBackgroundColor);
legendLabel.setBorderColor(PrintLayout.templateDefaultBorderColor);
legendLabel.setFontColor(PrintLayout.templateDefaultColor);
legendLabel.setFont(legend.getFont());
legendLabel.setText(text);
legendLabel.setTextOnly(true);
return legendLabel;
}
示例4: fromDto
import org.geomajas.plugin.printing.component.dto.LegendComponentInfo; //導入依賴的package包/類
public void fromDto(LegendComponentInfo legendInfo) {
super.fromDto(legendInfo);
setApplicationId(legendInfo.getApplicationId());
setMapId(legendInfo.getMapId());
setFont(converterService.toInternal(legendInfo.getFont()));
setTitle(legendInfo.getTitle());
}
示例5: buildMap
import org.geomajas.plugin.printing.component.dto.LegendComponentInfo; //導入依賴的package包/類
protected MapComponentInfo buildMap() {
double printWidth = getPageWidth() - 2 * marginX;
double printHeight = getPageHeight() - 2 * marginY;
Bbox fittingBox = createFittingBox(bounds, printWidth / printHeight);
MapComponentInfo map = new MapComponentInfo();
map.addChild(buildScaleBar());
LegendComponentInfo legend = new LegendComponentInfo();
map.addChild(legend);
map.addChild(buildArrow());
map.getLayoutConstraint().setMarginX(marginX);
map.getLayoutConstraint().setMarginY(marginY);
map.setLocation(new org.geomajas.geometry.Coordinate(fittingBox.getX(), fittingBox.getY()));
map.setPpUnit((float) (printWidth / fittingBox.getWidth()));
map.setTag("map");
map.setMapId(mapInfo.getId());
map.setApplicationId(applicationId);
map.setRasterResolution(rasterDpi);
// use rasterized layers for pure GWT
double rasterScale = map.getPpUnit() * map.getRasterResolution() / 72.0;
// map.getPpUnit() = number of pixels per map unit at 72 dpi
List<PrintComponentInfo> layers = new ArrayList<PrintComponentInfo>();
RasterizedLayersComponentInfo rasterizedLayersComponentInfo = new RasterizedLayersComponentInfo();
prepareMap();
rasterizedLayersComponentInfo.setMapInfo(mapInfo);
layers.add(rasterizedLayersComponentInfo);
map.getChildren().addAll(0, layers);
return map;
}
示例6: buildLegend
import org.geomajas.plugin.printing.component.dto.LegendComponentInfo; //導入依賴的package包/類
protected LegendComponentInfo buildLegend() {
LegendComponentInfo legend = new LegendComponentInfo();
legend.setTitle(MESSAGES.legendTitle());
return legend;
}
示例7: buildLegend
import org.geomajas.plugin.printing.component.dto.LegendComponentInfo; //導入依賴的package包/類
@Override
protected LegendComponentInfo buildLegend(Bbox bounds) {
return buildLegend(); // fall-back
}
示例8: buildLegend
import org.geomajas.plugin.printing.component.dto.LegendComponentInfo; //導入依賴的package包/類
protected LegendComponentInfo buildLegend() {
return new LegendComponentInfo();
}
示例9: buildLegend
import org.geomajas.plugin.printing.component.dto.LegendComponentInfo; //導入依賴的package包/類
protected LegendComponentInfo buildLegend() {
LegendComponentInfo legend = new LegendComponentInfo();
legend.setMapId(mapInfo.getId());
legend.setTag("legend");
return legend;
}