Class BehaviorSkinBase<C extends javafx.scene.control.Control,B extends BehaviorBase<C,?>>

java.lang.Object
javafx.scene.control.SkinBase<C>
atlantafx.base.controls.BehaviorSkinBase<C,B>
All Implemented Interfaces:
javafx.scene.control.Skin<C>
Direct Known Subclasses:
CalendarSkin

public abstract class BehaviorSkinBase<C extends javafx.scene.control.Control,B extends BehaviorBase<C,?>> extends javafx.scene.control.SkinBase<C>
Base implementation class for defining the visual representation of user interface controls that need to handle platform events and therefore can take advantage of using the Behavior API.

Note: This is an excerpt of the private Behavior API from the JavaFX codebase. It serves as a compatibility layer for implementing certain controls, although it can also be useful for new controls.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected B
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructor for all BehaviorSkinBase instances.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract B
    An abstract method for creating the behavior instance to be used by this skin.
    void
    Gets the behavior associated with this skin.
    Gets the control associated with this skin.
    protected void
    Unbinds all properties and removes any listeners before disposing the skin.

    Methods inherited from class javafx.scene.control.SkinBase

    computeBaselineOffset, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, consumeMouseEvents, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, layoutChildren, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, queryAccessibleAttribute, registerChangeListener, registerInvalidationListener, registerListChangeListener, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, unregisterChangeListeners, unregisterInvalidationListeners, unregisterListChangeListeners

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface javafx.scene.control.Skin

    install
  • Field Details

  • Constructor Details

    • BehaviorSkinBase

      protected BehaviorSkinBase(C control)
      Constructor for all BehaviorSkinBase instances.
      Parameters:
      control - The control for which this Skin should attach to.
  • Method Details

    • createDefaultBehavior

      public abstract B createDefaultBehavior()
      An abstract method for creating the behavior instance to be used by this skin.
    • getControl

      public C getControl()
      Gets the control associated with this skin.
      Returns:
      The control for this Skin.
    • getBehavior

      public B getBehavior()
      Gets the behavior associated with this skin.
      Returns:
      The behavior for this skin.
    • unregisterListeners

      protected void unregisterListeners()
      Unbinds all properties and removes any listeners before disposing the skin. There's no need to remove listeners, which has been registered using SkinBase.registerChangeListener(ObservableValue, Consumer) method, because it will be done automatically from dispose method.
    • dispose

      public void dispose()
      Specified by:
      dispose in interface javafx.scene.control.Skin<C extends javafx.scene.control.Control>
      Overrides:
      dispose in class javafx.scene.control.SkinBase<C extends javafx.scene.control.Control>