2010 | OriginalPaper | Chapter
Triggers
Published in: Beginning JavaFX™
Publisher: Apress
Activate our intelligent search to find suitable subject content or patents.
Select sections of text to find matching patents with Artificial Intelligence. powered by
Select sections of text to find additional relevant content using AI-assisted search. powered by
A
trigger
is a block of code that is attached to a variable and executed whenever the value of the variable changes, including the assignment of the initial value. You can also optionally get hold of the old values that were replaced within the trigger. Triggers are very powerful and unique in JavaFX Script, just like bind. Triggers can be attached to normal variables as well as to sequences. First let us see how triggers work for simple variables and then proceed to complicated triggers and sequence triggers.