Module MaterialFX

Class MFXRectangleToggleNode

All Implemented Interfaces:
Styleable, EventTarget, Skinnable, Toggle

public class MFXRectangleToggleNode extends AbstractMFXToggleNode
This is the implementation of a ToggleButton with a completely different skin, MFXRectangleToggleNodeSkin.

Extends ToggleButton and redefines the style class to "mfx-toggle-node" for usage in CSS.

Allows to specify up to two icons for toggle's label. Also, if you want a toggle node without text but just with the icon, the property to set is the Labeled.graphicProperty(), setting the leading or the trailing in this case can lead to misaligned icons as those two icons are meant to be used with text. Note that whenever the graphic property is set to a not null value it will be prioritized over the other two icons and the label. The label will be hidden and only the graphic property will be shown. Setting it back to null will show the label, leading and trailing icons back again.

  • Property Details

  • Constructor Details

    • MFXRectangleToggleNode

      public MFXRectangleToggleNode()
    • MFXRectangleToggleNode

      public MFXRectangleToggleNode(String text)
    • MFXRectangleToggleNode

      public MFXRectangleToggleNode(String text, Node leadingIcon)
    • MFXRectangleToggleNode

      public MFXRectangleToggleNode(String text, Node leadingIcon, Node trailingIcon)
  • Method Details

    • getRippleClipTypeFactory

      public RippleClipTypeFactory getRippleClipTypeFactory()
      Gets the value of the property rippleClipTypeFactory.
      Property description:
      Specifies the ripple generator's clip factory.

      If you change the borders' radius this property will most likely need to be changed.
    • rippleClipTypeFactoryProperty

      public ObjectProperty<RippleClipTypeFactory> rippleClipTypeFactoryProperty()
      Specifies the ripple generator's clip factory.

      If you change the borders' radius this property will most likely need to be changed.
      See Also:
    • setRippleClipTypeFactory

      public void setRippleClipTypeFactory(RippleClipTypeFactory rippleClipTypeFactory)
      Sets the value of the property rippleClipTypeFactory.
      Property description:
      Specifies the ripple generator's clip factory.

      If you change the borders' radius this property will most likely need to be changed.
    • createDefaultSkin

      protected Skin<?> createDefaultSkin()
      Overrides:
      createDefaultSkin in class ToggleButton
    • getUserAgentStylesheet

      public String getUserAgentStylesheet()
      Overrides:
      getUserAgentStylesheet in class Region