Package com.github.weisj.darklaf.icons
Class DarkSVGIcon
java.lang.Object
com.github.weisj.darklaf.icons.DarkSVGIcon
- All Implemented Interfaces:
Serializable,Icon
- Direct Known Subclasses:
ThemedSVGIcon
public class DarkSVGIcon extends Object implements Icon, Serializable
Icon from SVG image.
- Since:
- 2019
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description DarkSVGIcon(URI uri, int displayWidth, int displayHeight)Method to fetch the SVG icon from a url. -
Method Summary
Modifier and Type Method Description DarkSVGIconderive(int width, int height)intgetIconHeight()intgetIconWidth()com.kitfox.svg.app.beans.SVGIcongetSVGIcon()voidpaintIcon(Component c, Graphics g, int x, int y)voidpaintIcon(Component c, Graphics g, int x, int y, double rotation)Paint the icon with rotation.voidsetDisplaySize(int width, int height)
-
Constructor Details
-
DarkSVGIcon
Method to fetch the SVG icon from a url.- Parameters:
uri- the uri from which to fetch the SVG icon.displayWidth- display width of icon.displayHeight- display height of icon.
-
-
Method Details
-
derive
-
setDisplaySize
public void setDisplaySize(int width, int height) -
paintIcon
-
paintIcon
Paint the icon with rotation.- Parameters:
c- the parent component.g- the graphics object.x- the x coordinatey- the y coordinaterotation- the rotation in radians.
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidthin interfaceIcon
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeightin interfaceIcon
-
getSVGIcon
public com.kitfox.svg.app.beans.SVGIcon getSVGIcon()
-