Class MultiColumnListView<T>
- Type Parameters:
T- the item types, e.g. "Issues" or "Tickets"CSS Styleable Properties:
CSS Properties Property Type Description -fx-disable-drag-and-dropBooleanWhether to disable drag and drop. -fx-show-headersBooleanWhether to show column headers.
- All Implemented Interfaces:
javafx.css.Styleable, javafx.event.EventTarget, javafx.scene.control.Skinnable
ListView. The control allows the user to rearrange the items in each
ListView and also to drag and drop items from one column to another.
Internally the control wraps every model object inside an instance of
MultiColumnListView.ColumnItem. This allows the control to create the two marker items that are
used to visualize the "from" and the "to" location of a drag and drop operation all
by itself. Applications only ever deal with their own model objects of type
T.
In addition the view supports a placeholder node (see placeholderProperty())
which will be shown instead of the columns whenever the list of columns is empty. The
default placeholder is a label that reads "No columns defined." and that is surrounded
by a dashed border. The placeholder can be replaced with any other node or removed
completely by setting the property to null.
Controlling drag and drop: two callbacks allow applications to restrict which
items may be dragged and where they may be dropped. Both callbacks return true
for everything by default, and drag and drop can be switched off completely via
disableDragAndDropProperty().
| Callback | Signature | Description |
|---|---|---|
dragPossibleCallback |
Callback<T, Boolean> |
Invoked when the user starts to drag an item. The callback receives the model
object of type T that is about to be dragged and returns true
if the drag operation is allowed for that item. Returning false makes
the item non-draggable. |
dropPossibleCallback |
Callback<DropParameter<T>, Boolean> |
Invoked while the user drags an item over a possible drop location. The callback
receives a MultiColumnListView.DropParameter which carries the dragged item
(MultiColumnListView.DropParameter.getItem()) and the target column
(MultiColumnListView.DropParameter.getColumn()). Returning false rejects the drop,
so that neither the drop markers appear nor the drop itself is performed. |
Example: only allow "done" items to be dragged and only allow drops into a column that is not full.
MultiColumnListView<Task> view = new MultiColumnListView<>();
view.setDragPossibleCallback(task -> task.isDone());
view.setDropPossibleCallback(param -> param.getColumn().getItems().size() < 10);
Drag and drop events: the view fires instances of MultiColumnListView.MultiColumnListViewEvent
for all relevant steps of a drag and drop operation, including the steps that were vetoed by
the two callbacks described above. Every event carries the dragged item
(MultiColumnListView.MultiColumnListViewEvent.getDraggedItem()), the involved column
(MultiColumnListView.MultiColumnListViewEvent.getColumn()), and the item index inside that column
(MultiColumnListView.MultiColumnListViewEvent.getIndex()).
| Event type | Fired when |
|---|---|
MultiColumnListView.MultiColumnListViewEvent.ANY |
Super type of all events fired by this control, useful for registering a single handler for all drag and drop events. |
MultiColumnListView.MultiColumnListViewEvent.DRAG_STARTED |
The user started to drag an item and the dragPossibleCallback allowed it. |
MultiColumnListView.MultiColumnListViewEvent.DRAG_NOT_POSSIBLE |
The user tried to drag an item but the dragPossibleCallback returned
false. |
MultiColumnListView.MultiColumnListViewEvent.DRAG_OVER |
A dragged item is hovering over a valid drop location. |
MultiColumnListView.MultiColumnListViewEvent.DROP_NOT_POSSIBLE |
A dragged item is hovering over, or was dropped on, a location that the
dropPossibleCallback rejected. |
MultiColumnListView.MultiColumnListViewEvent.ITEM_MOVED |
An item was successfully dropped and hence moved to its new column and index. |
MultiColumnListView.MultiColumnListViewEvent.DRAG_ENDED |
The drag operation has finished, no matter whether it was successful or not. This event type is currently not fired by the control itself and is meant to be used by applications that implement their own drag and drop handling. |
view.addEventHandler(MultiColumnListViewEvent.ITEM_MOVED, evt ->
System.out.println(evt.getDraggedItem() + " moved to index " + evt.getIndex()));
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA wrapper around the model objects shown by theMultiColumnListViewcontrol.static classA special list cell to be used in combination with theMultiColumnListViewcontrol.static classParameters passed to the drop validation callback.static classThe model object representing a single column.static classRepresents an event specific to theMultiColumnListViewcomponent. -
Property Summary
PropertiesTypePropertyDescriptionfinal javafx.beans.property.ObjectProperty<javafx.util.Callback<MultiColumnListView<T>, MultiColumnListView.ColumnListCell<T>>> The cell factory that will be used for each one of theListViewinstances.final javafx.beans.property.ListProperty<MultiColumnListView.ListViewColumn<T>> A list of columns that define how many columns will be shown inside the view.final javafx.beans.property.BooleanPropertyControls whether the user can rearrange items via drag and drop or not.final javafx.beans.property.ObjectProperty<T> The item currently being dragged, ornullif no drag operation is in progress.The callback used to decide whether an item may be dragged.final javafx.beans.property.ObjectProperty<javafx.util.Callback<MultiColumnListView.DropParameter<T>, Boolean>> The callback used to decide whether a dragged item may be dropped on a column.final javafx.beans.property.ObjectProperty<javafx.util.Callback<MultiColumnListView<T>, javafx.scene.control.ListView<MultiColumnListView.ColumnItem<T>>>> Stores the callback that will be invoked to produce newListViewinstances.final javafx.beans.property.ObjectProperty<LoadingPane.Status> Provides a property that holds the current loading status of the control.final javafx.beans.property.ObjectProperty<LoadingPane.Size> Represents the size of the loading status indicator used in the control.final javafx.beans.property.ObjectProperty<javafx.scene.Node> The node that will be shown instead of the columns when no columns have been added to the view (seecolumnsProperty()).final javafx.beans.property.ObjectProperty<javafx.scene.control.ProgressIndicator> The progress indicator that will be used to display percentage progress or the indeterminate state of the loading progress.final javafx.beans.property.ObjectProperty<javafx.util.Callback<Integer, javafx.scene.Node>> An optional factory for creating separators that will be placed between columns.final javafx.beans.property.BooleanPropertyDetermines whether the headers will be shown or not.Properties inherited from class javafx.scene.control.Control
contextMenu, skin, tooltipProperties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthProperties inherited from class javafx.scene.Parent
needsLayoutProperties inherited from class javafx.scene.Node
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, 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, viewOrder, visible -
Field Summary
Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZEFields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal javafx.beans.property.ObjectProperty<javafx.util.Callback<MultiColumnListView<T>, MultiColumnListView.ColumnListCell<T>>> The cell factory that will be used for each one of theListViewinstances.final javafx.beans.property.ListProperty<MultiColumnListView.ListViewColumn<T>> A list of columns that define how many columns will be shown inside the view.protected javafx.scene.control.Skin<?> final javafx.beans.property.BooleanPropertyControls whether the user can rearrange items via drag and drop or not.final javafx.beans.property.ObjectProperty<T> The item currently being dragged, ornullif no drag operation is in progress.The callback used to decide whether an item may be dragged.final javafx.beans.property.ObjectProperty<javafx.util.Callback<MultiColumnListView.DropParameter<T>, Boolean>> The callback used to decide whether a dragged item may be dropped on a column.final javafx.util.Callback<MultiColumnListView<T>, MultiColumnListView.ColumnListCell<T>> Gets the value of thecellFactoryproperty.static List<javafx.css.CssMetaData<? extends javafx.css.Styleable, ?>> Returns the CSS metadata for this control class.final javafx.collections.ObservableList<MultiColumnListView.ListViewColumn<T>> Gets the value of thecolumnsproperty.List<javafx.css.CssMetaData<? extends javafx.css.Styleable, ?>> final MultiColumnListView.ColumnItem<T> The wrapper of the item that is currently being dragged, ornullif no drag operation is in progress.final TGets the value of thedraggedItemproperty.final javafx.collections.ObservableList<T> Returns the items currently involved in a drag operation.Gets the value of thedragPossibleCallbackproperty.final javafx.util.Callback<MultiColumnListView.DropParameter<T>, Boolean> Gets the value of thedropPossibleCallbackproperty.final MultiColumnListView.ColumnItem<T> The item that is used to visualize the "from" location of an ongoing drag and drop operation.final javafx.util.Callback<MultiColumnListView<T>, javafx.scene.control.ListView<MultiColumnListView.ColumnItem<T>>> Gets the value of thelistViewFactoryproperty.final LoadingPane.StatusGets the value of theloadingStatusproperty.final LoadingPane.SizeGets the value of theloadingStatusSizeproperty.final javafx.scene.NodeGets the value of theplaceholderproperty.final javafx.scene.control.ProgressIndicatorGets the value of theprogressIndicatorproperty.final javafx.util.Callback<Integer, javafx.scene.Node> Gets the value of theseparatorFactoryproperty.final MultiColumnListView.ColumnItem<T> The item that is used to visualize the "to" location of an ongoing drag and drop operation.final booleanGets the value of thedisableDragAndDropproperty.final booleanGets the value of theshowHeadersproperty.final javafx.beans.property.ObjectProperty<javafx.util.Callback<MultiColumnListView<T>, javafx.scene.control.ListView<MultiColumnListView.ColumnItem<T>>>> Stores the callback that will be invoked to produce newListViewinstances.final javafx.beans.property.ObjectProperty<LoadingPane.Status> Provides a property that holds the current loading status of the control.final javafx.beans.property.ObjectProperty<LoadingPane.Size> Represents the size of the loading status indicator used in the control.final javafx.beans.property.ObjectProperty<javafx.scene.Node> The node that will be shown instead of the columns when no columns have been added to the view (seecolumnsProperty()).final javafx.beans.property.ObjectProperty<javafx.scene.control.ProgressIndicator> The progress indicator that will be used to display percentage progress or the indeterminate state of the loading progress.final javafx.beans.property.ObjectProperty<javafx.util.Callback<Integer, javafx.scene.Node>> An optional factory for creating separators that will be placed between columns.final voidsetCellFactory(javafx.util.Callback<MultiColumnListView<T>, MultiColumnListView.ColumnListCell<T>> cellFactory) Sets the value of thecellFactoryproperty.final voidsetColumns(javafx.collections.ObservableList<MultiColumnListView.ListViewColumn<T>> columns) Sets the value of thecolumnsproperty.final voidsetDisableDragAndDrop(boolean disableDragAndDrop) Sets the value of thedisableDragAndDropproperty.final voidsetDraggedItem(T draggedItem) Sets the value of thedraggedItemproperty.voidsetDragPossibleCallback(javafx.util.Callback<T, Boolean> dragPossibleCallback) Sets the value of thedragPossibleCallbackproperty.final voidsetDropPossibleCallback(javafx.util.Callback<MultiColumnListView.DropParameter<T>, Boolean> dropPossibleCallback) Sets the value of thedropPossibleCallbackproperty.final voidsetListViewFactory(javafx.util.Callback<MultiColumnListView<T>, javafx.scene.control.ListView<MultiColumnListView.ColumnItem<T>>> listViewFactory) Sets the value of thelistViewFactoryproperty.final voidsetLoadingStatus(LoadingPane.Status loadingStatus) Sets the value of theloadingStatusproperty.final voidsetLoadingStatusSize(LoadingPane.Size loadingStatusSize) Sets the value of theloadingStatusSizeproperty.final voidsetPlaceholder(javafx.scene.Node placeholder) Sets the value of theplaceholderproperty.final voidsetProgressIndicator(javafx.scene.control.ProgressIndicator progressIndicator) Sets the value of theprogressIndicatorproperty.final voidsetSeparatorFactory(javafx.util.Callback<Integer, javafx.scene.Node> separatorFactory) Sets the value of theseparatorFactoryproperty.final voidsetShowHeaders(boolean showHeaders) Sets the value of theshowHeadersproperty.final javafx.beans.property.BooleanPropertyDetermines whether the headers will be shown or not.Methods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getContextMenu, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipPropertyMethods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, 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, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthPropertyMethods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBoundsMethods inherited from class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, 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, getInitialCursor, 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, getViewOrder, hasProperties, hoverProperty, idProperty, 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, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visiblePropertyMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javafx.css.Styleable
getStyleableNode
-
Property Details
-
dropPossibleCallback
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<MultiColumnListView.DropParameter<T>, Boolean>> dropPossibleCallbackPropertyThe callback used to decide whether a dragged item may be dropped on a column.- See Also:
-
dragPossibleCallback
-
progressIndicator
public final javafx.beans.property.ObjectProperty<javafx.scene.control.ProgressIndicator> progressIndicatorPropertyThe progress indicator that will be used to display percentage progress or the indeterminate state of the loading progress.- See Also:
-
loadingStatus
Provides a property that holds the current loading status of the control. This status indicates whether the control is in a loading state, displaying an error, or ready to display the content.- See Also:
-
loadingStatusSize
Represents the size of the loading status indicator used in the control. This property determines the visual size (e.g., SMALL, MEDIUM, LARGE) of the loading status and can be updated dynamically to reflect size changes in the UI.The default value is
Size.MEDIUM.- See Also:
-
showHeaders
public final javafx.beans.property.BooleanProperty showHeadersPropertyDetermines whether the headers will be shown or not. Toggling this property will trigger a rebuild of the view.Can be set via CSS using the
-fx-show-headersproperty. Valid values are:true,false. The default value istrue.- See Also:
-
listViewFactory
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<MultiColumnListView<T>, javafx.scene.control.ListView<MultiColumnListView.ColumnItem<T>>>> listViewFactoryPropertyStores the callback that will be invoked to produce newListViewinstances.- See Also:
-
columns
public final javafx.beans.property.ListProperty<MultiColumnListView.ListViewColumn<T>> columnsPropertyA list of columns that define how many columns will be shown inside the view. The model objects in this list also store the header and the data for each column.- See Also:
-
placeholder
public final javafx.beans.property.ObjectProperty<javafx.scene.Node> placeholderPropertyThe node that will be shown instead of the columns when no columns have been added to the view (seecolumnsProperty()). The default placeholder is a label that reads "No columns defined." and that is surrounded by a dashed border.The placeholder node will be resized to fill the entire area of the control. No placeholder will be shown if this property is set to null. The placeholder will also not be shown while the control is loading or showing an error (see
loadingStatusProperty()).- See Also:
-
cellFactory
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<MultiColumnListView<T>, MultiColumnListView.ColumnListCell<T>>> cellFactoryPropertyThe cell factory that will be used for each one of theListViewinstances. The default factory producesMultiColumnListView.ColumnListCellinstances which show the item inside a pane with a dashed border and a centered label.- See Also:
-
separatorFactory
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<Integer, javafx.scene.Node>> separatorFactoryPropertyAn optional factory for creating separators that will be placed between columns. The default implementation creates a region and adds the style class "column-separator". No separators will be added to the view when the factory is being set to null.- See Also:
-
disableDragAndDrop
public final javafx.beans.property.BooleanProperty disableDragAndDropPropertyControls whether the user can rearrange items via drag and drop or not.Can be set via CSS using the
-fx-disable-drag-and-dropproperty. Valid values are:true,false. The default value isfalse.- See Also:
-
draggedItem
The item currently being dragged, ornullif no drag operation is in progress.- See Also:
-
-
Constructor Details
-
MultiColumnListView
public MultiColumnListView()Constructs a new view.
-
-
Method Details
-
createDefaultSkin
protected javafx.scene.control.Skin<?> createDefaultSkin()- Overrides:
createDefaultSkinin classjavafx.scene.control.Control
-
getUserAgentStylesheet
- Overrides:
getUserAgentStylesheetin classjavafx.scene.layout.Region
-
getDropPossibleCallback
public final javafx.util.Callback<MultiColumnListView.DropParameter<T>, Boolean> getDropPossibleCallback()Gets the value of thedropPossibleCallbackproperty.- Property description:
- The callback used to decide whether a dragged item may be dropped on a column.
- Returns:
- the value of the
dropPossibleCallbackproperty - See Also:
-
dropPossibleCallbackProperty
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<MultiColumnListView.DropParameter<T>, Boolean>> dropPossibleCallbackProperty()The callback used to decide whether a dragged item may be dropped on a column.- Returns:
- the drop validation callback property
- See Also:
-
setDropPossibleCallback
public final void setDropPossibleCallback(javafx.util.Callback<MultiColumnListView.DropParameter<T>, Boolean> dropPossibleCallback) Sets the value of thedropPossibleCallbackproperty.- Property description:
- The callback used to decide whether a dragged item may be dropped on a column.
- Parameters:
dropPossibleCallback- the value for thedropPossibleCallbackproperty- See Also:
-
getDragPossibleCallback
-
dragPossibleCallbackProperty
-
setDragPossibleCallback
Sets the value of thedragPossibleCallbackproperty.- Property description:
- The callback used to decide whether an item may be dragged.
- Parameters:
dragPossibleCallback- the value for thedragPossibleCallbackproperty- See Also:
-
getProgressIndicator
public final javafx.scene.control.ProgressIndicator getProgressIndicator()Gets the value of theprogressIndicatorproperty.- Property description:
- The progress indicator that will be used to display percentage progress or the indeterminate state of the loading progress.
- Returns:
- the value of the
progressIndicatorproperty - See Also:
-
progressIndicatorProperty
public final javafx.beans.property.ObjectProperty<javafx.scene.control.ProgressIndicator> progressIndicatorProperty()The progress indicator that will be used to display percentage progress or the indeterminate state of the loading progress.- Returns:
- the progress indicator
- See Also:
-
setProgressIndicator
public final void setProgressIndicator(javafx.scene.control.ProgressIndicator progressIndicator) Sets the value of theprogressIndicatorproperty.- Property description:
- The progress indicator that will be used to display percentage progress or the indeterminate state of the loading progress.
- Parameters:
progressIndicator- the value for theprogressIndicatorproperty- See Also:
-
getLoadingStatus
Gets the value of theloadingStatusproperty.- Property description:
- Provides a property that holds the current loading status of the control. This status indicates whether the control is in a loading state, displaying an error, or ready to display the content.
- Returns:
- the value of the
loadingStatusproperty - See Also:
-
loadingStatusProperty
Provides a property that holds the current loading status of the control. This status indicates whether the control is in a loading state, displaying an error, or ready to display the content.- Returns:
- an
ObjectPropertyrepresenting theLoadingPane.Statusof the control - See Also:
-
setLoadingStatus
Sets the value of theloadingStatusproperty.- Property description:
- Provides a property that holds the current loading status of the control. This status indicates whether the control is in a loading state, displaying an error, or ready to display the content.
- Parameters:
loadingStatus- the value for theloadingStatusproperty- See Also:
-
getLoadingStatusSize
Gets the value of theloadingStatusSizeproperty.- Property description:
- Represents the size of the loading status indicator used in the control.
This property determines the visual size (e.g., SMALL, MEDIUM, LARGE) of the loading status
and can be updated dynamically to reflect size changes in the UI.
The default value is
Size.MEDIUM. - Returns:
- the value of the
loadingStatusSizeproperty - See Also:
-
loadingStatusSizeProperty
Represents the size of the loading status indicator used in the control. This property determines the visual size (e.g., SMALL, MEDIUM, LARGE) of the loading status and can be updated dynamically to reflect size changes in the UI.The default value is
Size.MEDIUM.- Returns:
- the
loadingStatusSizeproperty - See Also:
-
setLoadingStatusSize
Sets the value of theloadingStatusSizeproperty.- Property description:
- Represents the size of the loading status indicator used in the control.
This property determines the visual size (e.g., SMALL, MEDIUM, LARGE) of the loading status
and can be updated dynamically to reflect size changes in the UI.
The default value is
Size.MEDIUM. - Parameters:
loadingStatusSize- the value for theloadingStatusSizeproperty- See Also:
-
isShowHeaders
public final boolean isShowHeaders()Gets the value of theshowHeadersproperty.- Property description:
- Determines whether the headers will be shown or not. Toggling this property will trigger
a rebuild of the view.
Can be set via CSS using the
-fx-show-headersproperty. Valid values are:true,false. The default value istrue. - Returns:
- the value of the
showHeadersproperty - See Also:
-
showHeadersProperty
public final javafx.beans.property.BooleanProperty showHeadersProperty()Determines whether the headers will be shown or not. Toggling this property will trigger a rebuild of the view.Can be set via CSS using the
-fx-show-headersproperty. Valid values are:true,false. The default value istrue.- Returns:
- true if the headers should be shown
- See Also:
-
setShowHeaders
public final void setShowHeaders(boolean showHeaders) Sets the value of theshowHeadersproperty.- Property description:
- Determines whether the headers will be shown or not. Toggling this property will trigger
a rebuild of the view.
Can be set via CSS using the
-fx-show-headersproperty. Valid values are:true,false. The default value istrue. - Parameters:
showHeaders- the value for theshowHeadersproperty- See Also:
-
getListViewFactory
public final javafx.util.Callback<MultiColumnListView<T>, javafx.scene.control.ListView<MultiColumnListView.ColumnItem<T>>> getListViewFactory()Gets the value of thelistViewFactoryproperty.- Property description:
- Stores the callback that will be invoked to produce new
ListViewinstances. - Returns:
- the value of the
listViewFactoryproperty - See Also:
-
listViewFactoryProperty
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<MultiColumnListView<T>, javafx.scene.control.ListView<MultiColumnListView.ColumnItem<T>>>> listViewFactoryProperty()Stores the callback that will be invoked to produce newListViewinstances.- Returns:
- the factory for creating the required list views, one for each column
- See Also:
-
setListViewFactory
public final void setListViewFactory(javafx.util.Callback<MultiColumnListView<T>, javafx.scene.control.ListView<MultiColumnListView.ColumnItem<T>>> listViewFactory) Sets the value of thelistViewFactoryproperty.- Property description:
- Stores the callback that will be invoked to produce new
ListViewinstances. - Parameters:
listViewFactory- the value for thelistViewFactoryproperty- See Also:
-
getColumns
Gets the value of thecolumnsproperty.- Property description:
- A list of columns that define how many columns will be shown inside the view. The model objects in this list also store the header and the data for each column.
- Returns:
- the value of the
columnsproperty - See Also:
-
columnsProperty
public final javafx.beans.property.ListProperty<MultiColumnListView.ListViewColumn<T>> columnsProperty()A list of columns that define how many columns will be shown inside the view. The model objects in this list also store the header and the data for each column.- Returns:
- the list of columns
- See Also:
-
setColumns
public final void setColumns(javafx.collections.ObservableList<MultiColumnListView.ListViewColumn<T>> columns) Sets the value of thecolumnsproperty.- Property description:
- A list of columns that define how many columns will be shown inside the view. The model objects in this list also store the header and the data for each column.
- Parameters:
columns- the value for thecolumnsproperty- See Also:
-
getPlaceholder
public final javafx.scene.Node getPlaceholder()Gets the value of theplaceholderproperty.- Property description:
- The node that will be shown instead of the columns when no columns have been
added to the view (see
columnsProperty()). The default placeholder is a label that reads "No columns defined." and that is surrounded by a dashed border.The placeholder node will be resized to fill the entire area of the control. No placeholder will be shown if this property is set to null. The placeholder will also not be shown while the control is loading or showing an error (see
loadingStatusProperty()). - Returns:
- the value of the
placeholderproperty - See Also:
-
placeholderProperty
public final javafx.beans.property.ObjectProperty<javafx.scene.Node> placeholderProperty()The node that will be shown instead of the columns when no columns have been added to the view (seecolumnsProperty()). The default placeholder is a label that reads "No columns defined." and that is surrounded by a dashed border.The placeholder node will be resized to fill the entire area of the control. No placeholder will be shown if this property is set to null. The placeholder will also not be shown while the control is loading or showing an error (see
loadingStatusProperty()).- Returns:
- the node shown when the view does not have any columns
- See Also:
-
setPlaceholder
public final void setPlaceholder(javafx.scene.Node placeholder) Sets the value of theplaceholderproperty.- Property description:
- The node that will be shown instead of the columns when no columns have been
added to the view (see
columnsProperty()). The default placeholder is a label that reads "No columns defined." and that is surrounded by a dashed border.The placeholder node will be resized to fill the entire area of the control. No placeholder will be shown if this property is set to null. The placeholder will also not be shown while the control is loading or showing an error (see
loadingStatusProperty()). - Parameters:
placeholder- the value for theplaceholderproperty- See Also:
-
getCellFactory
public final javafx.util.Callback<MultiColumnListView<T>, MultiColumnListView.ColumnListCell<T>> getCellFactory()Gets the value of thecellFactoryproperty.- Property description:
- The cell factory that will be used for each one of the
ListViewinstances. The default factory producesMultiColumnListView.ColumnListCellinstances which show the item inside a pane with a dashed border and a centered label. - Returns:
- the value of the
cellFactoryproperty - See Also:
-
cellFactoryProperty
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<MultiColumnListView<T>, MultiColumnListView.ColumnListCell<T>>> cellFactoryProperty()The cell factory that will be used for each one of theListViewinstances. The default factory producesMultiColumnListView.ColumnListCellinstances which show the item inside a pane with a dashed border and a centered label.- Returns:
- the cell factory
- See Also:
-
setCellFactory
public final void setCellFactory(javafx.util.Callback<MultiColumnListView<T>, MultiColumnListView.ColumnListCell<T>> cellFactory) Sets the value of thecellFactoryproperty.- Property description:
- The cell factory that will be used for each one of the
ListViewinstances. The default factory producesMultiColumnListView.ColumnListCellinstances which show the item inside a pane with a dashed border and a centered label. - Parameters:
cellFactory- the value for thecellFactoryproperty- See Also:
-
getSeparatorFactory
Gets the value of theseparatorFactoryproperty.- Property description:
- An optional factory for creating separators that will be placed between columns. The default implementation creates a region and adds the style class "column-separator". No separators will be added to the view when the factory is being set to null.
- Returns:
- the value of the
separatorFactoryproperty - See Also:
-
separatorFactoryProperty
public final javafx.beans.property.ObjectProperty<javafx.util.Callback<Integer, javafx.scene.Node>> separatorFactoryProperty()An optional factory for creating separators that will be placed between columns. The default implementation creates a region and adds the style class "column-separator". No separators will be added to the view when the factory is being set to null.- Returns:
- a separator node
- See Also:
-
setSeparatorFactory
public final void setSeparatorFactory(javafx.util.Callback<Integer, javafx.scene.Node> separatorFactory) Sets the value of theseparatorFactoryproperty.- Property description:
- An optional factory for creating separators that will be placed between columns. The default implementation creates a region and adds the style class "column-separator". No separators will be added to the view when the factory is being set to null.
- Parameters:
separatorFactory- the value for theseparatorFactoryproperty- See Also:
-
isDisableDragAndDrop
public final boolean isDisableDragAndDrop()Gets the value of thedisableDragAndDropproperty.- Property description:
- Controls whether the user can rearrange items via drag and drop or not.
Can be set via CSS using the
-fx-disable-drag-and-dropproperty. Valid values are:true,false. The default value isfalse. - Returns:
- the value of the
disableDragAndDropproperty - See Also:
-
disableDragAndDropProperty
public final javafx.beans.property.BooleanProperty disableDragAndDropProperty()Controls whether the user can rearrange items via drag and drop or not.Can be set via CSS using the
-fx-disable-drag-and-dropproperty. Valid values are:true,false. The default value isfalse.- Returns:
- "true" if the control allows rearranging items via drag and drop
- See Also:
-
setDisableDragAndDrop
public final void setDisableDragAndDrop(boolean disableDragAndDrop) Sets the value of thedisableDragAndDropproperty.- Property description:
- Controls whether the user can rearrange items via drag and drop or not.
Can be set via CSS using the
-fx-disable-drag-and-dropproperty. Valid values are:true,false. The default value isfalse. - Parameters:
disableDragAndDrop- the value for thedisableDragAndDropproperty- See Also:
-
getClassCssMetaData
Returns the CSS metadata for this control class.- Returns:
- the CSS metadata
-
getControlCssMetaData
- Overrides:
getControlCssMetaDatain classjavafx.scene.control.Control
-
getDraggedItem
Gets the value of thedraggedItemproperty.- Property description:
- The item currently being dragged, or
nullif no drag operation is in progress. - Returns:
- the value of the
draggedItemproperty - See Also:
-
draggedItemProperty
The item currently being dragged, ornullif no drag operation is in progress.- Returns:
- the dragged item property
- See Also:
-
setDraggedItem
Sets the value of thedraggedItemproperty.- Property description:
- The item currently being dragged, or
nullif no drag operation is in progress. - Parameters:
draggedItem- the value for thedraggedItemproperty- See Also:
-
getDraggedItems
Returns the items currently involved in a drag operation.- Returns:
- the dragged items
-
getFromPlaceholder
The item that is used to visualize the "from" location of an ongoing drag and drop operation. The item is created and managed by the control itself.- Returns:
- the "from" placeholder item
-
getToPlaceholder
The item that is used to visualize the "to" location of an ongoing drag and drop operation. The item is created and managed by the control itself.- Returns:
- the "to" placeholder item
-
getDraggedColumnItem
The wrapper of the item that is currently being dragged, ornullif no drag operation is in progress.- Returns:
- the wrapper of the currently dragged item
-