< prev index next >
modules/javafx.controls/src/main/java/javafx/scene/control/CheckBoxTreeItem.java
Print this page
@@ -72,10 +72,11 @@
* treeView.setRoot(gilesFamily);
*
* // set the cell factory
* treeView.setCellFactory(CheckBoxTreeCell.<String>forTreeView());</code></pre>
*
+ * @param <T> The type of the value contained within the TreeItem
* @see CheckBoxTreeCell
* @see TreeItem
* @see CheckBox
* @since JavaFX 2.2
*/
@@ -97,10 +98,12 @@
* }
* });}
* </pre>
*
* @param <T> The type of the value contained within the TreeItem.
+ * @return the EventType used when the CheckBoxTreeItem selection / indeterminate
+ * state changes
*/
@SuppressWarnings("unchecked")
public static <T> EventType<TreeModificationEvent<T>> checkBoxSelectionChangedEvent() {
return (EventType<TreeModificationEvent<T>>) CHECK_BOX_SELECTION_CHANGED_EVENT;
}
@@ -201,30 +204,54 @@
@Override protected void invalidated() {
super.invalidated();
fireEvent(CheckBoxTreeItem.this, true);
}
};
- /** Sets the selected state of this CheckBoxTreeItem. */
+
+ /**
+ * Sets the selected state of this CheckBoxTreeItem.
+ * @param value the selected state of this CheckBoxTreeItem
+ */
public final void setSelected(boolean value) { selectedProperty().setValue(value); }
- /** Returns the selected state of this CheckBoxTreeItem. */
+
+ /**
+ * Returns the selected state of this CheckBoxTreeItem.
+ * @return true if CheckBoxTreeItem is selected
+ */
public final boolean isSelected() { return selected.getValue(); }
- /** A {@link BooleanProperty} used to represent the selected state of this CheckBoxTreeItem. */
+
+ /**
+ * A {@link BooleanProperty} used to represent the selected state of this CheckBoxTreeItem.
+ * @return the selected state property of this CheckBoxTreeItem
+ */
public final BooleanProperty selectedProperty() { return selected; }
// --- Indeterminate
private final BooleanProperty indeterminate = new SimpleBooleanProperty(this, "indeterminate", false) {
@Override protected void invalidated() {
super.invalidated();
fireEvent(CheckBoxTreeItem.this, false);
}
};
- /** Sets the indeterminate state of this CheckBoxTreeItem. */
+
+ /**
+ * Sets the indeterminate state of this CheckBoxTreeItem.
+ * @param value the indeterminate state of this CheckBoxTreeItem
+ */
public final void setIndeterminate(boolean value) { indeterminateProperty().setValue(value); }
- /** Returns the indeterminate state of this CheckBoxTreeItem. */
+
+ /**
+ * Returns the indeterminate state of this CheckBoxTreeItem.
+ * @return true if CheckBoxTreeItem is indeterminate state
+ */
public final boolean isIndeterminate() { return indeterminate.getValue(); }
- /** A {@link BooleanProperty} used to represent the indeterminate state of this CheckBoxTreeItem. */
+
+ /**
+ * A {@link BooleanProperty} used to represent the indeterminate state of this CheckBoxTreeItem.
+ * @return the indeterminate state property of this CheckBoxTreeItem
+ */
public final BooleanProperty indeterminateProperty() { return indeterminate; }
// --- Independent
/**
@@ -235,10 +262,11 @@
* <p>By default, the independent property is false, which means that when
* a CheckBoxTreeItem has state changes to the selected or indeterminate
* properties, the state of related CheckBoxTreeItems will possibly be changed.
* If the independent property is set to true, the state of related CheckBoxTreeItems
* will <b>never</b> change.
+ * @return the independent state property of this CheckBoxTreeItem
*/
public final BooleanProperty independentProperty() { return independent; }
private final BooleanProperty independent = new SimpleBooleanProperty(this, "independent", false);
public final void setIndependent(boolean value) { independentProperty().setValue(value); }
public final boolean isIndependent() { return independent.getValue(); }
@@ -338,10 +366,13 @@
/**
* Creates a default TreeModificationEvent instance to represent the
* change in selection/indeterminate states for the given CheckBoxTreeItem
* instance.
+ * @param eventType the eventType
+ * @param treeItem the treeItem
+ * @param selectionChanged the selectioonChanged
*/
public TreeModificationEvent(EventType<? extends Event> eventType, CheckBoxTreeItem<T> treeItem, boolean selectionChanged) {
super(eventType);
this.treeItem = treeItem;
this.selectionChanged = selectionChanged;
@@ -354,21 +385,23 @@
public CheckBoxTreeItem<T> getTreeItem() {
return treeItem;
}
/**
- * Indicates the the reason for this event is that the selection on the
+ * Indicates the reason for this event is that the selection on the
* CheckBoxTreeItem changed (as opposed to it becoming indeterminate).
+ * @return has the CheckBoxTreeItem's selection changed
*/
public boolean wasSelectionChanged() {
return selectionChanged;
}
/**
- * Indicates the the reason for this event is that the indeterminate
+ * Indicates the reason for this event is that the indeterminate
* state on the CheckBoxTreeItem changed (as opposed to it becoming
* selected or unselected).
+ * @return has the CheckBoxTreeItem's indeterminate changed
*/
public boolean wasIndeterminateChanged() {
return ! selectionChanged;
}
}
< prev index next >