<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_77) on Fri Apr 22 13:46:53 UTC 2016 --> <title>ObservableValue (JavaFX 8)</title> <meta name="date" content="2016-04-22"> <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="ObservableValue (JavaFX 8)"; } } catch(err) { } //--> var methods = {"i0":6,"i1":6,"i2":6}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/ObservableValue.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">JavaFX 8</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../javafx/beans/value/ObservableStringValue.html" title="interface in javafx.beans.value"><span class="typeNameLink">Prev Class</span></a></li> <li><a href="../../../javafx/beans/value/ObservableValueBase.html" title="class in javafx.beans.value"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?javafx/beans/value/ObservableValue.html" target="_top">Frames</a></li> <li><a href="ObservableValue.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li>Nested | </li> <li>Field | </li> <li>Constr | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li>Field | </li> <li>Constr | </li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">javafx.beans.value</div> <h2 title="Interface ObservableValue" class="title">Interface ObservableValue<T></h2> </div> <div class="contentContainer"> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt><span class="paramLabel">Type Parameters:</span></dt> <dd><code>T</code> - The type of the wrapped value.</dd> </dl> <dl> <dt>All Superinterfaces:</dt> <dd><a href="../../../javafx/beans/Observable.html" title="interface in javafx.beans">Observable</a></dd> </dl> <dl> <dt>All Known Subinterfaces:</dt> <dd><a href="../../../javafx/beans/binding/Binding.html" title="interface in javafx.beans.binding">Binding</a><T>, <a href="../../../javafx/beans/property/adapter/JavaBeanProperty.html" title="interface in javafx.beans.property.adapter">JavaBeanProperty</a><T>, <a href="../../../javafx/beans/binding/NumberBinding.html" title="interface in javafx.beans.binding">NumberBinding</a>, <a href="../../../javafx/beans/binding/NumberExpression.html" title="interface in javafx.beans.binding">NumberExpression</a>, <a href="../../../javafx/beans/value/ObservableBooleanValue.html" title="interface in javafx.beans.value">ObservableBooleanValue</a>, <a href="../../../javafx/beans/value/ObservableDoubleValue.html" title="interface in javafx.beans.value">ObservableDoubleValue</a>, <a href="../../../javafx/beans/value/ObservableFloatValue.html" title="interface in javafx.beans.value">ObservableFloatValue</a>, <a href="../../../javafx/beans/value/ObservableIntegerValue.html" title="interface in javafx.beans.value">ObservableIntegerValue</a>, <a href="../../../javafx/beans/value/ObservableListValue.html" title="interface in javafx.beans.value">ObservableListValue</a><E>, <a href="../../../javafx/beans/value/ObservableLongValue.html" title="interface in javafx.beans.value">ObservableLongValue</a>, <a href="../../../javafx/beans/value/ObservableMapValue.html" title="interface in javafx.beans.value">ObservableMapValue</a><K,V>, <a href="../../../javafx/beans/value/ObservableNumberValue.html" title="interface in javafx.beans.value">ObservableNumberValue</a>, <a href="../../../javafx/beans/value/ObservableObjectValue.html" title="interface in javafx.beans.value">ObservableObjectValue</a><T>, <a href="../../../javafx/beans/value/ObservableSetValue.html" title="interface in javafx.beans.value">ObservableSetValue</a><E>, <a href="../../../javafx/beans/value/ObservableStringValue.html" title="interface in javafx.beans.value">ObservableStringValue</a>, <a href="../../../javafx/beans/property/Property.html" title="interface in javafx.beans.property">Property</a><T>, <a href="../../../javafx/beans/property/adapter/ReadOnlyJavaBeanProperty.html" title="interface in javafx.beans.property.adapter">ReadOnlyJavaBeanProperty</a><T>, <a href="../../../javafx/beans/property/ReadOnlyProperty.html" title="interface in javafx.beans.property">ReadOnlyProperty</a><T>, <a href="../../../javafx/scene/control/TextInputControl.Content.html" title="interface in javafx.scene.control">TextInputControl.Content</a></dd> </dl> <dl> <dt>All Known Implementing Classes:</dt> <dd><a href="../../../javafx/beans/binding/BooleanBinding.html" title="class in javafx.beans.binding">BooleanBinding</a>, <a href="../../../javafx/beans/binding/BooleanExpression.html" title="class in javafx.beans.binding">BooleanExpression</a>, <a href="../../../javafx/beans/property/BooleanProperty.html" title="class in javafx.beans.property">BooleanProperty</a>, <a href="../../../javafx/beans/property/BooleanPropertyBase.html" title="class in javafx.beans.property">BooleanPropertyBase</a>, <a href="../../../javafx/beans/binding/DoubleBinding.html" title="class in javafx.beans.binding">DoubleBinding</a>, <a href="../../../javafx/beans/binding/DoubleExpression.html" title="class in javafx.beans.binding">DoubleExpression</a>, <a href="../../../javafx/beans/property/DoubleProperty.html" title="class in javafx.beans.property">DoubleProperty</a>, <a href="../../../javafx/beans/property/DoublePropertyBase.html" title="class in javafx.beans.property">DoublePropertyBase</a>, <a href="../../../javafx/beans/binding/FloatBinding.html" title="class in javafx.beans.binding">FloatBinding</a>, <a href="../../../javafx/beans/binding/FloatExpression.html" title="class in javafx.beans.binding">FloatExpression</a>, <a href="../../../javafx/beans/property/FloatProperty.html" title="class in javafx.beans.property">FloatProperty</a>, <a href="../../../javafx/beans/property/FloatPropertyBase.html" title="class in javafx.beans.property">FloatPropertyBase</a>, <a href="../../../javafx/beans/binding/IntegerBinding.html" title="class in javafx.beans.binding">IntegerBinding</a>, <a href="../../../javafx/beans/binding/IntegerExpression.html" title="class in javafx.beans.binding">IntegerExpression</a>, <a href="../../../javafx/beans/property/IntegerProperty.html" title="class in javafx.beans.property">IntegerProperty</a>, <a href="../../../javafx/beans/property/IntegerPropertyBase.html" title="class in javafx.beans.property">IntegerPropertyBase</a>, <a href="../../../javafx/beans/property/adapter/JavaBeanBooleanProperty.html" title="class in javafx.beans.property.adapter">JavaBeanBooleanProperty</a>, <a href="../../../javafx/beans/property/adapter/JavaBeanDoubleProperty.html" title="class in javafx.beans.property.adapter">JavaBeanDoubleProperty</a>, <a href="../../../javafx/beans/property/adapter/JavaBeanFloatProperty.html" title="class in javafx.beans.property.adapter">JavaBeanFloatProperty</a>, <a href="../../../javafx/beans/property/adapter/JavaBeanIntegerProperty.html" title="class in javafx.beans.property.adapter">JavaBeanIntegerProperty</a>, <a href="../../../javafx/beans/property/adapter/JavaBeanLongProperty.html" title="class in javafx.beans.property.adapter">JavaBeanLongProperty</a>, <a href="../../../javafx/beans/property/adapter/JavaBeanObjectProperty.html" title="class in javafx.beans.property.adapter">JavaBeanObjectProperty</a>, <a href="../../../javafx/beans/property/adapter/JavaBeanStringProperty.html" title="class in javafx.beans.property.adapter">JavaBeanStringProperty</a>, <a href="../../../javafx/beans/binding/ListBinding.html" title="class in javafx.beans.binding">ListBinding</a>, <a href="../../../javafx/beans/binding/ListExpression.html" title="class in javafx.beans.binding">ListExpression</a>, <a href="../../../javafx/beans/property/ListProperty.html" title="class in javafx.beans.property">ListProperty</a>, <a href="../../../javafx/beans/property/ListPropertyBase.html" title="class in javafx.beans.property">ListPropertyBase</a>, <a href="../../../javafx/beans/binding/LongBinding.html" title="class in javafx.beans.binding">LongBinding</a>, <a href="../../../javafx/beans/binding/LongExpression.html" title="class in javafx.beans.binding">LongExpression</a>, <a href="../../../javafx/beans/property/LongProperty.html" title="class in javafx.beans.property">LongProperty</a>, <a href="../../../javafx/beans/property/LongPropertyBase.html" title="class in javafx.beans.property">LongPropertyBase</a>, <a href="../../../javafx/beans/binding/MapBinding.html" title="class in javafx.beans.binding">MapBinding</a>, <a href="../../../javafx/beans/binding/MapExpression.html" title="class in javafx.beans.binding">MapExpression</a>, <a href="../../../javafx/beans/property/MapProperty.html" title="class in javafx.beans.property">MapProperty</a>, <a href="../../../javafx/beans/property/MapPropertyBase.html" title="class in javafx.beans.property">MapPropertyBase</a>, <a href="../../../javafx/beans/binding/NumberExpressionBase.html" title="class in javafx.beans.binding">NumberExpressionBase</a>, <a href="../../../javafx/beans/binding/ObjectBinding.html" title="class in javafx.beans.binding">ObjectBinding</a>, <a href="../../../javafx/beans/binding/ObjectExpression.html" title="class in javafx.beans.binding">ObjectExpression</a>, <a href="../../../javafx/beans/property/ObjectProperty.html" title="class in javafx.beans.property">ObjectProperty</a>, <a href="../../../javafx/beans/property/ObjectPropertyBase.html" title="class in javafx.beans.property">ObjectPropertyBase</a>, <a href="../../../javafx/beans/value/ObservableValueBase.html" title="class in javafx.beans.value">ObservableValueBase</a>, <a href="../../../javafx/beans/property/ReadOnlyBooleanProperty.html" title="class in javafx.beans.property">ReadOnlyBooleanProperty</a>, <a href="../../../javafx/beans/property/ReadOnlyBooleanPropertyBase.html" title="class in javafx.beans.property">ReadOnlyBooleanPropertyBase</a>, <a href="../../../javafx/beans/property/ReadOnlyBooleanWrapper.html" title="class in javafx.beans.property">ReadOnlyBooleanWrapper</a>, <a href="../../../javafx/beans/property/ReadOnlyDoubleProperty.html" title="class in javafx.beans.property">ReadOnlyDoubleProperty</a>, <a href="../../../javafx/beans/property/ReadOnlyDoublePropertyBase.html" title="class in javafx.beans.property">ReadOnlyDoublePropertyBase</a>, <a href="../../../javafx/beans/property/ReadOnlyDoubleWrapper.html" title="class in javafx.beans.property">ReadOnlyDoubleWrapper</a>, <a href="../../../javafx/beans/property/ReadOnlyFloatProperty.html" title="class in javafx.beans.property">ReadOnlyFloatProperty</a>, <a href="../../../javafx/beans/property/ReadOnlyFloatPropertyBase.html" title="class in javafx.beans.property">ReadOnlyFloatPropertyBase</a>, <a href="../../../javafx/beans/property/ReadOnlyFloatWrapper.html" title="class in javafx.beans.property">ReadOnlyFloatWrapper</a>, <a href="../../../javafx/beans/property/ReadOnlyIntegerProperty.html" title="class in javafx.beans.property">ReadOnlyIntegerProperty</a>, <a href="../../../javafx/beans/property/ReadOnlyIntegerPropertyBase.html" title="class in javafx.beans.property">ReadOnlyIntegerPropertyBase</a>, <a href="../../../javafx/beans/property/ReadOnlyIntegerWrapper.html" title="class in javafx.beans.property">ReadOnlyIntegerWrapper</a>, <a href="../../../javafx/beans/property/adapter/ReadOnlyJavaBeanBooleanProperty.html" title="class in javafx.beans.property.adapter">ReadOnlyJavaBeanBooleanProperty</a>, <a href="../../../javafx/beans/property/adapter/ReadOnlyJavaBeanDoubleProperty.html" title="class in javafx.beans.property.adapter">ReadOnlyJavaBeanDoubleProperty</a>, <a href="../../../javafx/beans/property/adapter/ReadOnlyJavaBeanFloatProperty.html" title="class in javafx.beans.property.adapter">ReadOnlyJavaBeanFloatProperty</a>, <a href="../../../javafx/beans/property/adapter/ReadOnlyJavaBeanIntegerProperty.html" title="class in javafx.beans.property.adapter">ReadOnlyJavaBeanIntegerProperty</a>, <a href="../../../javafx/beans/property/adapter/ReadOnlyJavaBeanLongProperty.html" title="class in javafx.beans.property.adapter">ReadOnlyJavaBeanLongProperty</a>, <a href="../../../javafx/beans/property/adapter/ReadOnlyJavaBeanObjectProperty.html" title="class in javafx.beans.property.adapter">ReadOnlyJavaBeanObjectProperty</a>, <a href="../../../javafx/beans/property/adapter/ReadOnlyJavaBeanStringProperty.html" title="class in javafx.beans.property.adapter">ReadOnlyJavaBeanStringProperty</a>, <a href="../../../javafx/beans/property/ReadOnlyListProperty.html" title="class in javafx.beans.property">ReadOnlyListProperty</a>, <a href="../../../javafx/beans/property/ReadOnlyListPropertyBase.html" title="class in javafx.beans.property">ReadOnlyListPropertyBase</a>, <a href="../../../javafx/beans/property/ReadOnlyListWrapper.html" title="class in javafx.beans.property">ReadOnlyListWrapper</a>, <a href="../../../javafx/beans/property/ReadOnlyLongProperty.html" title="class in javafx.beans.property">ReadOnlyLongProperty</a>, <a href="../../../javafx/beans/property/ReadOnlyLongPropertyBase.html" title="class in javafx.beans.property">ReadOnlyLongPropertyBase</a>, <a href="../../../javafx/beans/property/ReadOnlyLongWrapper.html" title="class in javafx.beans.property">ReadOnlyLongWrapper</a>, <a href="../../../javafx/beans/property/ReadOnlyMapProperty.html" title="class in javafx.beans.property">ReadOnlyMapProperty</a>, <a href="../../../javafx/beans/property/ReadOnlyMapPropertyBase.html" title="class in javafx.beans.property">ReadOnlyMapPropertyBase</a>, <a href="../../../javafx/beans/property/ReadOnlyMapWrapper.html" title="class in javafx.beans.property">ReadOnlyMapWrapper</a>, <a href="../../../javafx/beans/property/ReadOnlyObjectProperty.html" title="class in javafx.beans.property">ReadOnlyObjectProperty</a>, <a href="../../../javafx/beans/property/ReadOnlyObjectPropertyBase.html" title="class in javafx.beans.property">ReadOnlyObjectPropertyBase</a>, <a href="../../../javafx/beans/property/ReadOnlyObjectWrapper.html" title="class in javafx.beans.property">ReadOnlyObjectWrapper</a>, <a href="../../../javafx/beans/property/ReadOnlySetProperty.html" title="class in javafx.beans.property">ReadOnlySetProperty</a>, <a href="../../../javafx/beans/property/ReadOnlySetPropertyBase.html" title="class in javafx.beans.property">ReadOnlySetPropertyBase</a>, <a href="../../../javafx/beans/property/ReadOnlySetWrapper.html" title="class in javafx.beans.property">ReadOnlySetWrapper</a>, <a href="../../../javafx/beans/property/ReadOnlyStringProperty.html" title="class in javafx.beans.property">ReadOnlyStringProperty</a>, <a href="../../../javafx/beans/property/ReadOnlyStringPropertyBase.html" title="class in javafx.beans.property">ReadOnlyStringPropertyBase</a>, <a href="../../../javafx/beans/property/ReadOnlyStringWrapper.html" title="class in javafx.beans.property">ReadOnlyStringWrapper</a>, <a href="../../../javafx/beans/binding/SetBinding.html" title="class in javafx.beans.binding">SetBinding</a>, <a href="../../../javafx/beans/binding/SetExpression.html" title="class in javafx.beans.binding">SetExpression</a>, <a href="../../../javafx/beans/property/SetProperty.html" title="class in javafx.beans.property">SetProperty</a>, <a href="../../../javafx/beans/property/SetPropertyBase.html" title="class in javafx.beans.property">SetPropertyBase</a>, <a href="../../../javafx/beans/property/SimpleBooleanProperty.html" title="class in javafx.beans.property">SimpleBooleanProperty</a>, <a href="../../../javafx/beans/property/SimpleDoubleProperty.html" title="class in javafx.beans.property">SimpleDoubleProperty</a>, <a href="../../../javafx/beans/property/SimpleFloatProperty.html" title="class in javafx.beans.property">SimpleFloatProperty</a>, <a href="../../../javafx/beans/property/SimpleIntegerProperty.html" title="class in javafx.beans.property">SimpleIntegerProperty</a>, <a href="../../../javafx/beans/property/SimpleListProperty.html" title="class in javafx.beans.property">SimpleListProperty</a>, <a href="../../../javafx/beans/property/SimpleLongProperty.html" title="class in javafx.beans.property">SimpleLongProperty</a>, <a href="../../../javafx/beans/property/SimpleMapProperty.html" title="class in javafx.beans.property">SimpleMapProperty</a>, <a href="../../../javafx/beans/property/SimpleObjectProperty.html" title="class in javafx.beans.property">SimpleObjectProperty</a>, <a href="../../../javafx/beans/property/SimpleSetProperty.html" title="class in javafx.beans.property">SimpleSetProperty</a>, <a href="../../../javafx/beans/property/SimpleStringProperty.html" title="class in javafx.beans.property">SimpleStringProperty</a>, <a href="../../../javafx/css/SimpleStyleableBooleanProperty.html" title="class in javafx.css">SimpleStyleableBooleanProperty</a>, <a href="../../../javafx/css/SimpleStyleableDoubleProperty.html" title="class in javafx.css">SimpleStyleableDoubleProperty</a>, <a href="../../../javafx/css/SimpleStyleableFloatProperty.html" title="class in javafx.css">SimpleStyleableFloatProperty</a>, <a href="../../../javafx/css/SimpleStyleableIntegerProperty.html" title="class in javafx.css">SimpleStyleableIntegerProperty</a>, <a href="../../../javafx/css/SimpleStyleableLongProperty.html" title="class in javafx.css">SimpleStyleableLongProperty</a>, <a href="../../../javafx/css/SimpleStyleableObjectProperty.html" title="class in javafx.css">SimpleStyleableObjectProperty</a>, <a href="../../../javafx/css/SimpleStyleableStringProperty.html" title="class in javafx.css">SimpleStyleableStringProperty</a>, <a href="../../../javafx/beans/binding/StringBinding.html" title="class in javafx.beans.binding">StringBinding</a>, <a href="../../../javafx/beans/binding/StringExpression.html" title="class in javafx.beans.binding">StringExpression</a>, <a href="../../../javafx/beans/property/StringProperty.html" title="class in javafx.beans.property">StringProperty</a>, <a href="../../../javafx/beans/property/StringPropertyBase.html" title="class in javafx.beans.property">StringPropertyBase</a>, <a href="../../../javafx/css/StyleableBooleanProperty.html" title="class in javafx.css">StyleableBooleanProperty</a>, <a href="../../../javafx/css/StyleableDoubleProperty.html" title="class in javafx.css">StyleableDoubleProperty</a>, <a href="../../../javafx/css/StyleableFloatProperty.html" title="class in javafx.css">StyleableFloatProperty</a>, <a href="../../../javafx/css/StyleableIntegerProperty.html" title="class in javafx.css">StyleableIntegerProperty</a>, <a href="../../../javafx/css/StyleableLongProperty.html" title="class in javafx.css">StyleableLongProperty</a>, <a href="../../../javafx/css/StyleableObjectProperty.html" title="class in javafx.css">StyleableObjectProperty</a>, <a href="../../../javafx/css/StyleableStringProperty.html" title="class in javafx.css">StyleableStringProperty</a></dd> </dl> <hr> <br> <pre>public interface <span class="typeNameLabel">ObservableValue<T></span> extends <a href="../../../javafx/beans/Observable.html" title="interface in javafx.beans">Observable</a></pre> <div class="block">An <code>ObservableValue</code> is an entity that wraps a value and allows to observe the value for changes. In general this interface should not be implemented directly but one of its sub-interfaces ( <code>ObservableBooleanValue</code> etc.). <p> The value of the <code>ObservableValue</code> can be requested with <a href="../../../javafx/beans/value/ObservableValue.html#getValue--"><code>getValue()</code></a>. <p> An implementation of <code>ObservableValue</code> may support lazy evaluation, which means that the value is not immediately recomputed after changes, but lazily the next time the value is requested. All bindings and properties in this library support lazy evaluation. <p> An <code>ObservableValue</code> generates two types of events: change events and invalidation events. A change event indicates that the value has changed. An invalidation event is generated, if the current value is not valid anymore. This distinction becomes important, if the <code>ObservableValue</code> supports lazy evaluation, because for a lazily evaluated value one does not know if an invalid value really has changed until it is recomputed. For this reason, generating change events requires eager evaluation while invalidation events can be generated for eager and lazy implementations. <p> Implementations of this class should strive to generate as few events as possible to avoid wasting too much time in event handlers. Implementations in this library mark themselves as invalid when the first invalidation event occurs. They do not generate anymore invalidation events until their value is recomputed and valid again. <p> Two types of listeners can be attached to an <code>ObservableValue</code>: <a href="../../../javafx/beans/InvalidationListener.html" title="interface in javafx.beans"><code>InvalidationListener</code></a> to listen to invalidation events and <a href="../../../javafx/beans/value/ChangeListener.html" title="interface in javafx.beans.value"><code>ChangeListener</code></a> to listen to change events. <p> Important note: attaching a <code>ChangeListener</code> enforces eager computation even if the implementation of the <code>ObservableValue</code> supports lazy evaluation.</div> <dl> <dt><span class="simpleTagLabel">Since:</span></dt> <dd>JavaFX 2.0</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/beans/value/ObservableBooleanValue.html" title="interface in javafx.beans.value"><code>ObservableBooleanValue</code></a>, <a href="../../../javafx/beans/value/ObservableDoubleValue.html" title="interface in javafx.beans.value"><code>ObservableDoubleValue</code></a>, <a href="../../../javafx/beans/value/ObservableFloatValue.html" title="interface in javafx.beans.value"><code>ObservableFloatValue</code></a>, <a href="../../../javafx/beans/value/ObservableIntegerValue.html" title="interface in javafx.beans.value"><code>ObservableIntegerValue</code></a>, <a href="../../../javafx/beans/value/ObservableLongValue.html" title="interface in javafx.beans.value"><code>ObservableLongValue</code></a>, <a href="../../../javafx/beans/value/ObservableNumberValue.html" title="interface in javafx.beans.value"><code>ObservableNumberValue</code></a>, <a href="../../../javafx/beans/value/ObservableObjectValue.html" title="interface in javafx.beans.value"><code>ObservableObjectValue</code></a>, <a href="../../../javafx/beans/value/ObservableStringValue.html" title="interface in javafx.beans.value"><code>ObservableStringValue</code></a></dd> </dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/beans/value/ObservableValue.html#addListener-javafx.beans.value.ChangeListener-">addListener</a></span>(<a href="../../../javafx/beans/value/ChangeListener.html" title="interface in javafx.beans.value">ChangeListener</a><? super <a href="../../../javafx/beans/value/ObservableValue.html" title="type parameter in ObservableValue">T</a>> listener)</code> <div class="block">Adds a <a href="../../../javafx/beans/value/ChangeListener.html" title="interface in javafx.beans.value"><code>ChangeListener</code></a> which will be notified whenever the value of the <code>ObservableValue</code> changes.</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/value/ObservableValue.html" title="type parameter in ObservableValue">T</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/beans/value/ObservableValue.html#getValue--">getValue</a></span>()</code> <div class="block">Returns the current value of this <code>ObservableValue</code></div> </td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/beans/value/ObservableValue.html#removeListener-javafx.beans.value.ChangeListener-">removeListener</a></span>(<a href="../../../javafx/beans/value/ChangeListener.html" title="interface in javafx.beans.value">ChangeListener</a><? super <a href="../../../javafx/beans/value/ObservableValue.html" title="type parameter in ObservableValue">T</a>> listener)</code> <div class="block">Removes the given listener from the list of listeners, that are notified whenever the value of the <code>ObservableValue</code> changes.</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.javafx.beans.Observable"> <!-- --> </a> <h3>Methods inherited from interface javafx.beans.<a href="../../../javafx/beans/Observable.html" title="interface in javafx.beans">Observable</a></h3> <code><a href="../../../javafx/beans/Observable.html#addListener-javafx.beans.InvalidationListener-">addListener</a>, <a href="../../../javafx/beans/Observable.html#removeListener-javafx.beans.InvalidationListener-">removeListener</a></code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="addListener-javafx.beans.value.ChangeListener-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>addListener</h4> <pre>void addListener(<a href="../../../javafx/beans/value/ChangeListener.html" title="interface in javafx.beans.value">ChangeListener</a><? super <a href="../../../javafx/beans/value/ObservableValue.html" title="type parameter in ObservableValue">T</a>> listener)</pre> <div class="block">Adds a <a href="../../../javafx/beans/value/ChangeListener.html" title="interface in javafx.beans.value"><code>ChangeListener</code></a> which will be notified whenever the value of the <code>ObservableValue</code> changes. If the same listener is added more than once, then it will be notified more than once. That is, no check is made to ensure uniqueness. <p> Note that the same actual <code>ChangeListener</code> instance may be safely registered for different <code>ObservableValues</code>. <p> The <code>ObservableValue</code> stores a strong reference to the listener which will prevent the listener from being garbage collected and may result in a memory leak. It is recommended to either unregister a listener by calling <a href="../../../javafx/beans/value/ObservableValue.html#removeListener-javafx.beans.value.ChangeListener-"><code>removeListener</code></a> after use or to use an instance of <a href="../../../javafx/beans/value/WeakChangeListener.html" title="class in javafx.beans.value"><code>WeakChangeListener</code></a> avoid this situation.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>listener</code> - The listener to register</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the listener is null</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/beans/value/ObservableValue.html#removeListener-javafx.beans.value.ChangeListener-"><code>removeListener(ChangeListener)</code></a></dd> </dl> </li> </ul> <a name="removeListener-javafx.beans.value.ChangeListener-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>removeListener</h4> <pre>void removeListener(<a href="../../../javafx/beans/value/ChangeListener.html" title="interface in javafx.beans.value">ChangeListener</a><? super <a href="../../../javafx/beans/value/ObservableValue.html" title="type parameter in ObservableValue">T</a>> listener)</pre> <div class="block">Removes the given listener from the list of listeners, that are notified whenever the value of the <code>ObservableValue</code> changes. <p> If the given listener has not been previously registered (i.e. it was never added) then this method call is a no-op. If it had been previously added then it will be removed. If it had been added more than once, then only the first occurrence will be removed.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>listener</code> - The listener to remove</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the listener is null</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/beans/value/ObservableValue.html#addListener-javafx.beans.value.ChangeListener-"><code>addListener(ChangeListener)</code></a></dd> </dl> </li> </ul> <a name="getValue--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>getValue</h4> <pre><a href="../../../javafx/beans/value/ObservableValue.html" title="type parameter in ObservableValue">T</a> getValue()</pre> <div class="block">Returns the current value of this <code>ObservableValue</code></div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>The current value</dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/ObservableValue.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">JavaFX 8</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../javafx/beans/value/ObservableStringValue.html" title="interface in javafx.beans.value"><span class="typeNameLink">Prev Class</span></a></li> <li><a href="../../../javafx/beans/value/ObservableValueBase.html" title="class in javafx.beans.value"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?javafx/beans/value/ObservableValue.html" target="_top">Frames</a></li> <li><a href="ObservableValue.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li>Nested | </li> <li>Field | </li> <li>Constr | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li>Field | </li> <li>Constr | </li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small><small><a href="https://docs.oracle.com/javase/8/docs/legal/cpyr.html">Copyright</a> (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.</small></small></p> </body> </html>