當前位置: 首頁>>代碼示例>>Java>>正文


Java LegendComponentInfo類代碼示例

本文整理匯總了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;
}
 
開發者ID:geomajas,項目名稱:geomajas-project-client-gwt2,代碼行數:20,代碼來源:AbstractTemplateBuilder.java

示例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;
}
 
開發者ID:geomajas,項目名稱:geomajas-project-client-gwt,代碼行數:11,代碼來源:DefaultTemplateBuilder.java

示例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;
}
 
開發者ID:geomajas,項目名稱:geomajas-project-client-gwt2,代碼行數:11,代碼來源:DefaultTemplateBuilder.java

示例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());
}
 
開發者ID:geomajas,項目名稱:geomajas-project-server,代碼行數:8,代碼來源:LegendComponentImpl.java

示例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;
}
 
開發者ID:geomajas,項目名稱:geomajas-project-server,代碼行數:36,代碼來源:TestTemplateBuilder.java

示例6: buildLegend

import org.geomajas.plugin.printing.component.dto.LegendComponentInfo; //導入依賴的package包/類
protected LegendComponentInfo buildLegend() {
	LegendComponentInfo legend = new LegendComponentInfo();
	legend.setTitle(MESSAGES.legendTitle());
	return legend;
}
 
開發者ID:geomajas,項目名稱:geomajas-project-client-gwt,代碼行數:6,代碼來源:AbstractTemplateBuilder.java

示例7: buildLegend

import org.geomajas.plugin.printing.component.dto.LegendComponentInfo; //導入依賴的package包/類
@Override
protected LegendComponentInfo buildLegend(Bbox bounds) {
	return buildLegend(); // fall-back
}
 
開發者ID:geomajas,項目名稱:geomajas-project-client-gwt2,代碼行數:5,代碼來源:DefaultTemplateBuilder.java

示例8: buildLegend

import org.geomajas.plugin.printing.component.dto.LegendComponentInfo; //導入依賴的package包/類
protected LegendComponentInfo buildLegend() {
	return new LegendComponentInfo();
}
 
開發者ID:geomajas,項目名稱:geomajas-project-client-gwt2,代碼行數:4,代碼來源:AbstractTemplateBuilder.java

示例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;
}
 
開發者ID:geomajas,項目名稱:geomajas-project-server,代碼行數:7,代碼來源:TestTemplateBuilder.java


注:本文中的org.geomajas.plugin.printing.component.dto.LegendComponentInfo類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。