Class FontIcon

  • All Implemented Interfaces:
    javafx.css.Styleable, javafx.event.EventTarget, Icon

    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> iconCode  
      javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> iconColor  
      javafx.beans.property.IntegerProperty iconSize  
      • 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> iconColor  
      protected javafx.css.StyleableIntegerProperty iconSize  
      • Fields inherited from class javafx.scene.Node

        BASELINE_OFFSET_SAME_AS_HEIGHT
    • Constructor Summary

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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<javafx.css.CssMetaData<? extends javafx.css.Styleable,​?>> getClassCssMetaData()  
      java.util.List<javafx.css.CssMetaData<? extends javafx.css.Styleable,​?>> getCssMetaData()  
      org.kordamp.ikonli.Ikon getIconCode()
      Gets the value of the property iconCode.
      javafx.scene.paint.Paint getIconColor()
      Gets the value of the property iconColor.
      java.lang.String getIconLiteral()  
      int getIconSize()
      Gets the value of the property iconSize.
      javafx.beans.property.ObjectProperty<org.kordamp.ikonli.Ikon> iconCodeProperty()  
      javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> iconColorProperty()  
      javafx.beans.property.IntegerProperty iconSizeProperty()  
      static java.lang.IllegalArgumentException invalidDescription​(java.lang.String description, java.lang.Exception e)  
      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 property iconCode.
      void setIconColor​(javafx.scene.paint.Paint paint)
      Sets the value of the property iconColor.
      void setIconLiteral​(java.lang.String iconCode)  
      void setIconSize​(int size)
      Sets the value of the property iconSize.
      java.lang.String toString()  
      • 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
    • Field Detail

      • iconSize

        protected javafx.css.StyleableIntegerProperty iconSize
      • iconColor

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

      • FontIcon

        public FontIcon()
      • FontIcon

        public FontIcon​(java.lang.String iconCode)
      • FontIcon

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

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class javafx.scene.text.Text
      • iconCodeProperty

        public javafx.beans.property.ObjectProperty<org.kordamp.ikonli.Ikon> iconCodeProperty()
        See Also:
        getIconCode(), setIconCode(Ikon)
      • getIconSize

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

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

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

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

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

        public void setIconCode​(org.kordamp.ikonli.Ikon iconCode)
        Sets the value of the property iconCode.
        Property description:
      • getIconLiteral

        public java.lang.String getIconLiteral()
      • setIconLiteral

        public void setIconLiteral​(java.lang.String iconCode)
      • getCssMetaData

        public java.util.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 java.util.List<javafx.css.CssMetaData<? extends javafx.css.Styleable,​?>> getClassCssMetaData()
      • invalidDescription

        public static java.lang.IllegalArgumentException invalidDescription​(java.lang.String description,
                                                                            java.lang.Exception e)