Краткий обзор
Выводит на экран горизонталь или вертикальный список элементов, из которых пользователь может выбрать, или с которым может взаимодействовать пользователь. ListView создается из последовательности "элементов", которые могут быть любым типом объекта данных домена. Например, это может быть последовательность Строк, Чисел, или Клиентов. Это может даже быть последовательность Узлов, хотя это является редким.
Модель данных ListView является последовательностью элементов. Элемент в той последовательности может быть selectedItem, кто, индексируют, доступно через selectedIndex.
visuals ListView может быть полностью настроен, создавая cellFactory для ListView. cellFactory используется для того, чтобы генерировать ListCell, который будет использоваться, чтобы представить некоторый элемент в ListView. См. Ячейку документация class для более полного описания того, как записать пользовательские Ячейки.
Профиль: распространенный
Сводка Переменной сценария
доступ | имя | ввести | Может Читать | Может Init | Может Записать | Значение по умолчанию | описание |
---|
Переменная Сводка
доступ | имя | ввести | Может Читать | Может Init | Может Записать | Значение по умолчанию | описание |
---|---|---|---|---|---|---|---|
общественность | cellFactory | функция ():ListCell |
Функция, которая производит ListCell. Функция, которая производит ListCell. Система ответственна за многократное использование ListCells. Возвратите из этой функции ListCell, который мог бы быть применимым для того, чтобы представить любой элемент в ListView. |
||||
считанный общественностью | focusedIndex | Целое число |
Индексирование focusedItem, или-1, если нет никакого фокусируемого элемента. |
||||
считанный общественностью | focusedItem | Объект |
Индексирование текущего элемента в ListView, у которого есть фокус. Индексирование текущего элемента в ListView, у которого есть фокус. Возможно, что это будет нулем, но только если представление списка пусто. Если ListView не будет самостоятельно фокусироваться, то эта переменная все еще сошлется на элемент, который получил бы клавиатурный фокус, если бы сами ListView фокусировались. |
||||
общественность | элементы | Объект [] |
Элементы данных содержатся в этом ListView. Элементы данных содержатся в этом ListView. Они могут быть Числами, Строками, Клиентами, или другими типами объектов. Кожа ListView ответственна за отображение и/или форматирование этих элементов и размещение их в Ячейках. Можно определить точно, как эти элементы данных должны быть представлены в ListView, определяя Ваше собственное |
||||
общественность | pannable | Булев |
Обозначает, является ли этот ListView pannable, перетаскивая элементы списка. |
||||
считанный общественностью | selectedIndex | Целое число |
Вывод индексирует текущего выбора, или-1, если нет никакого выбора |
||||
считанный общественностью | selectedItem | Объект |
Элемент в |
||||
общественность | вертикаль | Булев |
Ориентация |
Наследованные Переменные
javafx.scene.control. Управление
доступ | имя | ввести | Может Читать | Может Init | Может Записать | Значение по умолчанию | описание |
---|---|---|---|---|---|---|---|
общественность | кожа | Кожа |
Кожа, ответственная за рендеринг этого Кожа, ответственная за рендеринг этого Между a есть непосредственное отношение Кожа может быть нулем. Профиль: распространенный |
||||
общественность | подсказка | Подсказка |
Установите ToolTip для этого управления |
javafx.scene. Родитель
доступ | имя | ввести | Может Читать | Может Init | Может Записать | Значение по умолчанию | описание |
---|---|---|---|---|---|---|---|
защищенный | дочерние элементы | Узел [] | подкласс | подкласс | подкласс | пустой |
Последовательность дочернего элемента Последовательность дочернего элемента См. документацию class для Узла для ограничений структуры графика сцены на установку дочерней последовательности Родителя. Если эти ограничения нарушаются изменением к дочерней последовательности, изменение игнорируется, и предыдущее значение дочерней последовательности восстанавливается. Броски: Профиль: распространенный |
считанный общественностью защищенный | needsLayout | Булев | подкласс | подкласс |
Указывает, что этот Узел и его подузлы требуют, чтобы расположение передало следующий импульс. |
javafx.scene. Узел
доступ | имя | ввести | Может Читать | Может Init | Может Записать | Значение по умолчанию | описание |
---|---|---|---|---|---|---|---|
общественность | blocksMouse | Булев | ложь |
Если Если Профиль: распространенный |
|||
считанный общественностью | boundsInLocal | Границы |
Прямоугольные границы этого Прямоугольные границы этого Отметьте, что этот метод не принимает видимость узла во внимание; тест основан на геометрии этого Эта переменная всегда будет ненулевым значением. Отметьте, что boundsInLocal автоматически повторно вычисляется всякий раз, когда геометрия узла изменяется. Поэтому это - ошибка связать любое из этих значений в узле к выражению, которое зависит от этой переменной. Например, "x" или "y" переменные формы никогда не должны связываться с boundsInLocal с целью расположения узла. Профиль: распространенный |
||||
считанный общественностью | boundsInParent | Границы |
Прямоугольные границы этого Прямоугольные границы этого
Получающиеся границы будут концептуально в координатном пространстве Отметьте, что этот метод не принимает видимость узла во внимание; тест основан на геометрии этого Эта переменная всегда будет ненулевым значением. Отметьте, что boundsInParent автоматически повторно вычисляется всякий раз, когда геометрия узла изменяется, или когда любое следующее изменение: последовательность преобразований, транслатекс, translateY, layoutX, layoutY, scaleX, scaleY, или поворачивают переменную. Поэтому это - ошибка связать любое из этих значений в узле к выражению, которое зависит от этой переменной. Например, "x" или "y" переменные формы, или транслатекс, translateY никогда не должны связываться с boundsInParent с целью расположения узла. Профиль: распространенный |
||||
общественность | кэш | Булев | ложь |
Подсказка производительности к системе, чтобы указать, что на это Подсказка производительности к системе, чтобы указать, что на это
См. Также:
Профиль: распространенный |
|||
общественность | cacheHint | CacheHint | CacheHint. ЗНАЧЕНИЕ ПО УМОЛЧАНИЮ |
Дополнительная подсказка для того, чтобы управлять растровым кэшированием. Дополнительная подсказка для того, чтобы управлять растровым кэшированием. При определенных обстоятельствах, таких как анимация узлов, которые очень дороги, чтобы представить, это является требуемым, чтобы быть в состоянии выполнить преобразования на узле, не имея необходимость регенерировать кэшируемый битовый массив. Опция в таких случаях должна выполнить преобразования на кэшируемом битовом массиве непосредственно. Этот метод может обеспечить драматическое улучшение производительности анимации, хотя может также привести к сокращению визуального качества. Возможно включить cacheHint только время от времени, когда Ваш узел анимирует. Таким образом дорогие узлы могут появиться на экране с полным визуальным качеством, и всё же анимировать гладко. Пример: Отметьте это cacheHint только подсказка к системе. В зависимости от деталей узла или преобразования, может быть проигнорирована эта подсказка. Если
См. Также:
Профиль: распространенный |
|||
общественность | клип | Узел | нуль |
Определяет a Определяет a Например, можно использовать javafx.scene.image. Узел ImageView как маска, чтобы представить Клип. Или Вы могли использовать один из геометрических Узлов формы, таких как javafx.scene.shape. Прямоугольник или javafx.scene.shape. Круг. Или Вы могли использовать javafx.scene.text. Текстовый узел, чтобы представить Клип. См. документацию class для Узла для ограничений структуры графика сцены на установку клипа. Если эти ограничения нарушаются изменением к переменной клипа, изменение игнорируется, и предыдущее значение переменной клипа восстанавливается. Отметьте: это - условная функция. См. ConditionalFeature. SHAPE_CLIP для получения дополнительной информации. нульПрофиль: общее условное выражение shape_clip |
|||
общественность | курсор | Курсор | нуль |
Определяет курсор мыши для этого Определяет курсор мыши для этого Профиль: распространенный |
|||
общественность | отключить | Булев | ложь |
Устанавливает отдельное нерабочее состояние этого Устанавливает отдельное нерабочее состояние этого Профиль: распространенный |
|||
считанный общественностью | отключенный | Булев | ложь |
Указывает действительно ли это Указывает действительно ли это Отключенный Отключенный Профиль: распространенный |
|||
общественность | эффект | Эффект | нуль |
Определяет эффект примениться к этому Определяет эффект примениться к этому Отметьте: это - условная функция. См. ConditionalFeature. ЭФФЕКТ для получения дополнительной информации. нульПрофиль: общий условный эффект |
|||
считанный общественностью защищенный | фокусируемый | Булев | подкласс | подкласс | ложь |
Указывает ли это Указывает ли это Профиль: распространенный |
|
общественность | focusTraversable | Булев | ложь |
Определяет ли это Определяет ли это Профиль: распространенный |
|||
считанный общественностью защищенный | парение | Булев | подкласс | подкласс | ложь |
Действительно ли это Действительно ли это ОТМЕТЬТЕ: текущая реализация парения полагается на мышь, вводят и выходят из событий, чтобы определить, является ли этот Узел в состоянии парения; это означает, что эта функция в настоящий момент поддерживается только на системах, у которых есть мышь. Будущие реализации могут обеспечить альтернативные средства поддержки парения. ложьПрофиль: распространенный |
|
общественность | идентификатор | Строка | пустая строка |
Идентификатор этого Идентификатор этого Профиль: распространенный |
|||
считанный общественностью защищенный | layoutBounds | Границы | подкласс | подкласс |
Прямоугольные границы, которые должны использоваться для вычислений расположения на этом Прямоугольные границы, которые должны использоваться для вычислений расположения на этом См. javafx.scene.shape. Форма, javafx.scene.text. Text, Group, и javafx.scene.layout. Изменяемого размера для подробных описаний, на как Отметьте, что layoutX, layoutY, транслатекс, и translateY переменные не включаются в layoutBounds. Это важно, потому что код расположения должен сначала определить текущий размер и расположение Поскольку вычисление layoutBounds часто связывается к геометрическим переменным узла, это - ошибка связать любые такие переменные с выражением, которое зависит от Профиль: распространенный |
||
общественность | layoutInfo | LayoutInfoBase |
Рычаг для специфичной для узла информации о расположении используется контейнерами расположения. Рычаг для специфичной для узла информации о расположении используется контейнерами расположения. Если узел не будет дочерним элементом контейнера, который поддерживает информацию расположения, то эта переменная будет проигнорирована. Отметьте, что литералы объекта layoutInfo могут быть совместно использованы через узлы, что означает изменять вары на a |
||||
общественность | layoutX | Число | 0 |
Определяет x координату преобразования, которое добавляется к этому Определяет x координату преобразования, которое добавляется к этому Например, если Отказ вычесть Заключительное преобразование узла будет вычислено как Если узлом управляют и имеет javafx.scene.layout. Контейнер как его родитель, тогда контейнер установит layoutX согласно своей собственной политике расположения. Если узел неуправляем или порождается Группой или Сценой, то приложение может установить layoutX непосредственно, чтобы расположить это. 0Профиль: распространенный |
|||
общественность | layoutY | Число | 0 |
Определяет y координату преобразования, которое добавляется к этому Определяет y координату преобразования, которое добавляется к этому Например, если Отказ вычесть Заключительное преобразование узла будет вычислено как Если узлом управляют и имеет javafx.scene.layout. Контейнер как его родитель, тогда контейнер установит layoutY согласно своей собственной политике расположения. Если узел неуправляем или порождается Группой или Сценой, то приложение может установить layoutY непосредственно, чтобы расположить это. 0Профиль: распространенный |
|||
общественность | управляемый | Булев | истина |
Определяет, будет ли расположением этого узла управлять это - родитель. Определяет, будет ли расположением этого узла управлять это - родитель. Каждый родительский class следует за стратегией разметки управляемых дочерних элементов во время передачи расположения сцены:
Если Родительский узел будет неуправляем, то он будет действовать как корень для расположения, что означает, что расположение запрашивает ниже его, заставит только ответвление, базированное родительским узлом быть переданным. истина |
|||
общественность | onKeyPressed | функция (:KeyEvent):Void |
Определяет функцию, которую вызовут когда это |
||||
общественность | onKeyReleased | функция (:KeyEvent):Void |
Определяет функцию, которую вызовут когда это |
||||
общественность | onKeyTyped | функция (:KeyEvent):Void |
Определяет функцию, которую вызовут когда это |
||||
общественность | onMouseClicked | функция (:MouseEvent):Void |
Определяет функцию, которую вызовут, когда кнопкой мыши щелкнули (нажатый и выпущенный) на этом |
||||
общественность | onMouseDragged | функция (:MouseEvent):Void |
Определяет функцию, которую вызовут, когда кнопка мыши нажимается на этом |
||||
общественность | onMouseEntered | функция (:MouseEvent):Void |
Определяет функцию, которую вызовут, когда мышь вводит это |
||||
общественность | onMouseExited | функция (:MouseEvent):Void |
Определяет функцию, которую вызовут, когда мышь выходит из этого |
||||
общественность | onMouseMoved | функция (:MouseEvent):Void |
Определяет функцию, которую вызовут, когда курсор мыши перемещается в пределах этого |
||||
общественность | onMousePressed | функция (:MouseEvent):Void |
Определяет функцию, которую вызовут, когда кнопка мыши была нажата на этом |
||||
общественность | onMouseReleased | функция (:MouseEvent):Void |
Определяет функцию, которую вызовут, когда кнопка мыши была отпущена на этом |
||||
общественность | onMouseWheelMoved | функция (:MouseEvent):Void |
Определяет функцию, которую вызовут, когда колесико прокрутки мыши переместилось. |
||||
общественность | непрозрачность | Число | 1.0 |
Определяет как непрозрачный (то есть, тело) Определяет как непрозрачный (то есть, тело) Видимый узел с любой непрозрачностью, устанавливающей все еще, получает события от нажатия мыши и может получить клавиатурный фокус. Например, если Вы хотите иметь большой невидимый прямоугольный оверлей все Узлы в графике сцены, чтобы прервать события от нажатия мыши, но не быть видимыми пользователю, Вы могли создать большой Прямоугольник, у которого была непрозрачность 0 %. Непрозрачность определяется как значение между 0 и 1. Значения меньше чем 0 или больше чем 1 отсекаются к 0 и 1 соответственно. На некоторых платформах ImageView не мог бы поддерживать переменную непрозрачности. 1.0Профиль: распространенный |
|||
считанный общественностью пакет | родитель | Родитель | нуль |
Родитель этого Родитель этого Профиль: распространенный |
|||
общественность | pickOnBounds | Булев | ложь |
Определяет, как вычисление выбора делается для этого узла когда инициировано a Определяет, как вычисление выбора делается для этого узла когда инициировано a Профиль: распространенный |
|||
считанный общественностью защищенный | нажатый | Булев | подкласс | подкласс | ложь |
Действительно ли Действительно ли Профиль: распространенный |
|
общественность | вращаться | Число | 0.0 |
Определяет угол вращения о Определяет угол вращения о Этот фактор вращения не включается в layoutBounds по умолчанию, который делает его идеалом для того, чтобы повернуть весь узел после всех эффектов и преобразовывает, были приняты во внимание. Точка центра, о которой происходит вращение, является центром непреобразованного layoutBounds. Отметьте это, потому что точка центра вычисляется как центр этого Профиль: распространенный |
|||
общественность | rotationAxis | Point3D | Вращаться. Z_AXIS |
Определяет ось вращения этого Определяет ось вращения этого Отметьте: это - условная функция. См. ConditionalFeature. SCENE3D для получения дополнительной информации. Вращаться. Z_AXISПрофиль: общее условное выражение scene3d |
|||
общественность | scaleX | Число | 1.0 |
Определяет фактор, которым координаты масштабируются о центре объекта вдоль X осей этого Определяет фактор, которым координаты масштабируются о центре объекта вдоль X осей этого Этот масштабный коэффициент не включается в layoutBounds по умолчанию, который делает его идеалом для того, чтобы масштабировать весь узел после всех эффектов и преобразовывает, были приняты во внимание. Точка центра, о которой происходит масштаб, является центром непреобразованного layoutBounds. 1.0Профиль: распространенный |
|||
общественность | scaleY | Число | 1.0 |
Определяет фактор, которым координаты масштабируются о центре объекта вдоль Оси Y этого Определяет фактор, которым координаты масштабируются о центре объекта вдоль Оси Y этого Этот масштабный коэффициент не включается в layoutBounds по умолчанию, который делает его идеалом для того, чтобы масштабировать весь узел после всех эффектов и преобразовывает, были приняты во внимание. Точка центра, о которой происходит масштаб, является центром непреобразованного layoutBounds. 1.0Профиль: распространенный |
|||
общественность | scaleZ | Число | 1.0 |
Определяет фактор, которым координаты масштабируются о центре объекта вдоль Оси Z этого Определяет фактор, которым координаты масштабируются о центре объекта вдоль Оси Z этого Этот масштабный коэффициент не включается в layoutBounds по умолчанию, который делает его идеалом для того, чтобы масштабировать весь узел после всех эффектов и преобразовывает, были приняты во внимание. Точка центра, о которой происходит масштаб, является центром прямоугольных границ, сформированных, беря boundsInLocal и применяя все преобразования в преобразованиях [] последовательность. Отметьте: это - условная функция. См. ConditionalFeature. SCENE3D для получения дополнительной информации. 1.0Профиль: общее условное выражение scene3d |
|||
считанный общественностью пакет | сцена | Сцена | нуль |
Сцена, что это Сцена, что это Профиль: распространенный |
|||
общественность | стиль | Строка | пустая строка |
Строковое представление стиля CSS связалось с этим определенным Узлом. Строковое представление стиля CSS связалось с этим определенным Узлом. Это точно походит на атрибут "стиля" на элементе HTML, но использует синтаксис, определенный в CSS JavaFX. Парсинг этого стиля не мог бы поддерживаться на некоторых ограниченных платформах. Это - recomended, чтобы использовать автономный файл CSS вместо этого. пустая строкаПрофиль: распространенный |
|||
общественность | styleClass | Строка | пустая строка |
Строковый идентификатор, который может привыкнуть к логически групповым Узлам, определенно для внешнего механизма стиля. Строковый идентификатор, который может привыкнуть к логически групповым Узлам, определенно для внешнего механизма стиля. Эта переменная точно походит на атрибут styleClass на элементе HTML. пустая строкаПрофиль: распространенный |
|||
общественность | преобразовывает | Преобразуйте [] | пустой |
Определяет последовательность javafx.scene.transform. Преобразуйте объекты, которые будут применены к этому Определяет последовательность javafx.scene.transform. Преобразуйте объекты, которые будут применены к этому Профиль: распространенный |
|||
общественность | транслатекс | Число | 0 |
Определяет x координату преобразования, которое добавляется к этому Определяет x координату преобразования, которое добавляется к этому Заключительное преобразование узла будет вычислено как layoutX + Эта переменная может использоваться, чтобы изменить расположение узла, не нарушая его layoutBounds, который делает это полезным для анимации расположения узла. 0Профиль: распространенный |
|||
общественность | translateY | Число | 0 |
Определяет y координату преобразования, которое добавляется к этому Определяет y координату преобразования, которое добавляется к этому Заключительное преобразование узла будет вычислено как layoutY + Эта переменная может использоваться, чтобы изменить расположение узла, не нарушая его layoutBounds, который делает это полезным для анимации расположения узла. 0Профиль: распространенный |
|||
общественность | translateZ | Число | 0 |
Определяет координату Z преобразования, которое добавляется к преобразованным координатам этого Определяет координату Z преобразования, которое добавляется к преобразованным координатам этого Эта переменная может использоваться, чтобы изменить расположение Узла, не нарушая его границы расположения, который делает это полезным для анимации расположения узла. Отметьте: это - условная функция. См. ConditionalFeature. SCENE3D для получения дополнительной информации. 0Профиль: общее условное выражение scene3d |
|||
общественность | видимый | Булев | истина |
Определяет ли это Определяет ли это Профиль: распространенный |
javafx.scene.layout. Изменяемого размера
доступ | имя | ввести | Может Читать | Может Init | Может Записать | Значение по умолчанию | описание |
---|---|---|---|---|---|---|---|
общественность | height | Число |
Если приложение должно управлять height узла Изменяемого размера, это должно переопределить свое привилегированное использование height
Профиль: распространенный |
||||
общественность | width | Число |
Если приложение должно управлять width узла Изменяемого размера, это должно переопределить свое привилегированное использование width
Профиль: распространенный |
javafx.scene.text. TextOffsets
доступ | имя | ввести | Может Читать | Может Init | Может Записать | Значение по умолчанию | описание |
---|---|---|---|---|---|---|---|
считанный общественностью защищенный | baselineOffset | Число | подкласс | подкласс |
'Алфавитное' (или 'римлянин') базовое смещение от layoutBounds.minY расположения узла. |
Функциональная Сводка
- общественность clearSelection (): Пусто
- общедоступный фокус (itemIndex: Целое число): Пусто
-
Причины элемент в данном индексируют, чтобы получить фокус.
Причины элемент в данном индексируют, чтобы получить фокус. Это не заставляет текущий выбор изменяться. Наборы
focusedItem
иfocusedIndex
так, чтоfocusedIndex = -1
если0 <= itemIndex < sizeof items
- Parameters
- itemIndex
- The index of the item to get focus.
- public focusNextRow() : Void
- public focusPreviousRow() : Void
- public select(itemIndex: Integer) : Void
-
Cause the item at the given index to be selected.
Cause the item at the given index to be selected. Sets
selectedItem
andselectedIndex
such thatselectedIndex = -1
unless0<= itemIndex < sizeof items
- Parameters
- itemIndex
- The index of the item to be selected. Calling this function has no effect on the focusedItem.
- public selectFirstRow() : Void
- public selectLastRow() : Void
- public selectNextRow() : Void
- public selectPreviousRow() : Void
Inherited Functions
javafx.scene.control.Control
- public getHFill() : Boolean
- public getHGrow() : javafx.scene.layout.Priority
- public getHShrink() : javafx.scene.layout.Priority
- public getMaxHeight() : Number
- public getMaxWidth() : Number
- public getMinHeight() : Number
- public getMinWidth() : Number
- public getPrefHeight(width: Number) : Number
- public getPrefWidth(height: Number) : Number
- public getVFill() : Boolean
- public getVGrow() : javafx.scene.layout.Priority
- public getVShrink() : javafx.scene.layout.Priority
javafx.scene.Parent
- public layout() : Void
- public lookup(id: java.lang.String) : Node
- public requestLayout() : Void
-
Requests a layout pass to be performed before the next scene is rendered.
Requests a layout pass to be performed before the next scene is rendered. This is batched up asynchronously to happen once per "pulse", or frame of animation.
If this parent is either a layout root or unmanaged, then it will be added directly to the scene's dirty layout list, otherwise requestLayout will be invoked on its parent.
javafx.scene.Node
- public contains(localX: Number, localY: Number) : Boolean
-
Returns
true
if the given point (specified in the local coordinate space of thisNode
) is contained within the shape of thisNode
.Returns
true
if the given point (specified in the local coordinate space of thisNode
) is contained within the shape of thisNode
. Note that this method does not take visibility into account; the test is based on the geometry of thisNode
only.- Parameters
- localX
- localY
- Returns
- Boolean
Profile: common
- public contains(localPoint: Point2D) : Boolean
-
Returns
true
if the given point (specified in the local coordinate space of thisNode
) is contained within the shape of thisNode
.Returns
true
if the given point (specified in the local coordinate space of thisNode
) is contained within the shape of thisNode
. Note that this method does not take visibility into account; the test is based on the geometry of thisNode
only.- Parameters
- localPoint
- Returns
- Boolean
Profile: common
- public intersects(localX: Number, localY: Number, localWidth: Number, localHeight: Number) : Boolean
-
Returns
true
if the given rectangle (specified in the local coordinate space of thisNode
) intersects the shape of thisNode
.Returns
true
if the given rectangle (specified in the local coordinate space of thisNode
) intersects the shape of thisNode
. Note that this method does not take visibility into account; the test is based on the geometry of thisNode
only. The default behavior of this function is simply to check if the given coordinates intersect with the local bounds.- Parameters
- localX
- localY
- localWidth
- localHeight
- Returns
- Boolean
Profile: common
- public intersects(localBounds: Bounds) : Boolean
-
Returns
true
if the given bounds (specified in the local coordinate space of thisNode
) intersects the shape of thisNode
.Returns
true
if the given bounds (specified in the local coordinate space of thisNode
) intersects the shape of thisNode
. Note that this method does not take visibility into account; the test is based on the geometry of thisNode
only. The default behavior of this function is simply to check if the given coordinates intersect with the local bounds.- Parameters
- localBounds
- Returns
- Boolean
Profile: common
- public localToParent(localX: Number, localY: Number) : Point2D
- public localToParent(localPoint: Point2D) : Point2D
- public localToParent(localBounds: Bounds) : Bounds
- public localToScene(localX: Number, localY: Number) : Point2D
-
Transforms a point from the local coordinate space of this
Node
into the coordinate space of its javafx.scene.Scene.Transforms a point from the local coordinate space of this
Node
into the coordinate space of its javafx.scene.Scene.- Parameters
- localX
- localY
- Returns
- Point2D
Profile: common
- public localToScene(localPoint: Point2D) : Point2D
-
Transforms a point from the local coordinate space of this
Node
into the coordinate space of its javafx.scene.Scene.Transforms a point from the local coordinate space of this
Node
into the coordinate space of its javafx.scene.Scene.- Parameters
- localPoint
- Returns
- Point2D
Profile: common
- public localToScene(localBounds: Bounds) : Bounds
-
Transforms a bounds from the local coordinate space of this
Node
into the coordinate space of its javafx.scene.Scene.Transforms a bounds from the local coordinate space of this
Node
into the coordinate space of its javafx.scene.Scene.- Parameters
- localBounds
- Returns
- Bounds
Profile: common
- public lookup(id: java.lang.String) : Node
-
Finds this
Node
, or the first subnode, with the given id.Finds this
Node
, or the first subnode, with the given id. If this node is aParent
, then this function will traverse down into the branch until it finds a match. If more than one subnode has the specified id, this function returns one of them. Which node it returns in that case is unspecified.- Parameters
- id
- The id of the node to find
- Returns
- Node
-
The first node, starting from this
Node
, which has an id ofid
.
Profile: common
- public parentToLocal(parentX: Number, parentY: Number) : Point2D
- public parentToLocal(parentPoint: Point2D) : Point2D
- public parentToLocal(parentBounds: Bounds) : Bounds
- public requestFocus() : Void
-
Requests that this
Node
get the input focus, and that thisNode
's top-level ancestor become the focused window.Requests that this
Node
get the input focus, and that thisNode
's top-level ancestor become the focused window. To be eligible to receive the focus, the node must be part of a scene, it and all of its ancestors must be visible, and it must not be disabled. If this node is eligible, this function will cause it to become thisScene
's "focus owner". Each scene has at most one focus owner node. The focus owner will not actually have the input focus, however, unless the scene belongs to aStage
that is both visible and active.Profile: common
- public sceneToLocal(sceneX: Number, sceneY: Number) : Point2D
- public sceneToLocal(scenePoint: Point2D) : Point2D
-
Transforms a point from the coordinate space of the javafx.scene.Scene into the local coordinate space of this
Node
.Transforms a point from the coordinate space of the javafx.scene.Scene into the local coordinate space of this
Node
.- Parameters
- scenePoint
- Returns
- Point2D
Profile: common
- public sceneToLocal(sceneBounds: Bounds) : Bounds
-
Transforms a rectangle from the coordinate space of the javafx.scene.Scene into the local coordinate space of this
Node
.Transforms a rectangle from the coordinate space of the javafx.scene.Scene into the local coordinate space of this
Node
.- Parameters
- sceneBounds
- Returns
- Bounds
Profile: common
- public toBack() : Void
-
Moves this
Node
to the back of its sibling nodes in terms of z-order.Moves this
Node
to the back of its sibling nodes in terms of z-order. This is accomplished by moving thisNode
to the first position in its parent'scontent
sequence. This function has no effect if thisNode
is not part of a group.Profile: common
- public toFront() : Void
-
Moves this
Node
to the front of its sibling nodes in terms of z-order.Moves this
Node
to the front of its sibling nodes in terms of z-order. This is accomplished by moving thisNode
to the last position in its parent'scontent
sequence. This function has no effect if thisNode
is not part of a group.Profile: common
- public toString() : java.lang.String
javafx.scene.layout.Resizable
- public getHFill() : Boolean
-
Returns the
Resizable
's horizontal fill preference, which indicates whether or not the Resizable's width should be resized beyond its preferred width (up to its maximum) to fill it's allocated layout area.Returns the
Resizable
's horizontal fill preference, which indicates whether or not the Resizable's width should be resized beyond its preferred width (up to its maximum) to fill it's allocated layout area.All container classes (HBox, VBox, Stack, Flow(vertical), Tile) consult this preference when resizing Resizable children.
An application may override the horizontal fill of a Resizable node using LayoutInfo:
Label { layoutInfo: LayoutInfo { hfill: true } }
This function returns
false
by default; Resizable subclasses should override this function to return an appropriate value.- Returns
- Boolean
- public getHGrow() : javafx.scene.layout.Priority
-
Returns the
Resizable
's horizontal grow priority which determines whether it's layout area is given more horizontal space if its available.Returns the
Resizable
's horizontal grow priority which determines whether it's layout area is given more horizontal space if its available.The horizontal grow priority is only used if the parent container is resized larger than its preferred width and multiple nodes are competing for extra horizontal space, which for the concrete containers is only applicable to HBox. Note that growing applies only to the layout area assigned to the Resizable; how the Resizable is sized with respect to that area is determined separately by its size and fill preferences (see getPrefWidth and getPrefHFill).
If
ALWAYS
, the Resizable's layout area will always grow horizontally if there is additional space, sharing the increase with other nodes that have an hgrow of ALWAYS. The Resizable's layout area will never be grown beyond the Resizable's maximum width.If
SOMETIMES
, the Resizable's layout area will only grow horizontally if either no other node has specified ALWAYS, or the additional space was not completely allocated to nodes specifying ALWAYS because of their maximum size limits.If
NEVER
, the Resizable's layout area will never be grown horizontally if there is additional space.If the Resizable returns ALWAYS or SOMETIMES, then getHFill should typically return
true
to ensure the node will be resized beyond its preferred to take advantage of its larger layout area.An application may override the horizontal grow priority of a Resizable node using LayoutInfo:
Label { layoutInfo: LayoutInfo { hgrow: Priority.ALWAYS } }
This function returns
Priority.NEVER
by default; Resizable subclasses should override this function to return an appropriate value.- Returns
- Priority
- public getHShrink() : javafx.scene.layout.Priority
-
Returns the
Resizable
's horizontal shrink priority, which determines whether it's layout area is given less horizontal space if its parent is resized smaller than its preferred width.Returns the
Resizable
's horizontal shrink priority, which determines whether it's layout area is given less horizontal space if its parent is resized smaller than its preferred width.The horizontal shrink priority is only used if the parent container is resized smaller than its preferred width and multiple nodes are competing for horizontal space, which for the concrete containers is only applicable to HBox.
If
ALWAYS
, the Resizable's layout area will always shrink horizontally if there is less space, sharing the decrease with other nodes that have an hshrink of ALWAYS. The Resizable's layout area will never be sized smaller than the node's minimum width.If
SOMETIMES
, the Resizable's layout area will only shrink horizontally if either no other node has specified ALWAYS, or the reduced space was not completely distributed to nodes specifying ALWAYS because of their minimum size limits.If
NEVER
, the Resizable's layout area will never be shrunken horizontally if there is reduced space.An application may override the horizontal shrink priority of a Resizable node using LayoutInfo:
Label { layoutInfo: LayoutInfo { hshrink: Priority.ALWAYS } }
This function returns
Priority.NEVER
by default; Resizable subclasses should override this function to return an appropriate value.- Returns
- Priority
- public getMaxHeight() : Number
-
Returns the
Resizable
's maximum height.Returns the
Resizable
's maximum height. Layout containers should strive not to set the Resizable'sheight
larger than this value. This value is computed by the node subclass using applicable state and variable settings and is not directly settable by applications.An application may override the maximum height of a Resizable node using LayoutInfo:
Label { layoutInfo: LayoutInfo { maxHeight: 30 } }
This function returns
Integer.MAX_VALUE
by default; Resizable subclasses should override this function to return an appropriate value.- Returns
- Number
Profile: common
- public getMaxWidth() : Number
-
Returns the
Resizable
's maximum width.Returns the
Resizable
's maximum width. Layout containers should strive not to set the Resizable'swidth
larger than this value. This value is computed by the node subclass using applicable state and variable settings and is not directly settable by applications.An application may override the maximum width of a Resizable node using LayoutInfo:
Label { layoutInfo: LayoutInfo { maxWidth: 30 } }
This function returns
Integer.MAX_VALUE
by default; Resizable subclasses should override this function to return an appropriate value.- Returns
- Number
Profile: common
- public getMinHeight() : Number
-
Returns the
Resizable
's minimum height.Returns the
Resizable
's minimum height. Layout containers should strive not to set the Resizable's height smaller than this value. This value is computed by the node subclass using applicable state and variable settings and is not directly settable by applications.An application may override the minimum height of a Resizable node using LayoutInfo:
Label { layoutInfo: LayoutInfo { minHeight: 30 } }
This function returns 0 by default; Resizable subclasses should override this function to return an appropriate value.
- Returns
- Number
Profile: common
- public getMinWidth() : Number
-
Returns the
Resizable
's minimum width.Returns the
Resizable
's minimum width. Layout containers should strive not to set the Resizable's width smaller than this value. This value is calculated by the node subclass using applicable state and variable settings and is not directly settable by applications.An application may override the minimum width of a Resizable node using LayoutInfo:
Label { layoutInfo: LayoutInfo { minWidth: 50 } }
This function returns 0 by default; Resizable subclasses should override this function to return an appropriate value.
- Returns
- Number
Profile: common
- public abstract getPrefHeight(width: Number) : Number
-
Returns the
Resizable
's preferred height, given the specified width.Returns the
Resizable
's preferred height, given the specified width. If a particular width need not be factored into the result, -1 may be passed in as thewidth
parameter. Implementations of this function may also choose to ignorewidth
if it does not impact the result.Layout containers should set the Resizable's
height
to this value whenever possible. This value is computed by the node subclass using applicable state and variable settings and is not directly settable by applications.An application may override the preferred height of a Resizable node using LayoutInfo:
Label { layoutInfo: LayoutInfo { height: 80 } }
Resizable subclasses must override this function to return an appropriate value.
- Parameters
- width
- Returns
- Number
Profile: common
- public abstract getPrefWidth(height: Number) : Number
-
Returns the
Resizable
's preferred width, given the specified height.Returns the
Resizable
's preferred width, given the specified height. If a particular height need not be factored into the result, -1 may be passed in as theheight
parameter. Implementations of this function may also choose to ignoreheight
if it does not impact the result.Layout containers should set the Resizable's
width
to this value whenever possible. This value is computed by the node subclass using applicable state and variable settings and is not directly settable by applications.An application may override the preferred width of a Resizable node using LayoutInfo:
Label { layoutInfo: LayoutInfo { width: 50 } }
Resizable subclasses must override this function to return an appropriate value.
- Parameters
- height
- Returns
- Number
Profile: common
- public getVFill() : Boolean
-
Returns the
Resizable
's vertical fill preference, which indicates whether or not the Resizable's height should be resized beyond its preferred height (up to its maximum) to fill it's allocated layout area.Returns the
Resizable
's vertical fill preference, which indicates whether or not the Resizable's height should be resized beyond its preferred height (up to its maximum) to fill it's allocated layout area.All container classes (HBox, VBox, Stack, Flow(horizontal), Tile) consult this preference when resizing Resizable children.
An application may override the vertical fill of a Resizable node using LayoutInfo:
Label { layoutInfo: LayoutInfo { vfill: true } }
This function returns
false
by default; Resizable subclasses should override this function to return an appropriate value.- Returns
- Boolean
- public getVGrow() : javafx.scene.layout.Priority
-
Returns the
Resizable
's vertical grow priority, which determines whether it's layout area is given more vertical space if its available.Returns the
Resizable
's vertical grow priority, which determines whether it's layout area is given more vertical space if its available.The vertical grow priority is only used if the parent container is resized larger than its preferred height and multiple nodes are competing for extra vertical space, which for the concrete containers is only applicable to VBox. Note that growing applies only to the layout area assigned to the Resizable; how the Resizable is sized with respect to that area is determined separately by its size and fill preferences (see getPrefHeight and getPrefVFill).
If
ALWAYS
, the Resizable's layout area will always grow vertically if there is additional space, sharing the increase with other nodes that have an vgrow of ALWAYS. The Resizable's layout area will never be grown beyond the Resizable's maximum height.If
SOMETIMES
, the Resizable's layout area will only grow vertically if either no other node has specified ALWAYS, or the additional space was not completely allocated to nodes specifying ALWAYS because of their maximum size limits.If
NEVER
, the Resizable's layout area will never be grown vertically if there is additional space.If the Resizable returns ALWAYS or SOMETIMES, then getVFill should typically return
true
to ensure the node will be resized beyond its preferred to take advantage of its larger layout area.An application may override the vertical grow priority of a Resizable node using LayoutInfo:
Label { layoutInfo: LayoutInfo { vgrow: Priority.ALWAYS } }
This function returns
Priority.NEVER
by default; Resizable subclasses should override this function to return an appropriate value.- Returns
- Priority
- public getVShrink() : javafx.scene.layout.Priority
-
Returns the
Resizable
's vertical shrink priority, which determines whether it's layout area is given less vertical space if its parent is resized smaller than its preferred height.Returns the
Resizable
's vertical shrink priority, which determines whether it's layout area is given less vertical space if its parent is resized smaller than its preferred height.The vertical shrink priority is only used if the parent container is resized smaller than its preferred height and multiple nodes are competing for vertical space, which for the concrete containers is only applicable to VBox.
If
ALWAYS
, the Resizable's layout area will always shrink vertically if there is less space, sharing the decrease with other nodes that have an vshrink of ALWAYS. The Resizable's layout area will never be sized smaller than the node's minimum height.If
SOMETIMES
, the Resizable's layout area will only shrink vertically if either no other node has specified ALWAYS, or the reduced space was not completely distributed to nodes specifying ALWAYS because of their minimum size limits.If
NEVER
, the Resizable's layout area will never be shrunken vertically if there is reduced space.An application may override the vertical shrink priority of a Resizable node using LayoutInfo:
Label { layoutInfo: LayoutInfo { vshrink: Priority.ALWAYS } }
This function returns
Priority.NEVER
by default; Resizable subclasses should override this function to return an appropriate value.- Returns
- Priority