Spec-Zone .ru
спецификации, руководства, описания, API
|
public static class TableView.TableViewFocusModel<S> extends FocusModel<S>
FocusModel
with additional functionality to support the requirements
of a TableView control.TableView
Type | Property and Description |
---|---|
ReadOnlyObjectProperty<TablePosition> |
focusedCell
The position of the current item in the TableView which has the focus.
|
focusedIndex, focusedItem
Constructor and Description |
---|
TableView.TableViewFocusModel(TableView<S> tableView)
Creates a default TableViewFocusModel instance that will be used to
manage focus of the provided TableView control.
|
Modifier and Type | Method and Description |
---|---|
void |
focus(int index)
Causes the item at the given index to receive the focus.
|
void |
focus(int row,
TableColumn<S,?> column)
Causes the item at the given index to receive the focus.
|
void |
focus(TablePosition pos)
Convenience method for setting focus on a particular row or cell
using a
TablePosition . |
void |
focusAboveCell()
Attempts to move focus to the cell above the currently focused cell.
|
void |
focusBelowCell()
Attempts to move focus to the cell below the currently focused cell.
|
ReadOnlyObjectProperty<TablePosition> |
focusedCellProperty()
The position of the current item in the TableView which has the focus.
|
void |
focusLeftCell()
Attempts to move focus to the cell to the left of the currently focused cell.
|
void |
focusRightCell()
Attempts to move focus to the cell to the right of the the currently focused cell.
|
TablePosition |
getFocusedCell()
Gets the value of the property focusedCell.
|
protected int |
getItemCount()
Returns the number of items in the data model that underpins the control.
|
protected S |
getModelItem(int index)
Returns the item at the given index.
|
boolean |
isFocused(int row,
TableColumn<S,?> column)
Tests whether the row / cell at the given location currently has the
focus within the TableView.
|
focusedIndexProperty, focusedItemProperty, focusNext, focusPrevious, getFocusedIndex, getFocusedItem, isFocused
public final ReadOnlyObjectProperty<TablePosition> focusedCellProperty
getFocusedCell()
public TableView.TableViewFocusModel(TableView<S> tableView)
tableView
- The tableView upon which this focus model operates.java.lang.NullPointerException
- The TableView argument can not be null.protected int getItemCount()
listView.getItems().size()
. The valid range of focusable
indices is between 0 and whatever is returned by this method.getItemCount
in class FocusModel<S>
protected S getModelItem(int index)
listView.getItems().get(index)
.getModelItem
in class FocusModel<S>
index
- The index of the item that is requested from the underlying
data model.public final ReadOnlyObjectProperty<TablePosition> focusedCellProperty()
getFocusedCell()
public final TablePosition getFocusedCell()
public void focus(int row, TableColumn<S,?> column)
row
- The row index of the item to give focus to.column
- The column of the item to give focus to. Can be null.public void focus(TablePosition pos)
TablePosition
.pos
- The table position where focus should be set.public boolean isFocused(int row, TableColumn<S,?> column)
public void focus(int index)
focusedIndex = -1
unless
0 <= index < model size
.focus
in class FocusModel<S>
index
- The index of the item to get focus.public void focusAboveCell()
public void focusBelowCell()
public void focusLeftCell()
public void focusRightCell()
Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to