Spec-Zone .ru
спецификации, руководства, описания, API
|
public static class TreeItem.TreeModificationEvent<T> extends Event
Event
that contains relevant information for all forms of
TreeItem modifications.Constructor and Description |
---|
TreeItem.TreeModificationEvent(EventType<? extends Event> 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.
|
TreeItem.TreeModificationEvent(EventType<? extends Event> eventType,
TreeItem<T> treeItem,
boolean expanded)
Constructs a TreeModificationEvent for when the TreeItem has had its
TreeItem.expandedProperty() changed. |
TreeItem.TreeModificationEvent(EventType<? extends Event> 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.
|
TreeItem.TreeModificationEvent(EventType<? extends Event> 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.
|
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 |
getSource()
Returns the TreeItem upon which this event occurred.
|
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 |
wasRemoved()
Returns true if this event represents a TreeItem event where children
TreeItems were removed.
|
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumed
public TreeItem.TreeModificationEvent(EventType<? extends Event> eventType, TreeItem<T> treeItem)
eventType
- The type of the event that has occurred.treeItem
- The TreeItem on which this event occurred.public TreeItem.TreeModificationEvent(EventType<? extends Event> 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 TreeItem.TreeModificationEvent(EventType<? extends Event> 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 TreeItem.TreeModificationEvent(EventType<? extends Event> 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.public TreeItem getSource()
getSource
in class java.util.EventObject
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()
Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to