java.lang.Object
org.tentackle.fx.IkonliGraphicProvider
- All Implemented Interfaces:
GraphicProvider
- Direct Known Subclasses:
DefaultGraphicProvider
Base implementation of a graphic provider based on ikonli icon fonts.
- Author:
- harald
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavafx.scene.NodecreateGraphic(String name) Creates a graphic node.
ThrowsFxRuntimeException, if loading the image failed or no such image found.protected abstract StringtranslateName(String name) Translates the symbolic Tentackle icon name to the corresponding name of the icon pack.
If the name is not one of the names used by the framework, it is returned unchanged.
-
Constructor Details
-
IkonliGraphicProvider
public IkonliGraphicProvider()Parent constructor.
-
-
Method Details
-
createGraphic
Description copied from interface:GraphicProviderCreates a graphic node.
ThrowsFxRuntimeException, if loading the image failed or no such image found.- Specified by:
createGraphicin interfaceGraphicProvider- Parameters:
name- the graphic's name- Returns:
- the graphic node, never null
-
translateName
Translates the symbolic Tentackle icon name to the corresponding name of the icon pack.
If the name is not one of the names used by the framework, it is returned unchanged. This allows the application to use known icons of the corresponding icon pack.- Parameters:
name- the symbolic name- Returns:
- the possibly translated name
-