Module MaterialFX

Class MFXCheckListCell<T>

All Implemented Interfaces:
io.github.palexdev.virtualizedfx.cell.Cell<T>, Styleable, EventTarget

public class MFXCheckListCell<T> extends AbstractMFXListCell<T>
Implementation of an AbstractMFXListCell which has a combo box for usage in MFXCheckListView.

The label used to display the data is built in the constructor only if the given T data is not a Node, otherwise it's null.

The label's text is bound to the data property and converted to a String using ObjectExpression.asString().
  • Field Details

  • Constructor Details

  • Method Details

    • initialize

      protected void initialize()
      Overridden to add the style class, setup the ripple generator and call render(Object) for the first time.
      Overrides:
      initialize in class AbstractMFXListCell<T>
    • setupRippleGenerator

      protected void setupRippleGenerator()
      Sets up the properties of the ripple generator and adds the mouse pressed filter.
    • setBehavior

      protected void setBehavior()
      Overridden as the selected state depends on the checkbox' state.
      Overrides:
      setBehavior in class AbstractMFXListCell<T>
    • render

      protected void render(T data)
      Responsible for rendering the cell's content.

      If the given data type is a Node, it is added to the children list, otherwise a label is used to display the data.

      At the end adds a ripple generator at index 0.

      Specified by:
      render in class AbstractMFXListCell<T>
    • updateItem

      public void updateItem(T item)
      Updates the data property of the cell. If the data is a Node render(Object) is called.

      This is called after AbstractMFXListCell.updateIndex(int).

      Specified by:
      updateItem in interface io.github.palexdev.virtualizedfx.cell.Cell<T>
      Overrides:
      updateItem in class AbstractMFXListCell<T>
    • getNode

      public Node getNode()
    • getUserAgentStylesheet

      public String getUserAgentStylesheet()
      Overrides:
      getUserAgentStylesheet in class Region