@Override public void visit(Graphic gr) { if (gr.getAnchorPoint() != null) { gr.getAnchorPoint().accept(this); } if (gr.getDisplacement() != null) { gr.getDisplacement().accept(this); } for (ExternalGraphic eg : gr.getExternalGraphics()) { eg.accept(this); } for (Mark m : gr.getMarks()) { m.accept(this); } }
public void visit(Graphic gr) { Graphic copy = null; Displacement displacementCopy = copy(gr.getDisplacement()); ExternalGraphic[] externalGraphicsCopy = copy(gr.getExternalGraphics()); Mark[] marksCopy = copy(gr.getMarks()); Expression opacityCopy = copy(gr.getOpacity()); Expression rotationCopy = copy(gr.getRotation()); Expression sizeCopy = copy(gr.getSize()); AnchorPoint anchorCopy = copy(gr.getAnchorPoint()); // Looks like Symbols are a "view" of marks and external graphics? // Symbol[] symbolCopys = copy( gr.getSymbols() ); copy = sf.createDefaultGraphic(); copy.setDisplacement(displacementCopy); copy.setAnchorPoint(anchorCopy); copy.setExternalGraphics(externalGraphicsCopy); copy.setMarks(marksCopy); copy.setOpacity(opacityCopy); copy.setRotation(rotationCopy); copy.setSize(sizeCopy); // copy.setSymbols(symbolCopys); if (STRICT) { if (!copy.equals(gr)) { throw new IllegalStateException("Was unable to duplicate provided Graphic:" + gr); } } pages.push(copy); }
ExternalGraphic[] externalGraphics = gr.getExternalGraphics(); ExternalGraphic[] externalGraphicsCopy = new ExternalGraphic[externalGraphics.length];
private BufferedImage getExternalGraphic(Graphic graphic) { ExternalGraphic[] extgraphics = graphic.getExternalGraphics(); if (extgraphics != null) { for (int i = 0; i < extgraphics.length; i++) { ExternalGraphic eg = extgraphics[i]; BufferedImage img = getImage(eg, -1); if (img != null) { return img; } } } return null; }
ExternalGraphic[] graphicList = graphic.getExternalGraphics();
for (ExternalGraphic eg : gr.getExternalGraphics()) { gs = getGraphicStyle(eg, feature, graphicSize, 1); if (gs != null) {
&& (symbolizer.getGraphic().getExternalGraphics() != null) && (symbolizer.getGraphic().getExternalGraphics().length > 0)) { ExternalGraphic graphic = symbolizer.getGraphic() .getExternalGraphics()[0];
public void visit(Graphic gr) { Graphic copy = null; Displacement displacementCopy = copy( gr.getDisplacement() ); ExternalGraphic[] externalGraphicsCopy = copy( gr.getExternalGraphics() ); Mark[] marksCopy = copy( gr.getMarks() ); Expression opacityCopy = copy( gr.getOpacity() ); Expression rotationCopy = copy( gr.getRotation() ); Expression sizeCopy = copy( gr.getSize() ); // Looks like Symbols are a "view" of marks and external graphics? // Symbol[] symbolCopys = copy( gr.getSymbols() ); copy = sf.createDefaultGraphic(); copy.setDisplacement(displacementCopy); copy.setExternalGraphics(externalGraphicsCopy); copy.setMarks(marksCopy); copy.setOpacity((Expression) opacityCopy); copy.setRotation((Expression) rotationCopy); copy.setSize((Expression) sizeCopy); // copy.setSymbols(symbolCopys); if( STRICT ){ if( !copy.equals( gr )){ throw new IllegalStateException("Was unable to duplicate provided Graphic:"+gr ); } } pages.push(copy); }
public void setEdited(Graphic graphic) { if (graphic != null) { guiDisplacement.setEdited(graphic.getDisplacement()); guiGeom.setGeom(graphic.getGeometryPropertyName()); guiOpacity.setExpression(graphic.getOpacity()); guiRotation.setExpression(graphic.getRotation()); guiSize.setExpression(graphic.getSize()); // marks and external graphics are symbols so no need to handle this method //graphic.getSymbols(); guiMark.setEdited(graphic.getMarks()); guiExternal.setEdited(graphic.getExternalGraphics()); } this.graphic = graphic; }
ExternalGraphic[] externalGraphics = gr.getExternalGraphics(); ExternalGraphic[] externalGraphicsCopy = new ExternalGraphic[externalGraphics.length];
ExternalGraphic[] externalGraphics = gr.getExternalGraphics(); ExternalGraphic[] externalGraphicsCopy = new ExternalGraphic[externalGraphics.length];
ExternalGraphic[] externalGraphics = gr.getExternalGraphics(); ExternalGraphic[] externalGraphicsCopy = new ExternalGraphic[externalGraphics.length];
@Override public void visit(Graphic gr) { if (gr.getAnchorPoint() != null) { gr.getAnchorPoint().accept(this); } if (gr.getDisplacement() != null) { gr.getDisplacement().accept(this); } for (ExternalGraphic eg : gr.getExternalGraphics()) { eg.accept(this); } if (gr.getGap() != null) { //gr.getGap().accept(visitor, extraData) } if (gr.getInitialGap() != null) { //gr.getInitialGap().accept(visitor, extraData) } for (Mark m : gr.getMarks()) { m.accept(this); } if (gr.getOpacity() != null) { //gr.getOpacity().accept(visitor, extraData) } if (gr.getRotation() != null) { //gr.getRotation().accept(visitor, extraData) } if (gr.getSize() != null) { //gr.getSize().accept(visitor, extraData) } }