Top Fields Constructors Methods
com.dlsc.gemsfx.treeview

public Class TreeNodeCell<T>

extends BorderPane
Class Inheritance
Imports
javafx.beans.InvalidationListener, javafx.beans.binding.Bindings, javafx.beans.property.BooleanProperty, .ObjectProperty, .ReadOnlyObjectProperty, .ReadOnlyObjectWrapper, .SimpleBooleanProperty, .SimpleObjectProperty, .SimpleStringProperty, .StringProperty, javafx.css.PseudoClass, javafx.scene.Node, javafx.scene.control.Label, javafx.scene.layout.BorderPane, .Region, .StackPane, java.util.Objects

Field Summary

Modifier and TypeField and Description
private final StackPane
private static final PseudoClass
private static final boolean
private static final String
private final BooleanProperty
private static final PseudoClass
private final ObjectProperty<Node>
private final Label
private InvalidationListener
private final ObjectProperty<T>
private final StringProperty
private final ReadOnlyObjectWrapper<TreeNode<T>>

Constructor Summary

AccessConstructor and Description
public
public
TreeNodeCell(T item)

Method Summary

Modifier and TypeMethod and Description
public BooleanProperty
public Node
public T
public String
public TreeNode<T>
public String
getUserAgentStylesheet()

Overrides javafx.scene.layout.Region.getUserAgentStylesheet.

An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method.

public ObjectProperty<Node>
public boolean
public ObjectProperty<T>
public void
setExpanded(boolean expanded)

public void
setGraphic(Node graphic)

public void
setItem(T item)

public void
protected void
setTreeNode(TreeNode<T> treeNode)

public StringProperty
public ReadOnlyObjectProperty<TreeNode<T>>
protected void
updateItem(T item)

Inherited from javafx.scene.layout.BorderPane:
bottomPropertycenterPropertyclearConstraintscomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthgetAlignmentgetBottomgetCentergetContentBiasgetLeftgetMargingetRightgetToplayoutChildrenleftPropertyrightPropertysetAlignmentsetBottomsetCentersetLeftsetMarginsetRightsetToptopProperty

Field Detail

arrowWrapperback to summary
private final StackPane arrowWrapper
COLLAPSED_PSEUDOCLASS_STATEback to summary
private static final PseudoClass COLLAPSED_PSEUDOCLASS_STATE
DEFAULT_EXPANDEDback to summary
private static final boolean DEFAULT_EXPANDED
DEFAULT_STYLE_CLASSback to summary
private static final String DEFAULT_STYLE_CLASS
expandedback to summary
private final BooleanProperty expanded
EXPANDED_PSEUDOCLASS_STATEback to summary
private static final PseudoClass EXPANDED_PSEUDOCLASS_STATE
graphicback to summary
private final ObjectProperty<Node> graphic
innerLabelback to summary
private final Label innerLabel
invalidationListenerback to summary
private InvalidationListener invalidationListener
itemback to summary
private final ObjectProperty<T> item
textback to summary
private final StringProperty text
treeNodeback to summary
private final ReadOnlyObjectWrapper<TreeNode<T>> treeNode

Constructor Detail

TreeNodeCellback to summary
public TreeNodeCell()
TreeNodeCellback to summary
public TreeNodeCell(T item)

Method Detail

expandedPropertyback to summary
public BooleanProperty expandedProperty()
getGraphicback to summary
public Node getGraphic()
getItemback to summary
public T getItem()
getTextback to summary
public String getText()
getTreeNodeback to summary
public TreeNode<T> getTreeNode()
getUserAgentStylesheetback to summary
public String getUserAgentStylesheet()

Overrides javafx.scene.layout.Region.getUserAgentStylesheet.

Doc from javafx.scene.layout.Region.getUserAgentStylesheet.

An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. These styles are used in addition to whatever user-agent stylesheets are in use. This provides a mechanism for third parties to introduce styles for custom controls.

The URL is a hierarchical URI of the form [scheme:][//authority][path]. If the URL does not have a [scheme:] component, the URL is considered to be the [path] component only. Any leading '/' character of the [path] is ignored and the [path] is treated as a path relative to the root of the application's classpath.

Subclasses overriding this method should not assume any particular implementation approach as to the number and frequency with which it is called. For this reason, attempting any kind of dynamic implementation (i.e. returning different user agent stylesheet values) based on some state change is highly discouraged, as there is no guarantee when, or even if, this method will be called. Some JavaFX CSS implementations may choose to cache this response for an indefinite period of time, and therefore there should be no expectation around when this method is called.



package com.example.javafx.app;

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class MyApp extends Application {

    @Override public void start(Stage stage) {
        Scene scene = new Scene(new Group());
        scene.getStylesheets().add("/com/example/javafx/app/mystyles.css");
        stage.setScene(scene);
        stage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}
For additional information about using CSS with the scene graph, see the CSS Reference Guide.
Annotations
@Override
graphicPropertyback to summary
public ObjectProperty<Node> graphicProperty()
isExpandedback to summary
public boolean isExpanded()
itemPropertyback to summary
public ObjectProperty<T> itemProperty()
setExpandedback to summary
public void setExpanded(boolean expanded)
setGraphicback to summary
public void setGraphic(Node graphic)
setItemback to summary
public void setItem(T item)
setTextback to summary
public void setText(String text)
setTreeNodeback to summary
protected void setTreeNode(TreeNode<T> treeNode)
textPropertyback to summary
public StringProperty textProperty()
treeNodePropertyback to summary
public ReadOnlyObjectProperty<TreeNode<T>> treeNodeProperty()
updateItemback to summary
protected void updateItem(T item)