- java.lang.Object
-
- javafx.scene.Node
-
- javafx.scene.shape.Shape
-
- javafx.scene.text.Text
-
- org.kordamp.ikonli.javafx.FontIcon
-
- All Implemented Interfaces:
Styleable,EventTarget,Icon
public class FontIcon extends Text implements Icon
- Author:
- Andres Almiray
-
-
Property Summary
Properties Type Property Description ObjectProperty<org.kordamp.ikonli.Ikon>iconCodeObjectProperty<Paint>iconColorIntegerPropertyiconSize-
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 StyleableObjectProperty<Paint>iconColorprotected StyleableIntegerPropertyiconSize-
Fields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<CssMetaData<? extends Styleable,?>>getClassCssMetaData()List<CssMetaData<? extends Styleable,?>>getCssMetaData()org.kordamp.ikonli.IkongetIconCode()Gets the value of the property iconCode.ObjectProperty<org.kordamp.ikonli.Ikon>getIconCodeProperty()PaintgetIconColor()Gets the value of the property iconColor.StringgetIconLiteral()intgetIconSize()Gets the value of the property iconSize.ObjectProperty<org.kordamp.ikonli.Ikon>iconCodeProperty()ObjectProperty<Paint>iconColorProperty()IntegerPropertyiconSizeProperty()static IllegalArgumentExceptioninvalidDescription(String description, Exception e)static FontIconof(org.kordamp.ikonli.Ikon ikon)static FontIconof(org.kordamp.ikonli.Ikon ikon, int iconSize)static FontIconof(org.kordamp.ikonli.Ikon iconCode, int iconSize, Color iconColor)static FontIconof(org.kordamp.ikonli.Ikon ikon, Color iconColor)voidsetIconCode(org.kordamp.ikonli.Ikon iconCode)Sets the value of the property iconCode.voidsetIconColor(Paint paint)Sets the value of the property iconColor.voidsetIconLiteral(String iconCode)voidsetIconSize(int size)Sets the value of the property iconSize.StringtoString()-
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 Detail
-
iconSize
public IntegerProperty iconSizeProperty
- Specified by:
iconSizePropertyin interfaceIcon- See Also:
getIconSize(),setIconSize(int)
-
iconColor
public ObjectProperty<Paint> iconColorProperty
- Specified by:
iconColorPropertyin interfaceIcon- See Also:
getIconColor(),setIconColor(Paint)
-
iconCode
public ObjectProperty<org.kordamp.ikonli.Ikon> iconCodeProperty
- See Also:
getIconCode(),setIconCode(Ikon)
-
-
Field Detail
-
iconSize
protected StyleableIntegerProperty iconSize
-
iconColor
protected StyleableObjectProperty<Paint> iconColor
-
-
Constructor Detail
-
FontIcon
public FontIcon()
-
FontIcon
public FontIcon(String iconCode)
-
FontIcon
public FontIcon(org.kordamp.ikonli.Ikon iconCode)
-
-
Method Detail
-
of
public static FontIcon of(org.kordamp.ikonli.Ikon ikon)
-
of
public static FontIcon of(org.kordamp.ikonli.Ikon ikon, int iconSize)
-
iconSizeProperty
public IntegerProperty iconSizeProperty()
- Specified by:
iconSizePropertyin interfaceIcon- See Also:
getIconSize(),setIconSize(int)
-
iconColorProperty
public ObjectProperty<Paint> iconColorProperty()
- Specified by:
iconColorPropertyin interfaceIcon- See Also:
getIconColor(),setIconColor(Paint)
-
iconCodeProperty
public ObjectProperty<org.kordamp.ikonli.Ikon> iconCodeProperty()
- See Also:
getIconCode(),setIconCode(Ikon)
-
getIconCodeProperty
public ObjectProperty<org.kordamp.ikonli.Ikon> getIconCodeProperty()
-
setIconSize
public void setIconSize(int size)
Sets the value of the property iconSize.- Specified by:
setIconSizein interfaceIcon- Property description:
-
getIconSize
public int getIconSize()
Gets the value of the property iconSize.- Specified by:
getIconSizein interfaceIcon- Property description:
-
setIconColor
public void setIconColor(Paint paint)
Sets the value of the property iconColor.- Specified by:
setIconColorin interfaceIcon- Property description:
-
getIconColor
public Paint getIconColor()
Gets the value of the property iconColor.- Specified by:
getIconColorin interfaceIcon- 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:
-
setIconLiteral
public void setIconLiteral(String iconCode)
-
getIconLiteral
public String getIconLiteral()
-
getClassCssMetaData
public static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
-
getCssMetaData
public List<CssMetaData<? extends Styleable,?>> getCssMetaData()
- Specified by:
getCssMetaDatain interfaceStyleable- Overrides:
getCssMetaDatain classText
-
invalidDescription
public static IllegalArgumentException invalidDescription(String description, Exception e)
-
-