java.lang.Object
javafx.scene.StyleTrigger
public class StyleTrigger extends Object
Style triggers dynamically add or remove style classes from a
Node depending on a user-specified condition.
If the condition is true, the specified style classes are added to the Node.getStyleClass() list;
if it is false, the style classes are removed.
Once a style trigger is added to Node.getStyleTriggers(), it is attached to the node and can not
be re-used for another node unless it is removed from the original node.
-
Property Summary
Properties Type Property Description BooleanPropertyconditionThe condition that determines whether the style classes contained ingetStyleClass()are added to theNode's style class list. -
Constructor Summary
Constructors Constructor Description StyleTrigger()StyleTrigger(String... styleClass) -
Method Summary
Modifier and Type Method Description BooleanPropertyconditionProperty()The condition that determines whether the style classes contained ingetStyleClass()are added to theNode's style class list.ObservableList<String>getStyleClass()Gets the list of style classes that will be dynamically added to theNode's style class list.booleanisCondition()Gets the value of the property condition.voidsetCondition(boolean value)Sets the value of the property condition.
-
Property Details
-
condition
The condition that determines whether the style classes contained ingetStyleClass()are added to theNode's style class list.- See Also:
isCondition(),setCondition(boolean)
-
-
Constructor Details
-
StyleTrigger
public StyleTrigger() -
StyleTrigger
-
-
Method Details
-
getStyleClass
Gets the list of style classes that will be dynamically added to theNode's style class list.- Returns:
- an
ObservableListof style classes
-
conditionProperty
The condition that determines whether the style classes contained ingetStyleClass()are added to theNode's style class list.- See Also:
isCondition(),setCondition(boolean)
-
isCondition
public boolean isCondition()Gets the value of the property condition.- Property description:
- The condition that determines whether the style classes contained in
getStyleClass()are added to theNode's style class list.
-
setCondition
public void setCondition(boolean value)Sets the value of the property condition.- Property description:
- The condition that determines whether the style classes contained in
getStyleClass()are added to theNode's style class list.
-