Class SVGIcon
java.lang.Object
org.apache.batik.bridge.UserAgentAdapter
de.klassenserver7b.danceinterpreter.graphics.util.icons.SVGIcon
- All Implemented Interfaces:
Icon,org.apache.batik.bridge.UserAgent
A Swing Icon that draws an SVG image.
- Author:
- Cameron McCormack
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classA transcoder that generates a BufferedImage. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BufferedImageThe BufferedImage generated from the SVG document.protected intThe height of the rendered image.protected intThe width of the rendered image.Fields inherited from class org.apache.batik.bridge.UserAgentAdapter
ctx, extensions, FEATURES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidgenerateBufferedImage(org.apache.batik.transcoder.TranscoderInput in, int w, int h) Generate the BufferedImage.intReturns the icon's height.intReturns the icon's width.getImage()Returns the default size of this user agent.voidDraw the icon at the specified location.Methods inherited from class org.apache.batik.bridge.UserAgentAdapter
addStdFeatures, checkLoadExternalResource, checkLoadScript, deselectAll, displayError, displayError, displayMessage, getAlternateStyleSheet, getBolderFontWeight, getBrokenLinkDocument, getClientAreaLocationOnScreen, getDefaultFontFamily, getEventDispatcher, getExternalResourceSecurity, getFontFamilyResolver, getLanguages, getLighterFontWeight, getMedia, getMediumFontSize, getPixelToMM, getPixelUnitToMillimeter, getScriptSecurity, getStandardBolderFontWeight, getStandardLighterFontWeight, getTransform, getUserStyleSheetURI, getXMLParserClassName, handleElement, hasFeature, isXMLParserValidating, loadDocument, openLink, registerExtension, runThread, setBridgeContext, setSVGCursor, setTextSelection, setTransform, showAlert, showConfirm, showPrompt, showPrompt, supportExtension
-
Field Details
-
bufferedImage
The BufferedImage generated from the SVG document. -
width
protected int widthThe width of the rendered image. -
height
protected int heightThe height of the rendered image.
-
-
Constructor Details
-
SVGIcon
Create a new SVGIcon object.- Parameters:
uri- The URI to read the SVG document from.- Throws:
org.apache.batik.transcoder.TranscoderException
-
SVGIcon
Create a new SVGIcon object.- Parameters:
uri- The URI to read the SVG document from.w- The width of the icon.h- The height of the icon.- Throws:
org.apache.batik.transcoder.TranscoderException
-
SVGIcon
Create a new SVGIcon object.- Parameters:
doc- The SVG document.- Throws:
org.apache.batik.transcoder.TranscoderException
-
SVGIcon
Create a new SVGIcon object.- Parameters:
doc- The SVG document.w- The width of the icon.h- The height of the icon.- Throws:
org.apache.batik.transcoder.TranscoderException
-
-
Method Details
-
generateBufferedImage
protected void generateBufferedImage(org.apache.batik.transcoder.TranscoderInput in, int w, int h) throws org.apache.batik.transcoder.TranscoderException Generate the BufferedImage.- Throws:
org.apache.batik.transcoder.TranscoderException
-
getIconWidth
public int getIconWidth()Returns the icon's width.- Specified by:
getIconWidthin interfaceIcon
-
getIconHeight
public int getIconHeight()Returns the icon's height.- Specified by:
getIconHeightin interfaceIcon
-
paintIcon
Draw the icon at the specified location. -
getImage
-
getViewportSize
Returns the default size of this user agent.- Specified by:
getViewportSizein interfaceorg.apache.batik.bridge.UserAgent- Overrides:
getViewportSizein classorg.apache.batik.bridge.UserAgentAdapter
-