java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.control.Control
javafx.scene.control.TableView<S>
org.tentackle.fx.component.FxTableView<S>
- Type Parameters:
S- the row type
- All Implemented Interfaces:
javafx.css.Styleable,javafx.event.EventTarget,javafx.scene.control.Skinnable,ErrorPopupSupported,FxComponent,FxControl,InfoPopupSupported
- Direct Known Subclasses:
TotalsTableView
Extended TableView.
- Author:
- harald
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ReadOnlyBooleanPropertyGets the changeable property.javafx.beans.property.BooleanPropertyGets the mandatory property.javafx.beans.property.BooleanPropertyGets the viewModified property.Properties inherited from class javafx.scene.control.TableView
columnResizePolicy, comparator, editable, editingCell, fixedCellSize, focusModel, items, onScrollToColumn, onScrollTo, onSort, placeholder, rowFactory, selectionModel, sortPolicy, tableMenuButtonVisibleProperties 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, focusVisible, focusWithin, 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 -
Nested Class Summary
Nested classes/interfaces inherited from class javafx.scene.control.TableView
javafx.scene.control.TableView.ResizeFeatures<S>, javafx.scene.control.TableView.TableViewFocusModel<S>, javafx.scene.control.TableView.TableViewSelectionModel<S> -
Field Summary
Fields inherited from class javafx.scene.control.TableView
CONSTRAINED_RESIZE_POLICY, CONSTRAINED_RESIZE_POLICY_ALL_COLUMNS, CONSTRAINED_RESIZE_POLICY_FLEX_LAST_COLUMN, CONSTRAINED_RESIZE_POLICY_FLEX_NEXT_COLUMN, CONSTRAINED_RESIZE_POLICY_LAST_COLUMN, CONSTRAINED_RESIZE_POLICY_NEXT_COLUMN, CONSTRAINED_RESIZE_POLICY_SUBSEQUENT_COLUMNS, DEFAULT_SORT_POLICY, UNCONSTRAINED_RESIZE_POLICYFields 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 TypeMethodDescriptionvoidaddModelToViewListener(ModelToViewListener listener) Adds a model-to-view listener.
The listener will be invoked before the binding operation.
If the control is a container, the listener will be invoked if any of the container's components get updated.voidaddViewToModelListener(ViewToModelListener listener) Adds a view-to-model listener.
The listener will be invoked after the binding operation.
If the control is a container, the listener will be invoked if any of the container's components update the model.javafx.beans.property.ReadOnlyBooleanPropertyGets the changeable property.voidConfigures or re-configures the table.
Requires a valid table configuration.copyToClipboard(boolean swap) Copies the selected cells to the clipboard.protected FxTableViewDelegateCreates the delegate.Gets the binding.Gets the binding path.Gets the component path.Gets the table configuration.Gets the lazily created component delegate.getError()Gets the error message.Gets the generic type.Gets the online-help URL.getInfo()Gets the info message.Gets the parent container.Retrieves the view value saved withFxControl.saveView().
The returned type is the internal native type of the component.FxTableCell<?, ?> Gets the table cell if the component is used as a table cell editor.FxTreeTableCell<?, ?> Gets the treetable cell if the component is used as a treetable cell editor.Class<?> getType()Gets the type this component returns viaFxComponent.getViewValue().ValueTranslator<?, ?> Gets the value translator.Retrieves the internal native object of the component.<V> VRetrieves the value from this component.
The value's type is that of the model.voidhandleKeyEvent(javafx.scene.input.KeyEvent event) Handles all key events.voidHides the error popup if shown.voidHides the info popup if shown.voidInvalidates the saved view.booleanDetermines whether this container is bindable.booleanGets the value of thechangeableproperty.booleanReturns whether setContainerChangeable is ignored by this control.booleanReturns whether the copy to clipboard feature is enabled.booleanReturns whether this is a temporary error.
Temporary errors are set by the value translators typically if some parsing failed.booleanReturns whether theViewToModelListeners should be invoked even if the model's value did not change at all.
By default, the listener will always be invoked.booleanReturns whether theModelToViewListeners should be invoked even if the view's value will not change at all.
By default, the listener will always be invoked.booleanGets the value of themandatoryproperty.booleanReturns whether model was updated andFxControl.updateView()not invoked since then.
Some components, such as FxTableView, never update the model because this is already done by the ObservableList.booleanReturns whether the view object is saved.booleanGets the value of theviewModifiedproperty.voidloadPreferences(String suffix, boolean system) Loads the column sizes, visibility, view size and sorting from the preferences.javafx.beans.property.BooleanPropertyGets the mandatory property.voidremoveModelToViewListener(ModelToViewListener listener) Removes a model-to-view listener.voidremoveViewToModelListener(ViewToModelListener listener) Removes a view-to-model listener.voidsavePreferences(String suffix, boolean system) Saves the column sizes, visibility, view size and sorting to the preferences.voidsaveView()Creates a copy of the value shown to the user.voidscrollToCentered(int row) Scrolls the view in such a way that the given row is positioned in the center of the visible rows.voidscrollToCentered(S object) Scrolls the view in such a way that the given object's row is positioned in the center of the visible rows.voidsetBindable(boolean bindable) Sets whether this control is bindable, i.e. should be checked within a binding hierarchy.voidsetBinding(FxComponentBinding binding) Sets the binding.voidsetBindingPath(String bindingPath) Sets the path to bind this component to.voidsetChangeable(boolean changeable) Sets the value of thechangeableproperty.voidsetComponentPath(String componentPath) Sets the component path.voidsetConfiguration(TableConfiguration<S> configuration) Sets the table configuration.voidsetContainerChangeable(boolean containerChangeable) Invoked when setChangeable() is invoked on the container of this component.voidsetContainerChangeableIgnored(boolean containerChangeableIgnored) Sets whether to ignore setContainerChangeable.voidsetCopyToClipboardEnabled(boolean copyToClipboardEnabled) Configures the table to copy a cell via Ctrl-C to the clipboard.voidsetDelegate(FxTableViewDelegate delegate) Sets the delegate.
Useful for application specific needs.voidSets the error message.
Notice that an empty string will set the style but does not show any popup.voidsetErrorTemporary(boolean errorTemporary) Sets the temporary error flag.voidsetGenericType(Type type) Sets the generic type.voidsetHelpUrl(String helpUrl) Sets the online-help URL.
If a help url is set, a browser will be launched to show that url if there is no help url for the control the help was requested for.voidSets the info message.
Notice that an empty string will set the style but does not show any popup.voidsetListenerSuppressedIfModelUnchanged(boolean listenerSuppressedIfModelUnchanged) Sets whether theViewToModelListeners should be invoked even if the model's value did not change at all.voidsetListenerSuppressedIfViewUnchanged(boolean listenerSuppressedIfViewUnchanged) Sets whether theModelToViewListeners should be invoked even if the view's value will not change at all.voidsetMandatory(boolean mandatory) Sets the value of themandatoryproperty.voidsetReorderable(boolean reorderable) Sets the reorderable property of all columns.voidsetSortable(boolean sortable) Sets the sortable property of all columns.voidsetTableCell(FxTableCell<?, ?> tableCell) Sets the table cell if the component is used as a table cell editor.voidsetTreeTableCell(FxTreeTableCell<?, ?> treeTableCell) Sets the treetable cell if the component is used as a treetable cell editor.voidSets the type for this component.voidsetValueTranslator(ValueTranslator<?, ?> valueTranslator) Sets a value translator.voidsetViewModified(boolean viewModified) Sets the value of theviewModifiedproperty.voidsetViewObject(Object viewObject) Sets the internal native object of the component.voidsetViewValue(Object value) Sets a value in this component.
The value's type is that of the model.voidShows the error popup.
Requires the error message set.voidshowHelp()Displays online help if configured.voidShows the info popup.
Requires the info message set.Returns the classname plus optional fx:id.voidWalks up the component hierarchy and updates the viewModified property.
This is done by comparing the saved view value with the current view.voidUpdates the model according to the view.voidUpdates the view according to the model.javafx.beans.property.BooleanPropertyGets the viewModified property.Methods inherited from class javafx.scene.control.TableView
columnResizePolicyProperty, comparatorProperty, createDefaultSkin, edit, editableProperty, editingCellProperty, fixedCellSizeProperty, focusModelProperty, getClassCssMetaData, getColumnResizePolicy, getColumns, getComparator, getControlCssMetaData, getEditingCell, getFixedCellSize, getFocusModel, getItems, getOnScrollTo, getOnScrollToColumn, getOnSort, getPlaceholder, getRowFactory, getSelectionModel, getSortOrder, getSortPolicy, getVisibleLeafColumn, getVisibleLeafColumns, getVisibleLeafIndex, isEditable, isTableMenuButtonVisible, itemsProperty, onScrollToColumnProperty, onScrollToProperty, onSortProperty, placeholderProperty, queryAccessibleAttribute, refresh, resizeColumn, rowFactoryProperty, scrollTo, scrollTo, scrollToColumn, scrollToColumnIndex, selectionModelProperty, setColumnResizePolicy, setEditable, setFixedCellSize, setFocusModel, setItems, setOnScrollTo, setOnScrollToColumn, setOnSort, setPlaceholder, setRowFactory, setSelectionModel, setSortPolicy, setTableMenuButtonVisible, sort, sortPolicyProperty, tableMenuButtonVisiblePropertyMethods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getContextMenu, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, 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, getUserAgentStylesheet, 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, focusVisibleProperty, focusWithinProperty, 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, isFocusVisible, isFocusWithin, 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.tentackle.fx.FxComponent
isCellEditorMethods inherited from interface javafx.css.Styleable
getStyleableNode
-
Property Details
-
mandatory
public javafx.beans.property.BooleanProperty mandatoryProperty- Specified by:
mandatoryPropertyin interfaceFxComponent- Returns:
- the property
- See Also:
-
changeable
public javafx.beans.property.ReadOnlyBooleanProperty changeableProperty- Specified by:
changeablePropertyin interfaceFxControl- Returns:
- the property
- See Also:
-
viewModified
public javafx.beans.property.BooleanProperty viewModifiedProperty- Specified by:
viewModifiedPropertyin interfaceFxControl- Returns:
- the property
- See Also:
-
-
Constructor Details
-
FxTableView
public FxTableView()Creates a FxTableView.
-
-
Method Details
-
getConfiguration
Gets the table configuration.- Returns:
- the configuration, null if not configured
-
setConfiguration
Sets the table configuration.- Parameters:
configuration- the configuration
-
configure
public void configure()Configures or re-configures the table.
Requires a valid table configuration. -
scrollToCentered
public void scrollToCentered(int row) Scrolls the view in such a way that the given row is positioned in the center of the visible rows.- Parameters:
row- the model row index
-
scrollToCentered
Scrolls the view in such a way that the given object's row is positioned in the center of the visible rows.- Parameters:
object- the object to scroll to
-
savePreferences
Saves the column sizes, visibility, view size and sorting to the preferences.- Parameters:
suffix- the configuration suffix, null if nonesystem- true if save to system prefs, else user prefs
-
loadPreferences
Loads the column sizes, visibility, view size and sorting from the preferences.- Parameters:
suffix- the configuration suffix, null if nonesystem- true if load from system prefs only, else user prefs first
-
setSortable
public void setSortable(boolean sortable) Sets the sortable property of all columns.- Parameters:
sortable- true if sortable
-
setReorderable
public void setReorderable(boolean reorderable) Sets the reorderable property of all columns.- Parameters:
reorderable- true if reorderable
-
setCopyToClipboardEnabled
public void setCopyToClipboardEnabled(boolean copyToClipboardEnabled) Configures the table to copy a cell via Ctrl-C to the clipboard.- Parameters:
copyToClipboardEnabled- true to enable
-
isCopyToClipboardEnabled
public boolean isCopyToClipboardEnabled()Returns whether the copy to clipboard feature is enabled.- Returns:
- true if enabled
-
copyToClipboard
Copies the selected cells to the clipboard.- Parameters:
swap- true to swap row/columns of copied cells (rows become columns and columns become rows)- Returns:
- the copied text, null if nothing copied
-
handleKeyEvent
public void handleKeyEvent(javafx.scene.input.KeyEvent event) Handles all key events.- Parameters:
event- the key event
-
createDelegate
Creates the delegate.- Returns:
- the delegate
-
getDelegate
Description copied from interface:FxControlGets the lazily created component delegate.- Specified by:
getDelegatein interfaceFxComponent- Specified by:
getDelegatein interfaceFxControl- Returns:
- the delegate
-
setDelegate
Sets the delegate.
Useful for application specific needs.- Parameters:
delegate- the delegate
-
getParentContainer
Description copied from interface:FxControlGets the parent container.- Specified by:
getParentContainerin interfaceFxControl- Returns:
- the parent, null if not a component of a container
-
setValueTranslator
Description copied from interface:FxComponentSets a value translator.- Specified by:
setValueTranslatorin interfaceFxComponent- Parameters:
valueTranslator- the translator
-
getValueTranslator
Description copied from interface:FxComponentGets the value translator.- Specified by:
getValueTranslatorin interfaceFxComponent- Returns:
- the translator
-
invalidateSavedView
public void invalidateSavedView()Description copied from interface:FxControlInvalidates the saved view.- Specified by:
invalidateSavedViewin interfaceFxControl
-
isSavedViewObjectValid
public boolean isSavedViewObjectValid()Description copied from interface:FxComponentReturns whether the view object is saved.- Specified by:
isSavedViewObjectValidin interfaceFxComponent- Returns:
- true if saved, false if invalid
-
getViewValue
public <V> V getViewValue()Description copied from interface:FxComponentRetrieves the value from this component.
The value's type is that of the model.- Specified by:
getViewValuein interfaceFxComponent- Type Parameters:
V- the value's type- Returns:
- the value shown by the component
-
setViewValue
Description copied from interface:FxComponentSets a value in this component.
The value's type is that of the model.- Specified by:
setViewValuein interfaceFxComponent- Parameters:
value- is the value to set
-
setType
Description copied from interface:FxComponentSets the type for this component.Notice that the type can be applied only once. This is because previously installed listeners could cause memory leaks.
- Specified by:
setTypein interfaceFxComponent- Parameters:
type- the type
-
getType
Description copied from interface:FxComponentGets the type this component returns viaFxComponent.getViewValue().- Specified by:
getTypein interfaceFxComponent- Returns:
- the type
-
setGenericType
Description copied from interface:FxComponentSets the generic type.- Specified by:
setGenericTypein interfaceFxComponent- Parameters:
type- the generic type
-
getGenericType
Description copied from interface:FxComponentGets the generic type.- Specified by:
getGenericTypein interfaceFxComponent- Returns:
- the generic type
-
updateView
public void updateView()Description copied from interface:FxControlUpdates the view according to the model.- Specified by:
updateViewin interfaceFxControl
-
updateModel
public void updateModel()Description copied from interface:FxControlUpdates the model according to the view.- Specified by:
updateModelin interfaceFxControl
-
addModelToViewListener
Description copied from interface:FxControlAdds a model-to-view listener.
The listener will be invoked before the binding operation.
If the control is a container, the listener will be invoked if any of the container's components get updated.- Specified by:
addModelToViewListenerin interfaceFxControl- Parameters:
listener- the value listener to add
-
removeModelToViewListener
Description copied from interface:FxControlRemoves a model-to-view listener.- Specified by:
removeModelToViewListenerin interfaceFxControl- Parameters:
listener- the value listener to remove
-
addViewToModelListener
Description copied from interface:FxControlAdds a view-to-model listener.
The listener will be invoked after the binding operation.
If the control is a container, the listener will be invoked if any of the container's components update the model.- Specified by:
addViewToModelListenerin interfaceFxControl- Parameters:
listener- the value listener to add
-
removeViewToModelListener
Description copied from interface:FxControlRemoves a view-to-model listener.- Specified by:
removeViewToModelListenerin interfaceFxControl- Parameters:
listener- the value listener to remove
-
setMandatory
public void setMandatory(boolean mandatory) Sets the value of themandatoryproperty.- Specified by:
setMandatoryin interfaceFxComponent- Property description:
- Parameters:
mandatory- the value for themandatoryproperty- See Also:
-
isMandatory
public boolean isMandatory()Gets the value of themandatoryproperty.- Specified by:
isMandatoryin interfaceFxComponent- Property description:
- Returns:
- the value of the
mandatoryproperty - See Also:
-
mandatoryProperty
public javafx.beans.property.BooleanProperty mandatoryProperty()Description copied from interface:FxComponentGets the mandatory property.- Specified by:
mandatoryPropertyin interfaceFxComponent- Returns:
- the
mandatoryproperty - See Also:
-
setBindingPath
Description copied from interface:FxComponentSets the path to bind this component to.Usually the binding path will be determined from the components declared name. However, it can be set programmatically as well.
- Specified by:
setBindingPathin interfaceFxComponent- Parameters:
bindingPath- the binding path, for ex."invoiceNumber", null if autobinding- See Also:
-
getBindingPath
Description copied from interface:FxComponentGets the binding path.- Specified by:
getBindingPathin interfaceFxComponent- Returns:
- the field path, null if autobinding (default)
-
setComponentPath
Description copied from interface:FxComponentSets the component path.The path is
<declaring-class-name>.<field-name>. Example"de.krake.invoicer.InvoicePanel.customerNumberField".Notice: the component path is set during binding.
- Specified by:
setComponentPathin interfaceFxComponent- Parameters:
componentPath- the component path
-
getComponentPath
Description copied from interface:FxComponentGets the component path.- Specified by:
getComponentPathin interfaceFxComponent- Returns:
- the component path, null if not bound
-
setBinding
Description copied from interface:FxComponentSets the binding.- Specified by:
setBindingin interfaceFxComponent- Parameters:
binding- the binding, null if none.
-
getBinding
Description copied from interface:FxComponentGets the binding.- Specified by:
getBindingin interfaceFxComponent- Returns:
- the binding, null if none
-
setChangeable
public void setChangeable(boolean changeable) Sets the value of thechangeableproperty.- Specified by:
setChangeablein interfaceFxControl- Property description:
- Parameters:
changeable- the value for thechangeableproperty- See Also:
-
isChangeable
public boolean isChangeable()Gets the value of thechangeableproperty.- Specified by:
isChangeablein interfaceFxControl- Property description:
- Returns:
- the value of the
changeableproperty - See Also:
-
changeableProperty
public javafx.beans.property.ReadOnlyBooleanProperty changeableProperty()Description copied from interface:FxControlGets the changeable property.- Specified by:
changeablePropertyin interfaceFxControl- Returns:
- the
changeableproperty - See Also:
-
setContainerChangeable
public void setContainerChangeable(boolean containerChangeable) Description copied from interface:FxControlInvoked when setChangeable() is invoked on the container of this component.- Specified by:
setContainerChangeablein interfaceFxControl- Parameters:
containerChangeable- true if container is changeable, false if all components readonly
-
setContainerChangeableIgnored
public void setContainerChangeableIgnored(boolean containerChangeableIgnored) Description copied from interface:FxControlSets whether to ignore setContainerChangeable.- Specified by:
setContainerChangeableIgnoredin interfaceFxControl- Parameters:
containerChangeableIgnored- true if ignore, default is false
-
isContainerChangeableIgnored
public boolean isContainerChangeableIgnored()Description copied from interface:FxControlReturns whether setContainerChangeable is ignored by this control.- Specified by:
isContainerChangeableIgnoredin interfaceFxControl- Returns:
- true if ignore
-
setViewModified
public void setViewModified(boolean viewModified) Sets the value of theviewModifiedproperty.- Specified by:
setViewModifiedin interfaceFxControl- Property description:
- Parameters:
viewModified- the value for theviewModifiedproperty- See Also:
-
isViewModified
public boolean isViewModified()Gets the value of theviewModifiedproperty.- Specified by:
isViewModifiedin interfaceFxControl- Property description:
- Returns:
- the value of the
viewModifiedproperty - See Also:
-
viewModifiedProperty
public javafx.beans.property.BooleanProperty viewModifiedProperty()Description copied from interface:FxControlGets the viewModified property.- Specified by:
viewModifiedPropertyin interfaceFxControl- Returns:
- the
viewModifiedproperty - See Also:
-
triggerViewModified
public void triggerViewModified()Description copied from interface:FxControlWalks up the component hierarchy and updates the viewModified property.
This is done by comparing the saved view value with the current view.- Specified by:
triggerViewModifiedin interfaceFxControl
-
saveView
public void saveView()Description copied from interface:FxControlCreates a copy of the value shown to the user. -
getSavedViewObject
Description copied from interface:FxComponentRetrieves the view value saved withFxControl.saveView().
The returned type is the internal native type of the component.- Specified by:
getSavedViewObjectin interfaceFxComponent- Returns:
- the saved view value
-
getViewObject
Description copied from interface:FxComponentRetrieves the internal native object of the component.- Specified by:
getViewObjectin interfaceFxComponent- Returns:
- the component's object
-
setViewObject
Description copied from interface:FxComponentSets the internal native object of the component.- Specified by:
setViewObjectin interfaceFxComponent- Parameters:
viewObject- the internal object
-
setBindable
public void setBindable(boolean bindable) Description copied from interface:FxControlSets whether this control is bindable, i.e. should be checked within a binding hierarchy.- Specified by:
setBindablein interfaceFxControl- Parameters:
bindable- true if bindable, else not eligible for the binding process
-
isBindable
public boolean isBindable()Description copied from interface:FxControlDetermines whether this container is bindable.- Specified by:
isBindablein interfaceFxControl- Returns:
- true if bindable, else not eligible for the binding process
-
setHelpUrl
Description copied from interface:FxControlSets the online-help URL.
If a help url is set, a browser will be launched to show that url if there is no help url for the control the help was requested for.- Specified by:
setHelpUrlin interfaceFxControl- Parameters:
helpUrl- the help url
-
getHelpUrl
Description copied from interface:FxControlGets the online-help URL.- Specified by:
getHelpUrlin interfaceFxControl- Returns:
- the help url, default is null
-
showHelp
public void showHelp()Description copied from interface:FxControlDisplays online help if configured. -
toGenericString
Description copied from interface:FxControlReturns the classname plus optional fx:id.- Specified by:
toGenericStringin interfaceFxControl- Returns:
- the generic string for diagnostics and logging
-
setError
Description copied from interface:ErrorPopupSupportedSets the error message.
Notice that an empty string will set the style but does not show any popup.- Specified by:
setErrorin interfaceErrorPopupSupported- Parameters:
error- the error message, null to clear
-
getError
Description copied from interface:ErrorPopupSupportedGets the error message.- Specified by:
getErrorin interfaceErrorPopupSupported- Returns:
- the message, null if no error
-
setErrorTemporary
public void setErrorTemporary(boolean errorTemporary) Description copied from interface:ErrorPopupSupportedSets the temporary error flag.- Specified by:
setErrorTemporaryin interfaceErrorPopupSupported- Parameters:
errorTemporary- true if this is a temporary error
-
isErrorTemporary
public boolean isErrorTemporary()Description copied from interface:ErrorPopupSupportedReturns whether this is a temporary error.
Temporary errors are set by the value translators typically if some parsing failed. Non-temporary are set by the application, for example when a persistence validation failed.- Specified by:
isErrorTemporaryin interfaceErrorPopupSupported- Returns:
- true if temporary error
-
showErrorPopup
public void showErrorPopup()Description copied from interface:ErrorPopupSupportedShows the error popup.
Requires the error message set.- Specified by:
showErrorPopupin interfaceErrorPopupSupported
-
hideErrorPopup
public void hideErrorPopup()Description copied from interface:ErrorPopupSupportedHides the error popup if shown.- Specified by:
hideErrorPopupin interfaceErrorPopupSupported
-
setInfo
Description copied from interface:InfoPopupSupportedSets the info message.
Notice that an empty string will set the style but does not show any popup.- Specified by:
setInfoin interfaceInfoPopupSupported- Parameters:
info- the info message, null to clear
-
getInfo
Description copied from interface:InfoPopupSupportedGets the info message.- Specified by:
getInfoin interfaceInfoPopupSupported- Returns:
- the message, null if no info
-
showInfoPopup
public void showInfoPopup()Description copied from interface:InfoPopupSupportedShows the info popup.
Requires the info message set.- Specified by:
showInfoPopupin interfaceInfoPopupSupported
-
hideInfoPopup
public void hideInfoPopup()Description copied from interface:InfoPopupSupportedHides the info popup if shown.- Specified by:
hideInfoPopupin interfaceInfoPopupSupported
-
isModelUpdated
public boolean isModelUpdated()Description copied from interface:FxComponentReturns whether model was updated andFxControl.updateView()not invoked since then.
Some components, such as FxTableView, never update the model because this is already done by the ObservableList. On those cases, false will be returned.- Specified by:
isModelUpdatedin interfaceFxComponent- Returns:
- true if updateView could make sense
-
setTableCell
Description copied from interface:FxComponentSets the table cell if the component is used as a table cell editor.- Specified by:
setTableCellin interfaceFxComponent- Parameters:
tableCell- the cell, null to disconnect from table cell
-
getTableCell
Description copied from interface:FxComponentGets the table cell if the component is used as a table cell editor.- Specified by:
getTableCellin interfaceFxComponent- Returns:
- the cell, null if not a cell editor
-
setTreeTableCell
Description copied from interface:FxComponentSets the treetable cell if the component is used as a treetable cell editor.- Specified by:
setTreeTableCellin interfaceFxComponent- Parameters:
treeTableCell- the cell, null to disconnect from treetable cell
-
getTreeTableCell
Description copied from interface:FxComponentGets the treetable cell if the component is used as a treetable cell editor.- Specified by:
getTreeTableCellin interfaceFxComponent- Returns:
- the cell, null if not a cell editor
-
isListenerSuppressedIfModelUnchanged
public boolean isListenerSuppressedIfModelUnchanged()Description copied from interface:FxComponentReturns whether theViewToModelListeners should be invoked even if the model's value did not change at all.
By default, the listener will always be invoked.- Specified by:
isListenerSuppressedIfModelUnchangedin interfaceFxComponent- Returns:
- true if suppress invocation
-
setListenerSuppressedIfModelUnchanged
public void setListenerSuppressedIfModelUnchanged(boolean listenerSuppressedIfModelUnchanged) Description copied from interface:FxComponentSets whether theViewToModelListeners should be invoked even if the model's value did not change at all.- Specified by:
setListenerSuppressedIfModelUnchangedin interfaceFxComponent- Parameters:
listenerSuppressedIfModelUnchanged- true if suppress invocation
-
isListenerSuppressedIfViewUnchanged
public boolean isListenerSuppressedIfViewUnchanged()Description copied from interface:FxComponentReturns whether theModelToViewListeners should be invoked even if the view's value will not change at all.
By default, the listener will always be invoked.- Specified by:
isListenerSuppressedIfViewUnchangedin interfaceFxComponent- Returns:
- true if suppress invocation
-
setListenerSuppressedIfViewUnchanged
public void setListenerSuppressedIfViewUnchanged(boolean listenerSuppressedIfViewUnchanged) Description copied from interface:FxComponentSets whether theModelToViewListeners should be invoked even if the view's value will not change at all.- Specified by:
setListenerSuppressedIfViewUnchangedin interfaceFxComponent- Parameters:
listenerSuppressedIfViewUnchanged- true if suppress invocation
-