Modifier and Type | Field and Description |
---|---|
private java.util.List<? extends TreeItem<T>> |
added |
static <any> |
ANY
Common supertype for all tree modification event types.
|
private <any> |
change |
private T |
newValue |
private java.util.List<? extends TreeItem<T>> |
removed |
private static long |
serialVersionUID |
private TreeItem<T> |
treeItem |
private boolean |
wasCollapsed |
private boolean |
wasExpanded |
private boolean |
wasPermutated |
Modifier | Constructor and Description |
---|---|
|
TreeModificationEvent(<any> eventType,
TreeItem<T> treeItem)
Constructs a basic TreeModificationEvent - this is useful in situations
where the tree item has not received a new value, has not changed
between expanded/collapsed states, and whose children has not changed.
|
|
TreeModificationEvent(<any> eventType,
TreeItem<T> treeItem,
boolean expanded)
Constructs a TreeModificationEvent for when the TreeItem has had its
TreeItem.expandedProperty() changed. |
|
TreeModificationEvent(<any> eventType,
TreeItem<T> treeItem,
java.util.List<? extends TreeItem<T>> added,
java.util.List<? extends TreeItem<T>> removed)
Constructs a TreeModificationEvent for when the TreeItem has had its
children list changed.
|
private |
TreeModificationEvent(<any> eventType,
TreeItem<T> treeItem,
java.util.List<? extends TreeItem<T>> added,
java.util.List<? extends TreeItem<T>> removed,
<any> change)
Constructs a TreeModificationEvent for when the TreeItem has had its
children list changed, including the
javafx.collections.ListChangeListener.Change that has taken place. |
|
TreeModificationEvent(<any> eventType,
TreeItem<T> treeItem,
T newValue)
Constructs a TreeModificationEvent for when the TreeItem has had its
TreeItem.valueProperty() changed. |
Modifier and Type | Method and Description |
---|---|
java.util.List<? extends TreeItem<T>> |
getAddedChildren()
Returns the children added to the TreeItem in this event, or an empty
list if no children were added.
|
int |
getAddedSize()
Returns the number of children items that were added in this event,
or zero if no children were added.
|
(package private) <any> |
getChange() |
(package private) int |
getFrom() |
T |
getNewValue()
If the value of the TreeItem changed, this method will return the new
value.
|
java.util.List<? extends TreeItem<T>> |
getRemovedChildren()
Returns the children removed from the TreeItem in this event, or an
empty list if no children were added.
|
int |
getRemovedSize()
Returns the number of children items that were removed in this event,
or zero if no children were removed.
|
TreeItem<T> |
getSource()
Returns the TreeItem upon which this event occurred.
|
(package private) int |
getTo() |
TreeItem<T> |
getTreeItem()
Returns the TreeItem that this event occurred upon.
|
boolean |
wasAdded()
Returns true if this event represents a TreeItem event where children
TreeItems were added.
|
boolean |
wasCollapsed()
Returns true if this event represents a TreeItem collapse event,
and false if the TreeItem was not collapsed.
|
boolean |
wasExpanded()
Returns true if this event represents a TreeItem expansion event,
and false if the TreeItem was not expanded.
|
boolean |
wasPermutated()
Returns true if the order of the TreeItem children list has changed,
but that there have been no additions or removals.
|
boolean |
wasRemoved()
Returns true if this event represents a TreeItem event where children
TreeItems were removed.
|
private static final long serialVersionUID
public static final <any> ANY
private final T newValue
private final <any> change
private final boolean wasExpanded
private final boolean wasCollapsed
private boolean wasPermutated
public TreeModificationEvent(<any> eventType, TreeItem<T> treeItem)
eventType
- The type of the event that has occurred.treeItem
- The TreeItem on which this event occurred.public TreeModificationEvent(<any> eventType, TreeItem<T> treeItem, T newValue)
TreeItem.valueProperty()
changed.eventType
- The type of the event that has occurred.treeItem
- The TreeItem on which this event occurred.newValue
- The new value that has been put into the
TreeItem.valueProperty()
.public TreeModificationEvent(<any> eventType, TreeItem<T> treeItem, boolean expanded)
TreeItem.expandedProperty()
changed.eventType
- The type of the event that has occurred.treeItem
- The TreeItem on which this event occurred.expanded
- A boolean to represent the current expanded
state of the TreeItem.public TreeModificationEvent(<any> eventType, TreeItem<T> treeItem, java.util.List<? extends TreeItem<T>> added, java.util.List<? extends TreeItem<T>> removed)
eventType
- The type of the event that has occurred.treeItem
- The TreeItem on which this event occurred.added
- A list of the items added to the children list of the
given TreeItem.removed
- A list of the items removed from the children list of
the given TreeItem.private TreeModificationEvent(<any> eventType, TreeItem<T> treeItem, java.util.List<? extends TreeItem<T>> added, java.util.List<? extends TreeItem<T>> removed, <any> change)
javafx.collections.ListChangeListener.Change
that has taken place.eventType
- The type of the event that has occurred.treeItem
- The TreeItem on which this event occurred.added
- A list of the items added to the children list of the
given TreeItem.removed
- A list of the items removed from the children list of
the given TreeItem.change
- The actual change that has taken place on the children list.public TreeItem<T> getSource()
public TreeItem<T> getTreeItem()
public T getNewValue()
public java.util.List<? extends TreeItem<T>> getAddedChildren()
public java.util.List<? extends TreeItem<T>> getRemovedChildren()
public int getRemovedSize()
public int getAddedSize()
public boolean wasExpanded()
public boolean wasCollapsed()
public boolean wasAdded()
public boolean wasRemoved()
public boolean wasPermutated()
int getFrom()
int getTo()
<any> getChange()