|
|||||||||
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 String |
TYPE
|
Fields inherited from class com.esri.adf.web.data.symbol.WebSymbol |
---|
transparency |
Constructor Summary | |
---|---|
WebPictureMarkerSymbol()
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getFileName()
Returns a String specifying a filename or path. |
BufferedImage |
getImage()
Returns the picture as a buffered image. |
byte[] |
getPicture()
Returns the picture as byte array. |
String |
getType()
Returns the type of the symbol as "PictureMarker" |
URL |
getURL()
Returns the picture URL. |
int |
getWidth()
Unsupported operation for this symbol. |
double |
getXOffset()
Returns the x-axis offset. |
double |
getYOffset()
Returns the y-axis offset. |
int |
hashCode()
|
boolean |
isAntialiasing()
Unsupported operation for this symbol. |
void |
setAntialiasing(boolean antialiasing)
Unsupported operation for this symbol. |
void |
setFileName(String fileName)
Sets the file name containing picture. |
void |
setImage(BufferedImage image)
Sets the picture as a buffered image. |
void |
setPicture(byte[] picture)
Sets the picture as byte array. |
void |
setURL(URL location)
Sets the URL for the picture. |
void |
setWidth(int width)
Unsupported operation for this symbol. |
void |
setXOffset(double xOffset)
Sets the symbol x-axis offset. |
void |
setYOffset(double yOffset)
Sets the symbol y-axis offset. |
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 String TYPE
Constructor Detail |
---|
public WebPictureMarkerSymbol()
Method Detail |
---|
public String getType()
getType
in class WebSymbol
TYPE
public void setWidth(int width)
setWidth
in class WebSymbol
width
- the symbol width in pixels.public int getWidth()
getWidth
in class WebSymbol
public void setAntialiasing(boolean antialiasing)
setAntialiasing
in class WebSymbol
antialiasing
- the antialiasing value, default value is false.WebSymbol.isAntialiasing()
public boolean isAntialiasing()
isAntialiasing
in class WebSymbol
WebSymbol.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(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 URL getURL()
public void setImage(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 BufferedImage getImage()
public void setFileName(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 String getFileName()
public void setXOffset(double xOffset)
xOffset
- the x-axis offset.public double getXOffset()
public void setYOffset(double yOffset)
yOffset
- the y-axis offset.public double getYOffset()
public String toString()
toString
in class WebSymbol
public int hashCode()
hashCode
in class WebSymbol
public boolean equals(Object obj)
equals
in class WebSymbol
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |