javafx.ui

ListBox

Extends: ScrollableWidget

A component that allows the user to select one or more objects from a list. Encapsulates javax.swing.JList.

Attributes

public action: function():*?
attribute action: function()?

Optional handler called when the user double-clicks on a list cell or presses the ENTER key.
public canAcceptDrop: function(javafx.ui.ListDropEvent):Boolean?
attribute acceptDrop: function(value): Boolean

Optional handler called when the user drops an object into this list. If it returns false, the drop is rejected.
public cells: ListCell*
The cells of this list.
private dirty: Boolean
public dropType: Class?
Optional filter for the types of objects that may be dropped into this list.
public enableDND: Boolean
public fixedCellHeight: Number?
If present, sets the height of every cell in the list.
public fixedCellWidth: Number?
If present, sets the width of every cell in the list.
private keyListener: java.awt.event.KeyListener
public layoutOrientation: ListLayoutOrientation?
Defines the way list cells are layed out. Consider a ListBox with four cells, this can be layed out in one of the following ways:
0
1
2
3
0  1
2  3
0  2
1  3

These correspond to the following values:

Value

Description

VERTICAL The cells should be layed out vertically in one column.
HORIZONTAL_WRAP The cells should be layed out horizontally, wrapping to a new row as necessary. The number of rows to use will either be defined by visibleRowCount if > 0, otherwise the number of rows will be determined by the width of the ListBox.
VERTICAL_WRAP The cells should be layed out vertically, wrapping to a new column as necessary. The number of rows to use will either be defined by visibleRowCount if > 0, otherwise the number of rows will be determined by the height of the ListBox.
The default value of this property is VERTICAL.

private list: javax.swing.JList
private listMouseListener: java.awt.event.MouseListener
private listeners: javax.swing.event.ListDataListener*
private listmodel: javax.swing.ListModel
public locked: Boolean?
If true the list will not reflect changes to its cells attribute. When changed back to false synchronization will occur. Can be used as a performance optimizationwhen when doing large batch updates.
public onDrop: function(javafx.ui.ListDropEvent):*?
Optional handler called when the user drops an object into this list.
private onSelectionChange: function(javafx.ui.MultiSelection,javafx.ui.MultiSelection):*?
private selectedCell: ListCell?
public selection: Number
Returns the index of the selected cell or -1 if no cell is selected.
private selectionGeneration: Number
private selectionListener: javax.swing.event.ListSelectionListener
private transferHandler: javax.swing.TransferHandler
private updateGeneration: Number
public visibleRowCount: Number?
Returns the preferred number of visible rows.

Attributes Inherited from javafx.ui.ScrollableWidget

awtScrollBarBackground, columnHeader, horizontalScrollBarPolicy, lowerLeftCorner, lowerRightCorner, onViewChange, rowHeader, scrollBarBackground, scrollPaneBorder, scrollpane, upperLeftCorner, upperRightCorner, verticalScrollBarPolicy, viewChangeListener, viewportBorder

Attributes Inherited from javafx.ui.Widget

alignmentX, alignmentY, awtBackground, awtFont, awtForeground, background, border, component, componentOrientation, cursor, doubleBuffered, enabled, focusListener, focusTraversalKeysEnabled, focusable, focused, font, foreground, height, inBoundsListener, keyListener, keyboardAction, maximumSize, minimumSize, mouseListener, mouseMotionListener, mouseWheelListener, onKeyDown, onKeyTyped, onKeyUp, onMouseClicked, onMouseDragged, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onMouseWheelMoved, opaque, preferredSize, size, sizeToFitColumn, sizeToFitRow, toolTipText, visible, width, x, y

Attributes Inherited from javafx.ui.GroupElement

column, horizontal, row, vertical

Attributes Inherited from javafx.ui.UIElement

lookAndFeel

Operations/Functions

private acceptDrop(value): Boolean
private getDragText(): String
private getDragValue(): public return
public indexToLocation(i: Number): XY
public locationToIndex(x: Number, y: Number)
private setDropValue(value)

Operations/Functions Inherited from javafx.ui.ScrollableWidget

createScrollPane, createView, getViewPosition, getViewRect, installViewChangeListener, scrollRectToVisible, setViewPosition

Operations/Functions Inherited from javafx.ui.Widget

createComponent, function():function(java.awt.event.KeyEvent):function(java.awt.event.KeyEvent):function(java.awt.event.KeyEvent):function(java.awt.event.KeyEvent):javafx.ui.KeyEvent, getBounds, getComponent, getNonScrollPaneComponent, installMouseListener, installMouseMotionListener, installMouseWheelListener, makeKeyEvent, makeMouseEvent, makeMouseWheelEvent, maximumSize, minimumSize, onSetOpaque, preferredSize, requestFocus, setBounds, size

Operations/Functions Inherited from javafx.ui.UIElement

getWindow