Overview

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

Attribute Summary

nametypedescription
Public
actionfunction():Void

attribute action: function()

Optional handler called when the user double-clicks on a list cell or presses the ENTER key.

canAcceptDropfunction(:ListDropEvent):boolean

attribute acceptDrop: function(value): Boolean

Optional handler called when the user drops an object onto this textfield.

cellBackgroundAbstractColor
cellForegroundAbstractColor
cellsListCell[]

The cells of this list.

colorDropChangesForegroundBoolean

inidicates if a color drop changes the foreground color of the selected text, if false, it changes the background color.

dropModeDropMode

Indicates the drop mode which specifies which default drop action will occur.

dropTypeClass

Optional filter for the types of objects that may be dropped onto this textfield.

enableDNDBoolean

Indicates if Drag and Drop is enabled.

fixedCellHeightNumber

If present, sets the height of every cell in the list.

fixedCellWidthNumber

If present, sets the width of every cell in the list.

layoutOrientationListLayoutOrientation

Defines the way list cells are layed out.

lockedBoolean

If true the list will not reflect changes to its cells attribute.

onDropfunction(:ListDropEvent):Void

Optional handler called when the user drops an object

selectedCellBackgroundAbstractColor
selectedCellForegroundAbstractColor
selectionInteger

Returns the index of the selected cell or -1 if no cell is selected.

visibleRowCountNumber

Returns the preferred number of visible rows.

Protected

Inherited Attributes

javafx.ui.ScrollableWidget

publicnametype
awtScrollBarBackgroundColor
columnHeaderWidget

Adds a child that will appear as a row at the top or bottom of the main view of the scrollpane depending on the current component orientation.

horizontalScrollBarPolicyHorizontalScrollBarPolicy

The display policy for the horizontal scrollbar.

lowerLeftCornerWidget
lowerRightCornerWidget
onViewChangefunction():Void

Optional handler for changes to the scroll pane's view's location.

rowHeaderWidget

Adds a child that will appear as a column on to the left or right of the main view of the scrollpane depending on the current component orientation.

scrollBarBackgroundAbstractColor
scrollpaneJScrollPane
scrollPaneBorderBorder

Sets the scroll pane's border

upperLeftCornerWidget
upperRightCornerWidget
verticalScrollBarPolicyVerticalScrollBarPolicy

The display policy for the vertical scrollbar.

viewportBorderBorder

Sets the border of the scroll pane's viewport

javafx.ui.Widget

publicnametype
alignmentXNumber

Returns the alignment along the x axis.

alignmentYNumber

Returns the alignment along the y axis.

awtBackgroundColor
awtFontFont
awtForegroundColor
backgroundColor

Sets the background color of this component.

borderBorder

Sets the border of this component.

componentJComponent
componentOrientationComponentOrientation

Sets the language-sensitive orientation that is to be used to order the elements or text within this component.

cursorCursor

Sets the cursor image to the specified cursor.

doubleBufferedBoolean

Sets whether the this component should use a buffer to paint.

enabledBoolean

True when the object is enabled.

focusableBoolean

Sets the focusable state of this Widget to the specified value.

focusedBoolean
focusTraversalKeysEnabledBoolean
fontFont

Sets the Font of this object.

foregroundColor

Sets the foreground color of this component.

heightNumber

Sets the height of this component.

keyboardActionKeyboardAction[]
keyListenerKeyListener
maximumSizeDimension

Sets the maximum size of this component to a constant value.

minimumSizeDimension

Sets the minimum size of this component to a constant value.

mouseListenerMouseListener
mouseMotionListenerMouseMotionListener
mouseWheelListenerMouseWheelListener
nameString
onKeyDownfunction(:KeyEvent):Void

attribute onKeyDown: function(:KeyEvent):Void; Optional handler for key press events.

onKeyTypedfunction(:KeyEvent):Void

attribute onKeyTyped: function(:KeyEvent):Void Optional handler for key typed events.

onKeyUpfunction(:KeyEvent):Void

attribute onKeyUp: function(:KeyEvent):Void; Optional handler for key release events.

onMouseClickedfunction(:MouseEvent):Void

attribute onMouseClicked: function(:MouseEvent):Void

Optional handler for mouse exit events.

onMouseDraggedfunction(:MouseEvent):Void

attribute onMouseDragged: function(:MouseEvent):Void

Optional handler for mouse dragged events.

onMouseEnteredfunction(:MouseEvent):Void

attribute onMouseEntered: function(:MouseEvent):Void

Optional handler for mouse enter events.

onMouseExitedfunction(:MouseEvent):Void

attribute onMouseExited: function(:MouseEvent):Void

Optional handler for mouse exit events.

onMouseMovedfunction(:MouseEvent):Void

attribute onMouseMoved: function(:MouseEvent):Void

Optional handler for mouse motion events.

onMousePressedfunction(:MouseEvent):Void

attribute onMousePressed: function(:MouseEvent):Void

Optional handler for mouse press events.

onMouseReleasedfunction(:MouseEvent):Void

attribute onMouseReleased: function(:MouseEvent):Void

Optional handler for mouse release events.

onMouseWheelMovedfunction(:MouseWheelEvent):Void

attribute onMouseWheelMoved: function(:MouseWheelEvent):Void

Optional handler for mouse wheel events.

opaqueBoolean

If true the component paints every pixel within its bounds.

preferredSizeDimension
sizeDimension

Resizes this component to the specified dimensions.

sizeToFitColumnBoolean

Hint to GroupLayout to make this component's width equal to others in the same column

sizeToFitRowBoolean

Hint to GroupLayout to make this component's height equal to others in the same row

toolTipTextString

Registers the text to display in a tool tip.

visibleBoolean

True when the object is visible.

widthNumber

Sets width of this component.

xNumber

Sets the x coordinate of this component within its parent.

yNumber

Sets the y coordinate of this component within its parent.

javafx.ui.GroupElement

publicnametype
columnColumn

The column this element is contained in within a GroupLayout.

horizontalSpring

Optional horizontal spring that determines the horizontal resizing behavior of this element when contained in a GroupLayout.

rowRow

The row this element is contained in within a GroupLayout.

verticalSpring

Optional vertical spring that determines the vertical resizing behavior of this element when contained in a GroupLayout.

javafx.ui.UIElement

publicnametype
contextUIContext
lookAndFeelString

Function Summary

public createView() : JComponent
public indexToLocation(i: Number, ) : XY
public locationToIndex(x: Number, y: Number, ) : Integer

Inherited Functions

javafx.ui.ScrollableWidget

public createComponent() : JComponent
protected createScrollPane(view: JComponent, ) : JScrollPane
protected abstract createView() : JComponent
public bound getViewPosition() : Point
public bound getViewRect() : Rectangle
public onSetOpaque(value: Boolean, ) : Void
public setViewPosition(point: Point, ) : Void

javafx.ui.Widget

protected abstract createComponent() : JComponent

factory method to create the underlying Swing component

public getComponent() : JComponent
public getJComponent() : JComponent
public getMaximumSize() : Dimension

Returns the current maximum size of this component

public getMinimumSize() : Dimension

Returns the current minimum size of this component

public getNonScrollPaneComponent() : JComponent
public getPreferredSize() : Dimension

Returns the current preferred size of this component

public getSize() : Dimension
public bound getWindow() : Window
protected installMouseListener() : Void
protected installMouseMotionListener() : Void
protected installMouseWheelListener() : Void
protected onSetOpaque(value: Boolean, ) : Void
public requestFocus() : Void

javafx.ui.UIElement

public static __EASE(a: Object, t: Number, f: Function1, interpolate: Function3, ) : Object
public static __EASEBOTH(t: Number, ) : Number
public static __EASEIN(t: Number, ) : Number
public static __EASEOUT(t: Number, ) : Number
public static __INTERPOLATE_NUM(value1: Number, value2: Number, t: Number, ) : Number
public static cmToPixel(cm: Number, ) : Number
public static DISCRETE(a: Number, t: Number, ) : Number
public static EASEBOTH(a: Number, t: Number, ) : Number
public static EASEIN(a: Number, t: Number, ) : Number
public static EASEOUT(a: Number, t: Number, ) : Number
public static getScreenResolution() : Integer
public static getUIContext() : UIContext
public bound getWindow() : Window
public static inchToPixel(inch: Number, ) : Number
public static LINEAR(a: Number, t: Number, ) : Number
public static mmToPixel(mm: Number, ) : Number
public static pointToPixel(pt: Integer, ) : Number

Attributes

public action: function():Void

attribute action: function()

Optional handler called when the user double-clicks on a list cell or presses the ENTER key.

public canAcceptDrop: function(:ListDropEvent):boolean

attribute acceptDrop: function(value): Boolean

Optional handler called when the user drops an object onto this textfield. If it returns false, the drop is rejected.

public cells: ListCell[]

The cells of this list.

public colorDropChangesForeground: Boolean

inidicates if a color drop changes the foreground color of the selected text, if false, it changes the background color. If not text is selected the entire text is changed.

public dropMode: DropMode

Indicates the drop mode which specifies which default drop action will occur. Only valid values for TextComponents are USE_SELECTION, ON, INSERT or ON_OR_INSERT

public dropType: Class

Optional filter for the types of objects that may be dropped onto this textfield.

public enableDND: Boolean

Indicates if Drag and Drop is enabled.

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.

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.

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(:ListDropEvent):Void

Optional handler called when the user drops an object

public selection: Integer

Returns the index of the selected cell or -1 if no cell is selected.

public visibleRowCount: Number

Returns the preferred number of visible rows.

Functions

public indexToLocation(i: Number, ):XY

Parameters
i
Returns
XY

public locationToIndex(x: Number, y: Number, ):Integer

Parameters
x
y
Returns
Integer