com.esri.adf.web.data
Class WebElementConverter

java.lang.Object
  extended by com.esri.adf.web.data.WebElementConverter

public class WebElementConverter
extends Object

WebElementConverter that is used for drawing a GraphicElement on a bitmap image.


Constructor Summary
WebElementConverter(int imageWidth, int imageHeight)
          Creates an instance of WebElementConverter.
 
Method Summary
 void draw(GraphicElement element)
          Draws the given element on the image.
 BufferedImage getBufferedImage()
          Returns the image as BufferedImage.
 int getImageHeight()
          Returns image height.
 int getImageWidth()
          Returns image width.
 byte[] getPNGImage()
          Returns the PNG image as a byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebElementConverter

public WebElementConverter(int imageWidth,
                           int imageHeight)
Creates an instance of WebElementConverter.

Parameters:
imageWidth - width of the image.
imageHeight - height of the image
Method Detail

getImageWidth

public int getImageWidth()
Returns image width.

Returns:
image width.

getImageHeight

public int getImageHeight()
Returns image height.

Returns:
image height

draw

public void draw(GraphicElement element)
          throws Exception
Draws the given element on the image.

Parameters:
element - an element
Throws:
Exception - exception is thrown if the appropriate symbol is not used for the geometry. For Example use WebSimpleMarkerSymbol, WebPictureMarkerSymbol or WebTrueTypeMarkerSymbol for WebPoint.

getPNGImage

public byte[] getPNGImage()
Returns the PNG image as a byte array.

Returns:
image as the byte array.

getBufferedImage

public BufferedImage getBufferedImage()
Returns the image as BufferedImage.

Returns:
the image as BufferedImage