Top Description Inners Fields Constructors Methods
com.dlsc.showcase.impl

public Class SamplePageTreeTableHelper

extends Object
Class Inheritance
Imports
javafx.beans.property.ReadOnlyObjectWrapper, javafx.collections.ObservableList, javafx.scene.Node, javafx.scene.control.*, javafx.scene.shape.SVGPath, java.text.DateFormat, .NumberFormat, .SimpleDateFormat, java.util.*

Helper class for creating tree table views for testing

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final DateFormat
private static int
private static final String
private static int
private static final String
private static final NumberFormat
private static final Random
private static final SamplePageTreeTableHelper.DummyFile

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static TreeTableView<S>
private static SamplePageTreeTableHelper.DummyFile
createDirectory(double subdirectoryPercentage)

private static SamplePageTreeTableHelper.DummyFile
private static Node
private static Node
pack-priv static TreeTableView<S>
createTreeTableView(int width, boolean cellSelection)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dfback to summary
private static final DateFormat df
directoryCountback to summary
private static int directoryCount
FILEback to summary
private static final String FILE
fileCountback to summary
private static int fileCount
FOLDERback to summary
private static final String FOLDER
nfback to summary
private static final NumberFormat nf
RANDOMback to summary
private static final Random RANDOM
ROOTback to summary
private static final SamplePageTreeTableHelper.DummyFile ROOT

Constructor Detail

SamplePageTreeTableHelperback to summary
public SamplePageTreeTableHelper()

Method Detail

buildFileBrowserTreeTableViewback to summary
private static TreeTableView<S> buildFileBrowserTreeTableView()
createDirectoryback to summary
private static SamplePageTreeTableHelper.DummyFile createDirectory(double subdirectoryPercentage)
createFileback to summary
private static SamplePageTreeTableHelper.DummyFile createFile()
createFILEback to summary
private static Node createFILE()
createFOLDERback to summary
private static Node createFOLDER()
createTreeTableViewback to summary
pack-priv static TreeTableView<S> createTreeTableView(int width, boolean cellSelection)
com.dlsc.showcase.impl back to summary

private Class SamplePageTreeTableHelper.DummyFile

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final SamplePageTreeTableHelper.DummyFile[]
private final Date
private final String
private final int

Constructor Summary

AccessConstructor and Description
public
DummyFile(String name, int size, Date modified)

public

Method Summary

Modifier and TypeMethod and Description
public SamplePageTreeTableHelper.DummyFile[]
public Date
public String
public int
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

childrenback to summary
private final SamplePageTreeTableHelper.DummyFile[] children
modifiedback to summary
private final Date modified
nameback to summary
private final String name
sizeback to summary
private final int size

Constructor Detail

DummyFileback to summary
public DummyFile(String name, int size, Date modified)
DummyFileback to summary
public DummyFile(String name, Date modified, SamplePageTreeTableHelper.DummyFile[] children)

Method Detail

getChildrenback to summary
public SamplePageTreeTableHelper.DummyFile[] getChildren()
getModifiedback to summary
public Date getModified()
getNameback to summary
public String getName()
getSizeback to summary
public int getSize()
isDirectoryback to summary
public boolean isDirectory()
com.dlsc.showcase.impl back to summary

private Class SamplePageTreeTableHelper.FileTreeItem

extends TreeItem<SamplePageTreeTableHelper.DummyFile>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ObservableList<TreeItem<SamplePageTreeTableHelper.DummyFile>>
getChildren()

Overrides javafx.scene.control.TreeItem.getChildren.

The children of this TreeItem.

public boolean
isLeaf()

Overrides javafx.scene.control.TreeItem.isLeaf.

A TreeItem is a leaf if it has no children.

Inherited from javafx.scene.control.TreeItem:
addEventFilteraddEventHandlerbranchCollapsedEventbranchExpandedEventbuildEventDispatchChainchildrenModificationEventexpandedItemCountChangeEventexpandedPropertygetGraphicgetParentgetValuegraphicChangedEventgraphicPropertyisExpandedleafPropertynextSiblingnextSiblingparentPropertypreviousSiblingpreviousSiblingremoveEventFilterremoveEventHandlersetExpandedsetGraphicsetValuetoStringtreeNotificationEventvalueChangedEventvalueProperty

Field Detail

isFirstTimeChildrenback to summary
private boolean isFirstTimeChildren

Constructor Detail

FileTreeItemback to summary
public FileTreeItem(SamplePageTreeTableHelper.DummyFile value)

Method Detail

getChildrenback to summary
public ObservableList<TreeItem<SamplePageTreeTableHelper.DummyFile>> getChildren()

Overrides javafx.scene.control.TreeItem.getChildren.

Doc from javafx.scene.control.TreeItem.getChildren.

The children of this TreeItem. This method is called frequently, and it is therefore recommended that the returned list be cached by any TreeItem implementations.

Returns:ObservableList<TreeItem<SamplePageTreeTableHelper.DummyFile>>

a list that contains the child TreeItems belonging to the TreeItem.

Annotations
@Override
isLeafback to summary
public boolean isLeaf()

Overrides javafx.scene.control.TreeItem.isLeaf.

Doc from javafx.scene.control.TreeItem.isLeaf.

A TreeItem is a leaf if it has no children. The isLeaf method may of course be overridden by subclasses to support alternate means of defining how a TreeItem may be a leaf, but the general premise is the same: a leaf can not be expanded by the user, and as such will not show a disclosure node or respond to expansion requests.

Returns:boolean

true if this TreeItem has no children

Annotations
@Override