📄 webgraphicsgecollection.java
字号:
package com.esri.solutions.jitk.data.svg.exporter;
import java.util.List;
import com.esri.adf.web.data.GraphicElement;
import com.esri.adf.web.data.WebContext;
import com.esri.solutions.jitk.web.tasks.IWebContextAware;
public class WebGraphicsGECollection implements IWebContextAware, IGraphicElementCollection {
protected WebContext context;
protected List<GraphicElement> graphicElements = null;
protected String graphicsLayerName = "";
public WebContext getContext() {
return context;
}
public void setContext(WebContext context) {
this.context = context;
}
public void setGraphicsLayerName(String graphicsLayerName) {
this.graphicsLayerName = graphicsLayerName;
}
private List<GraphicElement> getGraphicElements() {
if(graphicsLayerName.equalsIgnoreCase("PointGraphics"))
return context.getWebGraphics().getPointGraphics();
else if(graphicsLayerName.equalsIgnoreCase("LineGraphics"))
return context.getWebGraphics().getLineGraphics();
else if(graphicsLayerName.equalsIgnoreCase("PolygonGraphics"))
return context.getWebGraphics().getPolygonGraphics();
return null;
}
public GraphicElement get(int i) {
if(graphicElements == null)
graphicElements = getGraphicElements();
return (graphicElements != null) ? graphicElements.get(i) : null;
}
public int size() {
if(graphicElements == null)
graphicElements = getGraphicElements();
return (graphicElements != null) ? graphicElements.size() : 0;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -