Module MaterialFX

Class MFXIconWrapper

All Implemented Interfaces:
Styleable, EventTarget

public class MFXIconWrapper extends StackPane
Convenience class for creating icons wrapped in a StackPane.

The size is equal and fixed both for height and width, can be changed via CSS.

  • Property Details

  • Constructor Details

    • MFXIconWrapper

      public MFXIconWrapper()
    • MFXIconWrapper

      public MFXIconWrapper(Node icon, double size)
    • MFXIconWrapper

      public MFXIconWrapper(String description, double iconSize, double wrapperSize)
    • MFXIconWrapper

      public MFXIconWrapper(String description, double iconSize, Color iconColor, double wrapperSize)
  • Method Details

    • addRippleGenerator

      public MFXIconWrapper addRippleGenerator()
      Adds a ripple generator to the icon. It is an optional.
    • defaultRippleGeneratorBehavior

      public MFXIconWrapper defaultRippleGeneratorBehavior()
      Adds the ripple generator to the icon by calling addRippleGenerator(), sets its position function to use the mouse event x and y coordinates, and adds the event filter to the icon to generate the ripples.
      See Also:
    • rippleGeneratorBehavior

      public MFXIconWrapper rippleGeneratorBehavior(Function<MouseEvent,PositionBean> positionFunction)
      Adds the ripple generator to the icon by calling addRippleGenerator(), sets its position function to the given function, and adds the event filter to the icon to generate the ripples.
      See Also:
    • getChildren

      public ObservableList<Node> getChildren()
      Overrides:
      getChildren in class Pane
      Returns:
      an unmodifiable list of the StackPane children
    • layoutChildren

      protected void layoutChildren()
      Overrides:
      layoutChildren in class StackPane
    • getSize

      public double getSize()
      Gets the value of the property size.
      Property description:
      Specifies the size of the container.
    • sizeProperty

      public StyleableDoubleProperty sizeProperty()
      Specifies the size of the container.
      See Also:
    • setSize

      public void setSize(double size)
      Sets the value of the property size.
      Property description:
      Specifies the size of the container.
    • getClassCssMetaData

      public static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
    • getCssMetaData

      public List<CssMetaData<? extends Styleable,?>> getCssMetaData()
      Specified by:
      getCssMetaData in interface Styleable
      Overrides:
      getCssMetaData in class StackPane
    • getRippleGenerator

      public MFXCircleRippleGenerator getRippleGenerator()
      Returns:
      the RippleGenerator instance.
    • getIcon

      public Node getIcon()
      Gets the value of the property icon.
      Property description:
      Contains the reference to the icon.
    • iconProperty

      public ObjectProperty<Node> iconProperty()
      Contains the reference to the icon.
      See Also:
    • setIcon

      public void setIcon(Node icon)
      Sets the value of the property icon.
      Property description:
      Contains the reference to the icon.
    • removeIcon

      public void removeIcon()
      Removes the icon node.