|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.adf.web.data.symbol.WebSymbol
com.esri.adf.web.data.symbol.WebPictureMarkerSymbol
public class WebPictureMarkerSymbol
WebPictureMarkerSymbol is a class used to symbolize point features. This symbol can be created using
one of the following, byte[], URL, file name or a BufferedImage.
If multiple set methods are used then the following order is used to draw the symbol,
1.Warning: The image property of this symbol is not Serializable.getPicture()2.getURL()3.getImage()4.getFileName(). For example, WebMultiPoint points = new WebMultiPoint(); points.addPoint(new WebPoint(50, 50)); points.addPoint(new WebPoint(100, 50)); points.addPoint(new WebPoint(100, 100)); points.addPoint(new WebPoint(50, 100)); WebPictureMarkerSymbol pms = new WebPictureMarkerSymbol(); pms.setAngle(45.0); pms.setFileName("c:/images/myImage.png"); GraphicElement element = new GraphicElement(); element.setGeometry(points); element.setSymbol(pms); WebElementConverter converter = new WebElementConverter(150, 150); converter.draw(element); byte[] image = converter.getPNGImage();
| Field Summary | |
|---|---|
static java.lang.String |
TYPE
|
| Fields inherited from class com.esri.adf.web.data.symbol.WebSymbol |
|---|
transparency |
| Constructor Summary | |
|---|---|
WebPictureMarkerSymbol()
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getFileName()
Returns a String specifying a filename or path. |
java.awt.image.BufferedImage |
getImage()
Returns the picture as a buffered image. |
byte[] |
getPicture()
Returns the picture as byte array. |
java.lang.String |
getType()
Returns the type of the symbol as "PictureMarker" |
java.net.URL |
getURL()
Returns the picture URL. |
int |
getWidth()
Unsupported operation for this symbol. |
int |
hashCode()
|
boolean |
isAntialiasing()
Unsupported operation for this symbol. |
void |
setAntialiasing(boolean antialiasing)
Unsupported operation for this symbol. |
void |
setFileName(java.lang.String fileName)
Sets the file name containing picture. |
void |
setImage(java.awt.image.BufferedImage image)
Sets the picture as a buffered image. |
void |
setPicture(byte[] picture)
Sets the picture as byte array. |
void |
setURL(java.net.URL location)
Sets the URL for the picture. |
void |
setWidth(int width)
Unsupported operation for this symbol. |
java.lang.String |
toString()
|
| Methods inherited from class com.esri.adf.web.data.symbol.WebSymbol |
|---|
getAngle, getTransparency, setAngle, setTransparency |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TYPE
| Constructor Detail |
|---|
public WebPictureMarkerSymbol()
| Method Detail |
|---|
public java.lang.String getType()
getType in class WebSymbolTYPEpublic void setWidth(int width)
setWidth in class WebSymbolwidth - the symbol width in pixelspublic int getWidth()
getWidth in class WebSymbolpublic void setAntialiasing(boolean antialiasing)
setAntialiasing in class WebSymbolantialiasing - the antialiasing value, default value is falseWebSymbol.isAntialiasing()public boolean isAntialiasing()
isAntialiasing in class WebSymbolWebSymbol.setAntialiasing(boolean)public void setPicture(byte[] picture)
For example,
pms.setPicture(com.esri.adf.web.util.ImageUtil.readInputStream(new java.net.URL("http://www.esri.com/graphics/orangearrow_small.gif").openStream()));
picture - the picture to be drawn on picture marker symbolpublic byte[] getPicture()
public void setURL(java.net.URL location)
For example,
pms.setURL(new java.net.URL("http://www.esri.com/graphics/orangearrow_small.gif"));
location - the picture URL used for drawing picture marker symbolpublic java.net.URL getURL()
public void setImage(java.awt.image.BufferedImage image)
For example,
pms.setImage(javax.imageio.ImageIO.read(new java.net.URL("http://www.esri.com/graphics/orangearrow_small.gif")));
GraphicsUtil.exportSymbol(pms, 100, 100);
image - the buffered image used for drawing picture marker symbolpublic java.awt.image.BufferedImage getImage()
public void setFileName(java.lang.String fileName)
For example,
pms.setFileName("c:/images/myImage.png");
or relative URL
pms.setFileName("/images/myImage.png");
fileName - the name of the file containing the picturepublic java.lang.String getFileName()
public java.lang.String toString()
toString in class WebSymbolpublic int hashCode()
hashCode in class WebSymbolpublic boolean equals(java.lang.Object obj)
equals in class WebSymbol
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||