Class TreeTableView.TreeTableViewFocusModel<S>
java.lang.Object
javafx.scene.control.FocusModel<TreeItem<S>>
javafx.scene.control.TableFocusModel<TreeItem<S>,TreeTableColumn<S,?>>
  
javafx.scene.control.TreeTableView.TreeTableViewFocusModel<S>
- Type Parameters:
- S- the type of the TreeItem instances used in this TreeTableView
- Enclosing class:
- TreeTableView<S>
public static class TreeTableView.TreeTableViewFocusModel<S>
extends TableFocusModel<TreeItem<S>,TreeTableColumn<S,?>>  
A 
FocusModel with additional functionality to support the requirements
 of a TableView control.- Since:
- JavaFX 8.0
- See Also:
- 
Property SummaryPropertiesTypePropertyDescriptionfinal ReadOnlyObjectProperty<TreeTablePosition<S, ?>> The position of the current item in the TableView which has the focus.Properties declared in class javafx.scene.control.FocusModelfocusedIndex, focusedItem
- 
Constructor SummaryConstructorsConstructorDescriptionTreeTableViewFocusModel(TreeTableView<S> treeTableView) Creates a default TableViewFocusModel instance that will be used to manage focus of the provided TableView control.
- 
Method SummaryModifier and TypeMethodDescriptionvoidfocus(int index) Causes the item at the given index to receive the focus.voidfocus(int row, TreeTableColumn<S, ?> column) Causes the item at the given index to receive the focus.voidfocus(TreeTablePosition<S, ?> pos) Convenience method for setting focus on a particular row or cell using aTablePosition.voidAttempts to move focus to the cell above the currently focused cell.voidAttempts to move focus to the cell below the currently focused cell.final ReadOnlyObjectProperty<TreeTablePosition<S, ?>> The position of the current item in the TableView which has the focus.voidAttempts to move focus to the cell to the left of the currently focused cell.voidAttempts to move focus to the cell to the right of the the currently focused cell.final TreeTablePosition<S, ?> Gets the value of thefocusedCellproperty.protected intReturns the number of items in the data model that underpins the control.getModelItem(int index) Returns the item at the given index.booleanisFocused(int row, TreeTableColumn<S, ?> column) Tests whether the row / cell at the given location currently has the focus within the TableView.Methods declared in class javafx.scene.control.FocusModelfocusedIndexProperty, focusedItemProperty, focusNext, focusPrevious, getFocusedIndex, getFocusedItem, isFocused
- 
Property Details- 
focusedCellThe position of the current item in the TableView which has the focus.- See Also:
 
 
- 
- 
Constructor Details- 
TreeTableViewFocusModelCreates a default TableViewFocusModel instance that will be used to manage focus of the provided TableView control.- Parameters:
- treeTableView- The tableView upon which this focus model operates.
- Throws:
- NullPointerException- The TableView argument can not be null.
 
 
- 
- 
Method Details- 
getItemCountprotected int getItemCount()Returns the number of items in the data model that underpins the control. An example would be that a ListView focus model would likely returnlistView.getItems().size(). The valid range of focusable indices is between 0 and whatever is returned by this method.- Specified by:
- getItemCountin class- FocusModel<TreeItem<S>>
- Returns:
- the number of items in the data model that underpins the control
 
- 
getModelItemReturns the item at the given index. An example using ListView would belistView.getItems().get(index).- Specified by:
- getModelItemin class- FocusModel<TreeItem<S>>
- Parameters:
- index- The index of the item that is requested from the underlying data model.
- Returns:
- Returns null if the index is out of bounds, or an element of type T that is related to the given index.
 
- 
focusedCellPropertyThe position of the current item in the TableView which has the focus.- Returns:
- the focusedCellproperty
- See Also:
 
- 
getFocusedCellGets the value of thefocusedCellproperty.- Property description:
- The position of the current item in the TableView which has the focus.
- Returns:
- the value of the focusedCellproperty
- See Also:
 
- 
focusCauses the item at the given index to receive the focus.- Specified by:
- focusin class- TableFocusModel<TreeItem<S>,- TreeTableColumn<S, - ?>> 
- Parameters:
- row- The row index of the item to give focus to.
- column- The column of the item to give focus to. Can be null.
 
- 
focusConvenience method for setting focus on a particular row or cell using aTablePosition.- Parameters:
- pos- The table position where focus should be set.
 
- 
isFocusedTests whether the row / cell at the given location currently has the focus within the TableView.- Specified by:
- isFocusedin class- TableFocusModel<TreeItem<S>,- TreeTableColumn<S, - ?>> 
- Parameters:
- row- the row
- column- the column
- Returns:
- true if the row / cell at the given location currently has the focus within the UI control
 
- 
focuspublic void focus(int index) Causes the item at the given index to receive the focus. This does not cause the current selection to change. Updates the focusedItem and focusedIndex properties such thatfocusedIndex = -1unless
 .0 <= index < model size- Overrides:
- focusin class- FocusModel<TreeItem<S>>
- Parameters:
- index- The index of the item to get focus.
 
- 
focusAboveCellpublic void focusAboveCell()Attempts to move focus to the cell above the currently focused cell.- Specified by:
- focusAboveCellin class- TableFocusModel<TreeItem<S>,- TreeTableColumn<S, - ?>> 
 
- 
focusBelowCellpublic void focusBelowCell()Attempts to move focus to the cell below the currently focused cell.- Specified by:
- focusBelowCellin class- TableFocusModel<TreeItem<S>,- TreeTableColumn<S, - ?>> 
 
- 
focusLeftCellpublic void focusLeftCell()Attempts to move focus to the cell to the left of the currently focused cell.- Specified by:
- focusLeftCellin class- TableFocusModel<TreeItem<S>,- TreeTableColumn<S, - ?>> 
 
- 
focusRightCellpublic void focusRightCell()Attempts to move focus to the cell to the right of the the currently focused cell.- Specified by:
- focusRightCellin class- TableFocusModel<TreeItem<S>,- TreeTableColumn<S, - ?>> 
 
 
-