Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2010 Lawrence Prem Kumar and Praveen Mohan
About this chapter
Cite this chapter
(2010). Triggers. In: Beginning JavaFX™. Apress. https://doi.org/10.1007/978-1-4302-7198-7_11
Download citation
DOI: https://doi.org/10.1007/978-1-4302-7198-7_11
Publisher Name: Apress
Print ISBN: 978-1-4302-7199-4
Online ISBN: 978-1-4302-7198-7
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)