public class PseudoClassProperty
extends javafx.beans.property.BooleanPropertyBase
It automatically updates the pseudo state on invalidation by calling pseudoClassStateChanged on its container node.
Usage Example:
public class MyNode extends Node {
// ..
private static PseudoClass CUSTOM = PseudoClass.getPseudoClass("custom");
private BooleanProperty custom = PseudoClassProperty.create(CUSTOM, this, "custom", false);
// ..
}
or as one-liner if you do not need the reference to PseudoClass
public class MyNode extends Node {
// ..
private BooleanProperty custom = PseudoClassProperty.create("custom", this, "custom", false);
// ..
}
| Modifier | Constructor and Description |
|---|---|
protected |
PseudoClassProperty(javafx.css.PseudoClass cls,
javafx.scene.Node node,
java.lang.String name,
boolean def) |
| Modifier and Type | Method and Description |
|---|---|
static javafx.beans.property.BooleanProperty |
create(javafx.css.PseudoClass cls,
javafx.scene.Node node,
java.lang.String name,
boolean def)
creates a new PseudoClassProperty.
|
static javafx.beans.property.BooleanProperty |
create(java.lang.String pseudoClass,
javafx.scene.Node node,
java.lang.String name,
boolean def)
creates a new PseudoClassProperty.
|
java.lang.Object |
getBean() |
java.lang.String |
getName() |
protected void |
invalidated() |
addListener, addListener, bind, fireValueChangedEvent, get, isBound, removeListener, removeListener, set, toString, unbindbindBidirectional, booleanProperty, setValue, unbindBidirectionaland, asString, booleanExpression, booleanExpression, getValue, isEqualTo, isNotEqualTo, not, orprotected PseudoClassProperty(javafx.css.PseudoClass cls,
javafx.scene.Node node,
java.lang.String name,
boolean def)
cls - the pseudo classnode - the container nodename - the properties name (not to confuse with the pseudo class name, those may be different)def - the initial valueprotected void invalidated()
invalidated in class javafx.beans.property.BooleanPropertyBasepublic java.lang.Object getBean()
public java.lang.String getName()
public static javafx.beans.property.BooleanProperty create(javafx.css.PseudoClass cls,
javafx.scene.Node node,
java.lang.String name,
boolean def)
cls - the pseudo classnode - the container nodename - the properties name (not to confuse with the pseudo class name, those may be different)def - the initial valuepublic static javafx.beans.property.BooleanProperty create(java.lang.String pseudoClass,
javafx.scene.Node node,
java.lang.String name,
boolean def)
Convenience method if you do not need to hold the instance of the PseudoClass
pseudoClass - the pseudo class stringnode - the container nodename - the properties name (not to confuse with the pseudo class name, those may be different)def - the initial value