SVGImageView can display svg icons in high definition, and they won't become blurry even when zoomed in.
Note for SvgImageView: Currently, due to the limitation that weisj can only render BufferedImage from SVG, SvgImageView does not support usage in native packaging scenarios.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final BooleanProperty | |
| private static final boolean | |
| private static final double | |
| private static final double | |
| private static final boolean | |
| private static final boolean | |
| private static final String | |
| private final DoubleProperty | |
| private final DoubleProperty | |
| private final BooleanProperty | |
| private final BooleanProperty | |
| private final StringProperty | |
| private static final Pattern |
| Access | Constructor and Description |
|---|---|
| public | |
| public | SVGImageView(String
the url of the SVG image to be rendered url)Constructs a new SVGImageView with the given SVG url. |
| Modifier and Type | Method and Description |
|---|---|
| public final BooleanProperty | backgroundLoadingProperty()
A property that indicates whether the SVG image should be loaded in the background. |
| private static String | |
| protected Skin | createDefaultSkin()
Overrides javafx. Create a new instance of the default skin for this control. |
| public final DoubleProperty | |
| public final DoubleProperty | |
| public static List | Returns: A list ofCssMetaData objects containing the CSS metadata.Hides javafx. Returns the CSS metadata associated with this class. |
| protected List | getControlCssMetaData()
Overrides javafx. Gets the unmodifiable list of the control's CSS-styleable properties. |
| public final double | |
| public final double | |
| public final String | |
| public final boolean | Returns: The background loading value.Gets the value of the backgroundLoading property. |
| public final boolean | Returns: The preserve ratio value.Gets the value of the |
| public final boolean | |
| public final BooleanProperty | preserveRatioProperty()
A property that determines whether the image should maintain its aspect ratio or not. |
| public final void | setBackgroundLoading(boolean
The background loading value. backgroundLoading)Sets the value of the backgroundLoading property. |
| public final void | setFitHeight(double
the "fit height" value fitHeight)Sets the value of the |
| public final void | |
| public final void | setPreserveRatio(boolean
the preserve ratio value. preserveRatio)Sets the value of the preserveRatio property. |
| public final void | |
| public final void | |
| public final BooleanProperty | smoothProperty()
A property that determines whether the SVG image should be rendered using a smoothing algorithm. |
| public final StringProperty | |
| private static String |
| backgroundLoading | back to summary |
|---|---|
| private final BooleanProperty backgroundLoading | |
| DEFAULT_BACKGROUND_LOADING | back to summary |
|---|---|
| private static final boolean DEFAULT_BACKGROUND_LOADING | |
| DEFAULT_FIT_HEIGHT | back to summary |
|---|---|
| private static final double DEFAULT_FIT_HEIGHT | |
| DEFAULT_FIT_WIDTH | back to summary |
|---|---|
| private static final double DEFAULT_FIT_WIDTH | |
| DEFAULT_PRESERVE_RATIO | back to summary |
|---|---|
| private static final boolean DEFAULT_PRESERVE_RATIO | |
| DEFAULT_SMOOTH | back to summary |
|---|---|
| private static final boolean DEFAULT_SMOOTH | |
| DEFAULT_STYLE_CLASS | back to summary |
|---|---|
| private static final String DEFAULT_STYLE_CLASS | |
| fitHeight | back to summary |
|---|---|
| private final DoubleProperty fitHeight | |
| fitWidth | back to summary |
|---|---|
| private final DoubleProperty fitWidth | |
| preserveRatio | back to summary |
|---|---|
| private final BooleanProperty preserveRatio | |
| smooth | back to summary |
|---|---|
| private final BooleanProperty smooth | |
| svgUrl | back to summary |
|---|---|
| private final StringProperty svgUrl | |
| URL_QUICKMATCH | back to summary |
|---|---|
| private static final Pattern URL_QUICKMATCH | |
| SVGImageView | back to summary |
|---|---|
| public SVGImageView() Constructs a new SVGImageView. | |
| SVGImageView | back to summary |
|---|---|
| public SVGImageView(String url) Constructs a new SVGImageView with the given SVG url.
| |
| backgroundLoadingProperty | back to summary |
|---|---|
| public final BooleanProperty backgroundLoadingProperty() A property that indicates whether the SVG image should be loaded in the background. When set to true, the image is loaded in a background thread, allowing for asynchronous loading of images. defaultValue false | |
| constructDetailedExceptionMessage | back to summary |
|---|---|
| private static String constructDetailedExceptionMessage(final String mainMessage, final Throwable cause) | |
| createDefaultSkin | back to summary |
|---|---|
| protected Skin Overrides javafx. Doc from javafx. Create a new instance of the default skin for this control. This is called to create a skin for the control if
no skin is provided via CSS
| |
| fitHeightProperty | back to summary |
|---|---|
| public final DoubleProperty fitHeightProperty() Defines the height of the box that the source svg image should fit into. If the value is <= 0, the svg image's intrinsic height will be used.
When The default value is 0. | |
| fitWidthProperty | back to summary |
|---|---|
| public final DoubleProperty fitWidthProperty() Defines the width of the box that the source svg image should fit into. If the value is <= 0, the svg image's intrinsic width will be used.
When The default value is 0. | |
| getClassCssMetaData | back to summary |
|---|---|
| public static List Hides javafx. Returns the CSS metadata associated with this class.
| |
| getControlCssMetaData | back to summary |
|---|---|
| protected List Overrides javafx. Doc from javafx. Gets the unmodifiable list of the control's CSS-styleable properties.
| |
| getFitHeight | back to summary |
|---|---|
| public final double getFitHeight() Gets the value of
| |
| getFitWidth | back to summary |
|---|---|
| public final double getFitWidth() Gets the value of
| |
| getSvgUrl | back to summary |
|---|---|
| public final String getSvgUrl() Gets the value of the svgUrl property.
| |
| isBackgroundLoading | back to summary |
|---|---|
| public final boolean isBackgroundLoading() Gets the value of the backgroundLoading property.
| |
| isPreserveRatio | back to summary |
|---|---|
| public final boolean isPreserveRatio() Gets the value of the
| |
| isSmooth | back to summary |
|---|---|
| public final boolean isSmooth() Gets the value of the smooth property.
| |
| preserveRatioProperty | back to summary |
|---|---|
| public final BooleanProperty preserveRatioProperty() A property that determines whether the image should maintain its aspect ratio or not. When set to true, the image will preserve its aspect ratio. When set to false, the image may be stretched or compressed to fit the specified dimensions, without preserving its aspect ratio. The default value is false | |
| setBackgroundLoading | back to summary |
|---|---|
| public final void setBackgroundLoading(boolean backgroundLoading) Sets the value of the backgroundLoading property.
| |
| setFitHeight | back to summary |
|---|---|
| public final void setFitHeight(double fitHeight) Sets the value of the
| |
| setFitWidth | back to summary |
|---|---|
| public final void setFitWidth(double width) Sets the value of the
| |
| setPreserveRatio | back to summary |
|---|---|
| public final void setPreserveRatio(boolean preserveRatio) Sets the value of the preserveRatio property.
| |
| setSmooth | back to summary |
|---|---|
| public final void setSmooth(boolean smooth) Sets the value of the smooth property.
| |
| setSvgUrl | back to summary |
|---|---|
| public final void setSvgUrl(String svgUrl) Sets the value of the svgUrl property.
| |
| smoothProperty | back to summary |
|---|---|
| public final BooleanProperty smoothProperty() A property that determines whether the SVG image should be rendered using a smoothing algorithm. If true, the image will be rendered with smoothing applied, which can improve the visual quality but may reduce performance. defaultValue true | |
| svgUrlProperty | back to summary |
|---|---|
| public final StringProperty svgUrlProperty() A property that holds the URL of the SVG image to be rendered. Changing the URL will result in loading and rendering the new SVG image. defaultValue null | |
| validateUrl | back to summary |
|---|---|
| private static String validateUrl(final String url) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final CssMetaData | |
| public static final CssMetaData | |
| public static final CssMetaData | |
| private static final CssMetaData | |
| private static final CssMetaData | |
| private static final List | |
| private static final CssMetaData |
| Access | Constructor and Description |
|---|---|
| private |
| BACKGROUND_LOADING | back to summary |
|---|---|
| public static final CssMetaData<? extends Styleable, Boolean> BACKGROUND_LOADING | |
| FIT_HEIGHT | back to summary |
|---|---|
| public static final CssMetaData<SVGImageView, Number> FIT_HEIGHT | |
| FIT_WIDTH | back to summary |
|---|---|
| public static final CssMetaData<SVGImageView, Number> FIT_WIDTH | |
| PRESERVE_RATIO | back to summary |
|---|---|
| private static final CssMetaData<SVGImageView, Boolean> PRESERVE_RATIO | |
| SMOOTH | back to summary |
|---|---|
| private static final CssMetaData<SVGImageView, Boolean> SMOOTH | |
| STYLEABLES | back to summary |
|---|---|
| private static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES | |
| SVG_URL | back to summary |
|---|---|
| private static final CssMetaData<SVGImageView, String> SVG_URL | |
| StyleableProperties | back to summary |
|---|---|
| private StyleableProperties() | |