Class IkonliGraphicProvider

java.lang.Object
org.tentackle.fx.IkonliGraphicProvider
All Implemented Interfaces:
GraphicProvider
Direct Known Subclasses:
DefaultGraphicProvider

public abstract class IkonliGraphicProvider extends Object implements GraphicProvider
Base implementation of a graphic provider based on ikonli icon fonts.
Author:
harald
  • Constructor Details

    • IkonliGraphicProvider

      public IkonliGraphicProvider()
      Parent constructor.
  • Method Details

    • createGraphic

      public javafx.scene.Node createGraphic(String name)
      Description copied from interface: GraphicProvider
      Creates a graphic node.
      Throws FxRuntimeException, if loading the image failed or no such image found.
      Specified by:
      createGraphic in interface GraphicProvider
      Parameters:
      name - the graphic's name
      Returns:
      the graphic node, never null
    • translateName

      protected abstract String translateName(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. This allows the application to use known icons of the corresponding icon pack.
      Parameters:
      name - the symbolic name
      Returns:
      the possibly translated name