Package org.openpnp.gui.support
Class SvgIcon
- java.lang.Object
 - 
- org.openpnp.gui.support.SvgIcon
 
 
- 
- All Implemented Interfaces:
 javax.swing.Icon
public class SvgIcon extends java.lang.Object implements javax.swing.IconA Swing Icon that draws an SVG image. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classSvgIcon.BufferedImageTranscoderA transcoder that generates a BufferedImage. 
- 
Field Summary
Fields Modifier and Type Field Description protected java.awt.image.BufferedImagebufferedImageThe BufferedImage generated from the SVG document.protected java.awt.ImagebufferedImageDisabledprotected intheightThe height of the rendered image.protected intwidthThe width of the rendered image. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidgenerateBufferedImage(org.apache.batik.transcoder.TranscoderInput in, int w, int h)Generate the BufferedImage.intgetIconHeight()Returns the icon's height.intgetIconWidth()Returns the icon's width.voidpaintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)Draw the icon at the specified location. 
 - 
 
- 
- 
Field Detail
- 
bufferedImage
protected java.awt.image.BufferedImage bufferedImage
The BufferedImage generated from the SVG document. 
- 
bufferedImageDisabled
protected java.awt.Image bufferedImageDisabled
 
- 
width
protected int width
The width of the rendered image. 
- 
height
protected int height
The height of the rendered image. 
 - 
 
- 
Method Detail
- 
generateBufferedImage
protected void generateBufferedImage(org.apache.batik.transcoder.TranscoderInput in, int w, int h) throws org.apache.batik.transcoder.TranscoderExceptionGenerate the BufferedImage.- Throws:
 org.apache.batik.transcoder.TranscoderException
 
- 
getIconWidth
public int getIconWidth()
Returns the icon's width.- Specified by:
 getIconWidthin interfacejavax.swing.Icon
 
- 
getIconHeight
public int getIconHeight()
Returns the icon's height.- Specified by:
 getIconHeightin interfacejavax.swing.Icon
 
- 
paintIcon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)Draw the icon at the specified location.- Specified by:
 paintIconin interfacejavax.swing.Icon
 
 - 
 
 -