Class FontIcon

java.lang.Object
javafx.scene.Node
javafx.scene.shape.Shape
javafx.scene.text.Text
org.kordamp.ikonli.javafx.FontIcon
All Implemented Interfaces:
javafx.css.Styleable, javafx.event.EventTarget, Icon

@NativeImage public class FontIcon extends javafx.scene.text.Text implements Icon
Author:
Andres Almiray
  • Property Summary

    Properties
    Type
    Property
    Description
    javafx.beans.property.ObjectProperty<org.kordamp.ikonli.Ikon>
     
    javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint>
     
    javafx.beans.property.IntegerProperty
     
    javafx.beans.property.StringProperty
     

    Properties inherited from class javafx.scene.text.Text

    baselineOffset, boundsType, caretBias, caretPosition, caretShape, font, fontSmoothingType, lineSpacing, selectionEnd, selectionFill, selectionShape, selectionStart, strikethrough, textAlignment, textOrigin, text, underline, wrappingWidth, x, y

    Properties inherited from class javafx.scene.shape.Shape

    fill, smooth, strokeDashOffset, strokeLineCap, strokeLineJoin, strokeMiterLimit, stroke, strokeType, strokeWidth

    Properties inherited from class javafx.scene.Node

    accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected javafx.css.StyleableObjectProperty<javafx.scene.paint.Paint>
     
    protected javafx.css.StyleableIntegerProperty
     

    Fields inherited from class javafx.scene.Node

    BASELINE_OFFSET_SAME_AS_HEIGHT
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    FontIcon(String iconCode)
     
    FontIcon(org.kordamp.ikonli.Ikon iconCode)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>>
     
    List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>>
     
    org.kordamp.ikonli.Ikon
    Gets the value of the iconCode property.
    javafx.scene.paint.Paint
    Gets the value of the iconColor property.
     
    int
    Gets the value of the iconSize property.
    javafx.beans.property.ObjectProperty<org.kordamp.ikonli.Ikon>
     
    javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint>
     
    javafx.beans.property.IntegerProperty
     
     
    static FontIcon
    of(org.kordamp.ikonli.Ikon ikon)
     
    static FontIcon
    of(org.kordamp.ikonli.Ikon ikon, int iconSize)
     
    static FontIcon
    of(org.kordamp.ikonli.Ikon iconCode, int iconSize, javafx.scene.paint.Color iconColor)
     
    static FontIcon
    of(org.kordamp.ikonli.Ikon ikon, javafx.scene.paint.Color iconColor)
     
    void
    setIconCode(org.kordamp.ikonli.Ikon iconCode)
    Sets the value of the iconCode property.
    void
    setIconColor(javafx.scene.paint.Paint paint)
    Sets the value of the iconColor property.
    void
     
    void
    setIconSize(int size)
    Sets the value of the iconSize property.
     
    javafx.beans.property.StringProperty
     

    Methods inherited from class javafx.scene.text.Text

    baselineOffsetProperty, boundsTypeProperty, caretBiasProperty, caretPositionProperty, caretShape, caretShapeProperty, fontProperty, fontSmoothingTypeProperty, getBaselineOffset, getBoundsType, getCaretPosition, getCaretShape, getFont, getFontSmoothingType, getLineSpacing, getSelectionEnd, getSelectionFill, getSelectionShape, getSelectionStart, getText, getTextAlignment, getTextOrigin, getWrappingWidth, getX, getY, hitTest, isCaretBias, isStrikethrough, isUnderline, lineSpacingProperty, queryAccessibleAttribute, rangeShape, selectionEndProperty, selectionFillProperty, selectionShapeProperty, selectionStartProperty, setBoundsType, setCaretBias, setCaretPosition, setFont, setFontSmoothingType, setLineSpacing, setSelectionEnd, setSelectionFill, setSelectionStart, setStrikethrough, setText, setTextAlignment, setTextOrigin, setUnderline, setWrappingWidth, setX, setY, strikethroughProperty, textAlignmentProperty, textOriginProperty, textProperty, underlineProperty, underlineShape, usesMirroring, wrappingWidthProperty, xProperty, yProperty

    Methods inherited from class javafx.scene.shape.Shape

    fillProperty, getFill, getStroke, getStrokeDashArray, getStrokeDashOffset, getStrokeLineCap, getStrokeLineJoin, getStrokeMiterLimit, getStrokeType, getStrokeWidth, intersect, isSmooth, setFill, setSmooth, setStroke, setStrokeDashOffset, setStrokeLineCap, setStrokeLineJoin, setStrokeMiterLimit, setStrokeType, setStrokeWidth, smoothProperty, strokeDashOffsetProperty, strokeLineCapProperty, strokeLineJoinProperty, strokeMiterLimitProperty, strokeProperty, strokeTypeProperty, strokeWidthProperty, subtract, union

    Methods inherited from class javafx.scene.Node

    accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isResizable, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookup, lookupAll, managedProperty, maxHeight, maxWidth, minHeight, minWidth, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, prefHeight, prefWidth, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resize, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, translateXProperty, translateYProperty, translateZProperty, viewOrderProperty, visibleProperty

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface javafx.css.Styleable

    getId, getPseudoClassStates, getStyle, getStyleableNode, getStyleableParent, getStyleClass, getTypeSelector
  • Property Details

  • Field Details

    • iconSize

      protected javafx.css.StyleableIntegerProperty iconSize
    • iconColor

      protected javafx.css.StyleableObjectProperty<javafx.scene.paint.Paint> iconColor
  • Constructor Details

    • FontIcon

      public FontIcon()
    • FontIcon

      public FontIcon(String iconCode)
    • FontIcon

      public FontIcon(org.kordamp.ikonli.Ikon iconCode)
  • Method Details

    • unitsProperty

      public javafx.beans.property.StringProperty unitsProperty()
      Returns:
      the units property
    • toString

      public String toString()
      Overrides:
      toString in class javafx.scene.text.Text
    • iconSizeProperty

      public javafx.beans.property.IntegerProperty iconSizeProperty()
      Specified by:
      iconSizeProperty in interface Icon
      Returns:
      the iconSize property
      See Also:
    • iconColorProperty

      public javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> iconColorProperty()
      Specified by:
      iconColorProperty in interface Icon
      Returns:
      the iconColor property
      See Also:
    • iconCodeProperty

      public javafx.beans.property.ObjectProperty<org.kordamp.ikonli.Ikon> iconCodeProperty()
      Returns:
      the iconCode property
      See Also:
    • getIconSize

      public int getIconSize()
      Gets the value of the iconSize property.
      Specified by:
      getIconSize in interface Icon
      Property description:
      Returns:
      the value of the iconSize property
      See Also:
    • setIconSize

      public void setIconSize(int size)
      Sets the value of the iconSize property.
      Specified by:
      setIconSize in interface Icon
      Property description:
      Parameters:
      size - the value for the iconSize property
      See Also:
    • getIconColor

      public javafx.scene.paint.Paint getIconColor()
      Gets the value of the iconColor property.
      Specified by:
      getIconColor in interface Icon
      Property description:
      Returns:
      the value of the iconColor property
      See Also:
    • setIconColor

      public void setIconColor(javafx.scene.paint.Paint paint)
      Sets the value of the iconColor property.
      Specified by:
      setIconColor in interface Icon
      Property description:
      Parameters:
      paint - the value for the iconColor property
      See Also:
    • getIconCode

      public org.kordamp.ikonli.Ikon getIconCode()
      Gets the value of the iconCode property.
      Property description:
      Returns:
      the value of the iconCode property
      See Also:
    • setIconCode

      public void setIconCode(org.kordamp.ikonli.Ikon iconCode)
      Sets the value of the iconCode property.
      Property description:
      Parameters:
      iconCode - the value for the iconCode property
      See Also:
    • getIconLiteral

      public String getIconLiteral()
    • setIconLiteral

      public void setIconLiteral(String iconCode)
    • getCssMetaData

      public List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> getCssMetaData()
      Specified by:
      getCssMetaData in interface javafx.css.Styleable
      Overrides:
      getCssMetaData in class javafx.scene.text.Text
    • of

      public static FontIcon of(org.kordamp.ikonli.Ikon ikon)
    • of

      public static FontIcon of(org.kordamp.ikonli.Ikon ikon, int iconSize)
    • of

      public static FontIcon of(org.kordamp.ikonli.Ikon ikon, javafx.scene.paint.Color iconColor)
    • of

      public static FontIcon of(org.kordamp.ikonli.Ikon iconCode, int iconSize, javafx.scene.paint.Color iconColor)
    • getClassCssMetaData

      public static List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> getClassCssMetaData()
    • invalidDescription

      public static IllegalArgumentException invalidDescription(String description, Exception e)