T - the type of the list itemspublic class ListSelectionView<T>
extends javafx.scene.control.Control
list of actions.
Each list can be decorated with a header and a footer node.
The default header nodes are simply two labels ("Available", "Selected").

ListSelectionView<String> view = new ListSelectionView<>();
view.getSourceItems().add("One", "Two", "Three");
view.getTargetItems().add("Four", "Five");
| Type | Property and Description |
|---|---|
javafx.beans.property.ObjectProperty<javafx.util.Callback<javafx.scene.control.ListView<T>,javafx.scene.control.ListCell<T>>> |
cellFactory
Setting a custom cell factory has the effect of deferring all cell
creation, allowing for total customization of the cell.
|
javafx.beans.property.ObjectProperty<javafx.geometry.Orientation> |
orientation
The
Orientation of the ListSelectionView - this can
either be horizontal or vertical. |
javafx.beans.property.ObjectProperty<javafx.scene.Node> |
sourceFooter
A property used to store a reference to a node that will be displayed
below the source list view.
|
javafx.beans.property.ObjectProperty<javafx.scene.Node> |
sourceHeader
A property used to store a reference to a node that will be displayed
above the source list view.
|
javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<T>> |
sourceItems
The underlying data model for the source list view.
|
javafx.beans.property.ObjectProperty<javafx.scene.Node> |
targetFooter
A property used to store a reference to a node that will be displayed
below the target list view.
|
javafx.beans.property.ObjectProperty<javafx.scene.Node> |
targetHeader
A property used to store a reference to a node that will be displayed
above the target list view.
|
javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<T>> |
targetItems
The underlying data model for the target list view.
|
contextMenu, skinClassName, skin, tooltipbackground, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthaccessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, impl_showMnemonics, impl_treeVisible, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, visible| Modifier and Type | Class and Description |
|---|---|
static class |
ListSelectionView.ListSelectionAction<T>
Specialized actions for ListSelectionView which get access to both the internal list views.
|
class |
ListSelectionView.MoveToSource
Action use to move the selected items from the
target list view to the source list view.
|
class |
ListSelectionView.MoveToSourceAll
Action use to all the items from the
target list view to the source list view.
|
class |
ListSelectionView.MoveToTarget
Action use to move the selected items from the
source list view to the target list view.
|
class |
ListSelectionView.MoveToTargetAll
Action use to move all the items from the
source list view to the target list view.
|
| Constructor and Description |
|---|
ListSelectionView()
Constructs a new dual list view.
|
| Modifier and Type | Method and Description |
|---|---|
javafx.beans.property.ObjectProperty<javafx.util.Callback<javafx.scene.control.ListView<T>,javafx.scene.control.ListCell<T>>> |
cellFactoryProperty()
Setting a custom cell factory has the effect of deferring all cell
creation, allowing for total customization of the cell.
|
protected javafx.scene.control.Skin<ListSelectionView<T>> |
createDefaultSkin() |
javafx.collections.ObservableList<Action> |
getActions()
The list of actions to be shown in between the two list views.
|
javafx.util.Callback<javafx.scene.control.ListView<T>,javafx.scene.control.ListCell<T>> |
getCellFactory()
Returns the current cell factory.
|
javafx.geometry.Orientation |
getOrientation()
Returns the
Orientation of the ListSelectionView - this
can either be horizontal or vertical. |
javafx.collections.ObservableList<Action> |
getSourceActions()
These actions are shown beside the source list view.
|
javafx.scene.Node |
getSourceFooter()
Returns the value of
sourceFooterProperty(). |
javafx.scene.Node |
getSourceHeader()
Returns the value of
sourceHeaderProperty(). |
javafx.collections.ObservableList<T> |
getSourceItems()
Returns an
ObservableList that contains the items currently being
shown to the user in the source list. |
javafx.collections.ObservableList<Action> |
getTargetActions()
These actions are shown beside the target list view.
|
javafx.scene.Node |
getTargetFooter()
Returns the value of
targetFooterProperty(). |
javafx.scene.Node |
getTargetHeader()
Returns the value of
targetHeaderProperty(). |
javafx.collections.ObservableList<T> |
getTargetItems()
Returns an
ObservableList that contains the items currently being
shown to the user in the target list. |
java.lang.String |
getUserAgentStylesheet() |
protected java.lang.String |
getUserAgentStylesheet(java.lang.Class<?> clazz,
java.lang.String fileName)
A helper method that ensures that the resource based lookup of the user
agent stylesheet only happens once.
|
javafx.beans.property.ObjectProperty<javafx.geometry.Orientation> |
orientationProperty()
The
Orientation of the ListSelectionView - this can
either be horizontal or vertical. |
void |
setCellFactory(javafx.util.Callback<javafx.scene.control.ListView<T>,javafx.scene.control.ListCell<T>> value)
Sets a new cell factory to use by both list views.
|
void |
setOrientation(javafx.geometry.Orientation value)
Sets the
Orientation of the ListSelectionView - this can
either be horizontal or vertical. |
void |
setSourceFooter(javafx.scene.Node node)
Sets the value of
sourceFooterProperty(). |
void |
setSourceHeader(javafx.scene.Node node)
Sets the value of
sourceHeaderProperty(). |
void |
setSourceItems(javafx.collections.ObservableList<T> value)
Sets the underlying data model for the ListView.
|
void |
setTargetFooter(javafx.scene.Node node)
Sets the value of
targetFooterProperty(). |
void |
setTargetHeader(javafx.scene.Node node)
Sets the value of
targetHeaderProperty(). |
void |
setTargetItems(javafx.collections.ObservableList<T> value)
Sets the underlying data model for the ListView.
|
javafx.beans.property.ObjectProperty<javafx.scene.Node> |
sourceFooterProperty()
A property used to store a reference to a node that will be displayed
below the source list view.
|
javafx.beans.property.ObjectProperty<javafx.scene.Node> |
sourceHeaderProperty()
A property used to store a reference to a node that will be displayed
above the source list view.
|
javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<T>> |
sourceItemsProperty()
The underlying data model for the source list view.
|
javafx.beans.property.ObjectProperty<javafx.scene.Node> |
targetFooterProperty()
A property used to store a reference to a node that will be displayed
below the target list view.
|
javafx.beans.property.ObjectProperty<javafx.scene.Node> |
targetHeaderProperty()
A property used to store a reference to a node that will be displayed
above the target list view.
|
javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<T>> |
targetItemsProperty()
The underlying data model for the target list view.
|
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getClassCssMetaData, getContextMenu, getControlCssMetaData, getCssMetaData, getSkin, getTooltip, impl_cssGetFocusTraversableInitialValue, impl_processCSS, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinClassNameProperty, skinProperty, tooltipPropertybackgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, impl_computeContains, impl_computeGeomBounds, impl_computeLayoutBounds, impl_createPeer, impl_notifyLayoutBoundsChanged, impl_pickNodeLocal, impl_updatePeer, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace, snapToPixelProperty, widthPropertygetChildren, getChildrenUnmodifiable, getImpl_traversalEngine, getManagedChildren, getStylesheets, impl_getAllParentStylesheets, impl_processMXNode, impl_traversalEngineProperty, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setImpl_traversalEngine, setNeedsLayout, updateBoundsaccessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, containsBounds, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, hasProperties, hoverProperty, idProperty, impl_clearDirty, impl_computeIntersects, impl_cssGetCursorInitialValue, impl_findStyles, impl_geomChanged, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_intersects, impl_intersectsBounds, impl_isDirty, impl_isDirtyEmpty, impl_isShowMnemonics, impl_isTreeVisible, impl_layoutBoundsChanged, impl_markDirty, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, impl_treeVisibleProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visiblePropertypublic final javafx.beans.property.ObjectProperty<javafx.scene.Node> sourceHeaderProperty
Label
displaying the text "Available".getSourceHeader(),
setSourceHeader(Node)public final javafx.beans.property.ObjectProperty<javafx.scene.Node> sourceFooterProperty
getSourceFooter(),
setSourceFooter(Node)public final javafx.beans.property.ObjectProperty<javafx.scene.Node> targetHeaderProperty
Label
displaying the text "Selected".getTargetHeader(),
setTargetHeader(Node)public final javafx.beans.property.ObjectProperty<javafx.scene.Node> targetFooterProperty
getTargetFooter(),
setTargetFooter(Node)public final javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<T>> sourceItemsProperty
getSourceItems(),
setSourceItems(ObservableList)public final javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<T>> targetItemsProperty
getTargetItems(),
setTargetItems(ObservableList)public final javafx.beans.property.ObjectProperty<javafx.geometry.Orientation> orientationProperty
Orientation of the ListSelectionView - this can
either be horizontal or vertical.getOrientation(),
setOrientation(Orientation)public final javafx.beans.property.ObjectProperty<javafx.util.Callback<javafx.scene.control.ListView<T>,javafx.scene.control.ListCell<T>>> cellFactoryProperty
Setting a custom cell factory has the effect of deferring all cell creation, allowing for total customization of the cell. Internally, the ListView is responsible for reusing ListCells - all that is necessary is for the custom cell factory to return from this function a ListCell which might be usable for representing any item in the ListView.
Refer to the Cell class documentation for more detail.
getCellFactory(),
setCellFactory(Callback)protected javafx.scene.control.Skin<ListSelectionView<T>> createDefaultSkin()
createDefaultSkin in class javafx.scene.control.Controlpublic java.lang.String getUserAgentStylesheet()
getUserAgentStylesheet in class javafx.scene.layout.Regionpublic final javafx.beans.property.ObjectProperty<javafx.scene.Node> sourceHeaderProperty()
Label
displaying the text "Available".getSourceHeader(),
setSourceHeader(Node)public final javafx.scene.Node getSourceHeader()
sourceHeaderProperty().public final void setSourceHeader(javafx.scene.Node node)
sourceHeaderProperty().node - the new header node to use for the source listpublic final javafx.beans.property.ObjectProperty<javafx.scene.Node> sourceFooterProperty()
getSourceFooter(),
setSourceFooter(Node)public final javafx.scene.Node getSourceFooter()
sourceFooterProperty().public final void setSourceFooter(javafx.scene.Node node)
sourceFooterProperty().node - the new node shown below the source listpublic final javafx.beans.property.ObjectProperty<javafx.scene.Node> targetHeaderProperty()
Label
displaying the text "Selected".getTargetHeader(),
setTargetHeader(Node)public final javafx.scene.Node getTargetHeader()
targetHeaderProperty().public final void setTargetHeader(javafx.scene.Node node)
targetHeaderProperty().node - the new node shown above the target listpublic final javafx.beans.property.ObjectProperty<javafx.scene.Node> targetFooterProperty()
getTargetFooter(),
setTargetFooter(Node)public final javafx.scene.Node getTargetFooter()
targetFooterProperty().public final void setTargetFooter(javafx.scene.Node node)
targetFooterProperty().node - the new node shown below the target listpublic final void setSourceItems(javafx.collections.ObservableList<T> value)
public final javafx.collections.ObservableList<T> getSourceItems()
ObservableList that contains the items currently being
shown to the user in the source list. This may be null if
setSourceItems(javafx.collections.ObservableList) has previously
been called, however, by default it is an empty ObservableList.public final javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<T>> sourceItemsProperty()
getSourceItems(),
setSourceItems(ObservableList)public final void setTargetItems(javafx.collections.ObservableList<T> value)
public final javafx.collections.ObservableList<T> getTargetItems()
ObservableList that contains the items currently being
shown to the user in the target list. This may be null if
setTargetItems(javafx.collections.ObservableList) has previously
been called, however, by default it is an empty ObservableList.public final javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<T>> targetItemsProperty()
getTargetItems(),
setTargetItems(ObservableList)public final javafx.beans.property.ObjectProperty<javafx.geometry.Orientation> orientationProperty()
Orientation of the ListSelectionView - this can
either be horizontal or vertical.getOrientation(),
setOrientation(Orientation)public final void setOrientation(javafx.geometry.Orientation value)
Orientation of the ListSelectionView - this can
either be horizontal or vertical.public final javafx.geometry.Orientation getOrientation()
Orientation of the ListSelectionView - this
can either be horizontal or vertical.public final void setCellFactory(javafx.util.Callback<javafx.scene.control.ListView<T>,javafx.scene.control.ListCell<T>> value)
ListCell's to be thrown away, and new ListCell's created with the
new cell factory.public final javafx.util.Callback<javafx.scene.control.ListView<T>,javafx.scene.control.ListCell<T>> getCellFactory()
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<javafx.scene.control.ListView<T>,javafx.scene.control.ListCell<T>>> cellFactoryProperty()
Setting a custom cell factory has the effect of deferring all cell creation, allowing for total customization of the cell. Internally, the ListView is responsible for reusing ListCells - all that is necessary is for the custom cell factory to return from this function a ListCell which might be usable for representing any item in the ListView.
Refer to the Cell class documentation for more detail.
getCellFactory(),
setCellFactory(Callback)public final javafx.collections.ObservableList<Action> getActions()
ActionUtils.ACTION_SEPARATOR
and ActionUtils.ACTION_SPAN, are represented as buttons.
For actions dependent on both the internal list views, an instance of ListSelectionView.ListSelectionAction should
be used.
By default, the list has 4 actions - ListSelectionView.MoveToTarget, ListSelectionView.MoveToTargetAll,
ListSelectionView.MoveToSource and ListSelectionView.MoveToSourceAll. A user may choose to add on top of
these actions or replace them depending on their use case.
public final javafx.collections.ObservableList<Action> getSourceActions()
ListActionView.ListAction should be used where actions are
dependent on the source ListView.ListActionView.ListActionpublic final javafx.collections.ObservableList<Action> getTargetActions()
ListActionView.ListAction should be used where actions are
dependent on the target ListView.ListActionView.ListActionprotected final java.lang.String getUserAgentStylesheet(java.lang.Class<?> clazz,
java.lang.String fileName)
clazz - the class used for the resource lookupfileName - the name of the user agent stylesheet