APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.javafx.scene

public Class TreeShowingProperty

extends ReadOnlyBooleanPropertyBase
Class Inheritance
Imports
javafx.beans.property.ReadOnlyBooleanPropertyBase, javafx.beans.value.ChangeListener, javafx.scene.Node, .Scene, javafx.stage.Window

Used to observe changes in tree showing status for a Node. For a Node's tree to be showing it must be visible, its ancestors must be visible, the node must be part of a Scene and the scene must have a Window which is currently showing.

This class provides the exact same functionality as NodeHelper#isTreeShowing(Node) in an observable form.

Field Summary

Modifier and TypeField and Description
private final Node
private final ChangeListener<Scene>
private final ChangeListener<Window>
private boolean
private boolean
private final ChangeListener<Boolean>

Constructor Summary

AccessConstructor and Description
public
TreeShowingProperty(Node
a Node for which the tree showing status should be observed, cannot be null
node
)

Constructs a new instance.

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Cleans up any listeners that this class may have registered on the Node that was supplied at construction.

public boolean
get()

Implements javafx.beans.value.ObservableBooleanValue.get.

Returns the current value of this ObservableBooleanValue.

public Object
getBean()

Implements javafx.beans.property.ReadOnlyProperty.getBean.

Returns the Object that contains this property.

public String
getName()

Implements javafx.beans.property.ReadOnlyProperty.getName.

Returns the name of this property.

protected void
private void
sceneChanged(Scene oldScene, Scene newScene)

private void
private void
windowChanged(Window oldWindow, Window newWindow)

Inherited from javafx.beans.property.ReadOnlyBooleanPropertyBase:
addListeneraddListenerfireValueChangedEventremoveListenerremoveListener

Field Detail

nodeback to summary
private final Node node
nodeSceneChangedListenerback to summary
private final ChangeListener<Scene> nodeSceneChangedListener
sceneWindowChangedListenerback to summary
private final ChangeListener<Window> sceneWindowChangedListener
treeShowingback to summary
private boolean treeShowing
validback to summary
private boolean valid
windowShowingChangedListenerback to summary
private final ChangeListener<Boolean> windowShowingChangedListener

Constructor Detail

TreeShowingPropertyback to summary
public TreeShowingProperty(Node node)

Constructs a new instance.

Parameters
node:Node

a Node for which the tree showing status should be observed, cannot be null

Method Detail

disposeback to summary
public void dispose()

Cleans up any listeners that this class may have registered on the Node that was supplied at construction.

getback to summary
public boolean get()

Implements javafx.beans.value.ObservableBooleanValue.get.

Doc from javafx.beans.value.ObservableBooleanValue.get.

Returns the current value of this ObservableBooleanValue.

Annotations
@Override
getBeanback to summary
public Object getBean()

Implements javafx.beans.property.ReadOnlyProperty.getBean.

Doc from javafx.beans.property.ReadOnlyProperty.getBean.

Returns the Object that contains this property. If this property is not contained in an Object, null is returned.

Annotations
@Override
getNameback to summary
public String getName()

Implements javafx.beans.property.ReadOnlyProperty.getName.

Doc from javafx.beans.property.ReadOnlyProperty.getName.

Returns the name of this property. If the property does not have a name, this method returns an empty String.

Annotations
@Override
invalidateback to summary
protected void invalidate()
sceneChangedback to summary
private void sceneChanged(Scene oldScene, Scene newScene)
updateTreeShowingback to summary
private void updateTreeShowing()
windowChangedback to summary
private void windowChanged(Window oldWindow, Window newWindow)