/** Default constructor. Makes sure everything has a default value, to minimize the chance of a NPE. */ public LegendConfig() { fontStyle = new FontStyleInfo(); fontStyle.setColor(DEFAULT_FONT_COLOR); fontStyle.setFamily(DEFAULT_FONT_FAMILY); fontStyle.setOpacity(1); fontStyle.setSize(DEFAULT_FONT_SIZE); fontStyle.setStyle("normal"); fontStyle.setWeight("normal"); fontStyle.applyDefaults(); }
/** Default constructor. Makes sure everything has a default value, to minimize the chance of a NPE. */ public LegendConfig() { fontStyle = new FontStyleInfo(); fontStyle.setColor(DEFAULT_FONT_COLOR); fontStyle.setFamily(DEFAULT_FONT_FAMILY); fontStyle.setOpacity(1); fontStyle.setSize(DEFAULT_FONT_SIZE); fontStyle.setStyle("normal"); fontStyle.setWeight("normal"); fontStyle.applyDefaults(); }
protected MapRasterizingInfo buildMap(MapPresenter mapPresenter) { MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo(); ViewPort viewPort = mapPresenter.getViewPort(); mapRasterizingInfo.setBounds(viewPort.getBounds()); mapRasterizingInfo.setScale(viewPort.getScale()); mapRasterizingInfo.setTransparent(true); LegendRasterizingInfo legendRasterizingInfo = new LegendRasterizingInfo(); legendRasterizingInfo.setTitle("Legend"); FontStyleInfo font = new FontStyleInfo(); font.applyDefaults(); legendRasterizingInfo.setFont(font); mapRasterizingInfo.setLegendRasterizingInfo(legendRasterizingInfo); // Support for selection of layer object : create container for info on selected features; // store the selections layer per layer List<ClientLayerInfo> selectedLayers = new ArrayList<ClientLayerInfo>(); mapRasterizingInfo.setExtraLayers(selectedLayers); ClientMapInfo mapInfo = mapPresenter.getConfiguration().getServerConfiguration(); mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo); // Note: mapRasterizingInfo at this time is pretty empty (rastering info for // layers not yet filled in) return mapRasterizingInfo; }
private MapRasterizingInfo buildMap(MapPresenter mapPresenter) { MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo(); ViewPort viewPort = mapPresenter.getViewPort(); mapRasterizingInfo.setBounds(viewPort.getBounds()); mapRasterizingInfo.setScale(1 / viewPort.getResolution()); mapRasterizingInfo.setTransparent(true); LegendRasterizingInfo legendRasterizingInfo = new LegendRasterizingInfo(); legendRasterizingInfo.setTitle("Legend"); FontStyleInfo font = new FontStyleInfo(); font.applyDefaults(); legendRasterizingInfo.setFont(font); mapRasterizingInfo.setLegendRasterizingInfo(legendRasterizingInfo); // Support for selection of layer object : create container for info on selected features; // store the selections layer per layer List<ClientLayerInfo> selectedLayers = new ArrayList<ClientLayerInfo>(); mapRasterizingInfo.setExtraLayers(selectedLayers); ClientMapInfo mapInfo = mapPresenter.getConfiguration().getHintValue(GeomajasServerExtension.MAPINFO); mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo); // Note: mapRasterizingInfo at this time is pretty empty (rastering info for // layers not yet filled in) return mapRasterizingInfo; }
/** Constructor. */ public ScaleBarComponentInfo() { getLayoutConstraint().setAlignmentX(LayoutConstraintInfo.LEFT); getLayoutConstraint().setAlignmentY(LayoutConstraintInfo.BOTTOM); getLayoutConstraint().setMarginX(20); getLayoutConstraint().setMarginY(20); getLayoutConstraint().setWidth(200); font = new FontStyleInfo(); font.setFamily("Dialog"); font.setStyle("Plain"); font.setSize(10); }
private LabelStyleInfo createRandomLabelStyle(String attributeName) { LabelStyleInfo style = new LabelStyleInfo(); style.setBackgroundStyle(createRandomPolygonStyle()); FontStyleInfo fontStyle = new FontStyleInfo(); fontStyle.setColor(style.getBackgroundStyle().getStrokeColor()); fontStyle.setFamily("Verdana"); fontStyle.setOpacity(1F); fontStyle.setSize(8); fontStyle.setWeight("normal"); fontStyle.setStyle("normal"); style.setFontStyle(fontStyle); style.setLabelAttributeName(attributeName); return style; }
protected LabelComponentInfo buildTitle() { LabelComponentInfo label = new LabelComponentInfo(); FontStyleInfo style = new FontStyleInfo(); style.setFamily(PrintingLayout.templateDefaultFontFamily); style.setStyle(PrintingLayout.templateDefaultFontStyle); style.setSize((int) PrintingLayout.templateDefaultFontSize); label.setFont(style); label.setBackgroundColor(PrintingLayout.templateDefaultBackgroundColor); label.setBorderColor(PrintingLayout.templateDefaultBorderColor); label.setFontColor(PrintingLayout.templateDefaultColor); label.getLayoutConstraint().setAlignmentY(LayoutConstraintInfo.TOP); label.getLayoutConstraint().setAlignmentX(LayoutConstraintInfo.CENTER); label.setTag("title"); return label; } }
/** * Default constructor. */ public LegendComponentInfo() { getLayoutConstraint().setAlignmentX(LayoutConstraintInfo.RIGHT); getLayoutConstraint().setAlignmentY(LayoutConstraintInfo.BOTTOM); getLayoutConstraint().setFlowDirection(LayoutConstraintInfo.FLOW_Y); getLayoutConstraint().setMarginX(20); getLayoutConstraint().setMarginY(20); font = new FontStyleInfo(); font.setFamily("Dialog"); font.setStyle("Plain"); font.setSize(12); }
protected LabelComponentInfo buildTitle() { LabelComponentInfo label = new LabelComponentInfo(); FontStyleInfo style = new FontStyleInfo(); style.setFamily(PrintingLayout.templateDefaultFontFamily); style.setStyle(PrintingLayout.templateDefaultFontStyle); style.setSize((int) PrintingLayout.templateDefaultFontSize); label.setFont(style); label.setBackgroundColor(PrintingLayout.templateDefaultBackgroundColor); label.setBorderColor(PrintingLayout.templateDefaultBorderColor); label.setFontColor(PrintingLayout.templateDefaultColor); label.getLayoutConstraint().setAlignmentY(LayoutConstraintInfo.TOP); label.getLayoutConstraint().setAlignmentX(LayoutConstraintInfo.CENTER); label.setTag("title"); return label; } }
protected LabelComponentInfo buildTitle() { LabelComponentInfo label = new LabelComponentInfo(); FontStyleInfo style = new FontStyleInfo(); style.setFamily(PrintLayout.templateDefaultFontFamily); style.setStyle(PrintLayout.templateDefaultFontStyle); style.setSize((int) PrintLayout.templateDefaultFontSize); label.setFont(style); label.setBackgroundColor(PrintLayout.templateDefaultBackgroundColor); label.setBorderColor(PrintLayout.templateDefaultBorderColor); label.setFontColor(PrintLayout.templateDefaultColor); label.getLayoutConstraint().setAlignmentY(LayoutConstraintInfo.TOP); label.getLayoutConstraint().setAlignmentX(LayoutConstraintInfo.CENTER); label.setTag("title"); return label; } }
protected LabelComponentInfo buildTitle() { LabelComponentInfo label = new LabelComponentInfo(); FontStyleInfo style = new FontStyleInfo(); style.setFamily(PrintingLayout.templateDefaultFontFamily); style.setStyle(PrintingLayout.templateDefaultFontStyle); style.setSize((int) PrintingLayout.templateDefaultFontSize); label.setFont(style); label.setBackgroundColor(PrintingLayout.templateDefaultBackgroundColor); label.setBorderColor(PrintingLayout.templateDefaultBorderColor); label.setFontColor(PrintingLayout.templateDefaultColor); label.getLayoutConstraint().setAlignmentY(LayoutConstraintInfo.TOP); label.getLayoutConstraint().setAlignmentX(LayoutConstraintInfo.CENTER); label.setTag("title"); return label; } }
@Override protected LegendComponentInfo buildLegend() { LegendComponentInfo legend = super.buildLegend(); FontStyleInfo style = new FontStyleInfo(); style.setFamily(PrintingLayout.templateDefaultFontFamily); style.setStyle(PrintingLayout.templateDefaultFontStyle);
@Override protected LegendComponentInfo buildLegend() { LegendComponentInfo legend = super.buildLegend(); FontStyleInfo style = new FontStyleInfo(); style.setFamily(PrintLayout.templateDefaultFontFamily); style.setStyle(PrintLayout.templateDefaultFontStyle);
@Override protected LegendComponentInfo buildLegend() { LegendComponentInfo legend = super.buildLegend(); FontStyleInfo style = new FontStyleInfo(); style.setFamily(PrintingLayout.templateDefaultFontFamily); style.setStyle(PrintingLayout.templateDefaultFontStyle);
@Override protected LegendComponentInfo buildLegend() { LegendComponentInfo legend = super.buildLegend(); FontStyleInfo style = new FontStyleInfo(); style.setFamily(PrintingLayout.templateDefaultFontFamily); style.setStyle(PrintingLayout.templateDefaultFontStyle);