public abstract class BehaviorSkinBase<C extends Control,BB extends BehaviorBase<C>> extends SkinBase<C>
Modifier and Type | Field and Description |
---|---|
private BB |
behavior
|
private MultiplePropertyChangeListenerHandler |
changeListenerHandler
This is part of the workaround introduced during delomboking.
|
private EventHandler<ContextMenuEvent> |
contextMenuHandler |
protected static boolean |
IS_TOUCH_SUPPORTED
A static final reference to whether the platform we are on supports touch.
|
private EventHandler<MouseEvent> |
mouseHandler
Forwards mouse events received by a MouseListener to the behavior.
|
Modifier | Constructor and Description |
---|---|
protected |
BehaviorSkinBase(C control,
BB behavior)
Constructor for all BehaviorSkinBase instances.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Called by a Skinnable when the Skin is replaced on the Skinnable.
|
BB |
getBehavior() |
protected void |
handleControlPropertyChanged(java.lang.String propertyReference)
Skin subclasses will override this method to handle changes in corresponding
control's properties.
|
protected void |
registerChangeListener(ObservableValue<?> property,
java.lang.String reference)
Subclasses can invoke this method to register that we want to listen to
property change events for the given property.
|
protected void |
unregisterChangeListener(ObservableValue<?> property)
Subclasses can invoke this method to unregister listening to
property change events for the given property.
|
computeBaselineOffset, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, consumeMouseEvents, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, layoutChildren, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, queryAccessibleAttribute, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace
protected static final boolean IS_TOUCH_SUPPORTED
private BB extends BehaviorBase<C> behavior
BehaviorBase
that encapsulates the interaction with the
Control
from this Skin
. The Skin
does not modify
the Control
directly, but rather redirects events into the
BehaviorBase
which then handles the events by modifying internal state
and public state in the Control
. Generally, specific
Skin
implementations will require specific BehaviorBase
implementations. For example, a ButtonSkin might require a ButtonBehavior.private MultiplePropertyChangeListenerHandler changeListenerHandler
private final EventHandler<MouseEvent> mouseHandler
private final EventHandler<ContextMenuEvent> contextMenuHandler
public final BB getBehavior()
public void dispose()
Skin.getSkinnable()
and Skin.getNode()
should return null following a call to dispose. Calling dispose twice
has no effect.protected final void registerChangeListener(ObservableValue<?> property, java.lang.String reference)
property
- reference
- protected final void unregisterChangeListener(ObservableValue<?> property)
property
- protected void handleControlPropertyChanged(java.lang.String propertyReference)