- java.lang.Object
-
- javafx.scene.Node
-
- javafx.scene.Parent
-
- javafx.scene.layout.Region
-
- javafx.scene.control.Control
-
- javafx.scene.web.HTMLEditor
-
- org.tentackle.fx.component.FxHTMLEditor
-
- All Implemented Interfaces:
javafx.css.Styleable,javafx.event.EventTarget,javafx.scene.control.Skinnable,ErrorPopupSupported,FxComponent,FxControl,FxTextComponent,InfoPopupSupported
public class FxHTMLEditor extends javafx.scene.web.HTMLEditor implements FxTextComponent
Extended HTMLEditor.- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description FxHTMLEditor()Creates a new instance of the HTMLEditor control.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddModelToViewListener(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.voidautoSelect()Selects or deselects all text in the text input.javafx.beans.property.ReadOnlyBooleanPropertychangeableProperty()Gets the changaeble property.protected FxHTMLEditorDelegatecreateDelegate()Creates the delegate.FxComponentBindinggetBinding()Gets the binding.java.lang.StringgetBindingPath()Gets the binding path.CaseConversiongetCaseConversion()Gets the case conversion.intgetColumns()Gets the columns.java.lang.StringgetComponentPath()Gets the component path.FxHTMLEditorDelegategetDelegate()Gets the lazily created component delegate.java.lang.StringgetError()Gets the error message.java.lang.IntegergetErrorOffset()Gets the error offset.chargetFiller()Gets the filler character.java.lang.reflect.TypegetGenericType()Gets the generic type.java.lang.StringgetHelpUrl()Gets the online-help URL.java.lang.StringgetInfo()Gets the info message.java.lang.StringgetInvalidChars()Gets invalid characters.intgetMaxColumns()Gets the maximum number of columns.FxContainergetParentContainer()Gets the parent container.java.lang.StringgetPattern()Gets the format pattern.java.lang.ObjectgetSavedViewObject()Retrieves the view value saved withFxControl.saveView().
The returned type is the internal native type of the component.intgetScale()Gets the current scale.FxTableCell<?,?>getTableCell()Gets the table cell if the component is used as a table cell editor.javafx.geometry.PosgetTextAlignment()Gets the text alignment.java.util.function.Function<java.lang.String,java.lang.String>getTextConverter()Gets the text converter.java.lang.Class<?>getType()Gets the type this component returns viaFxComponent.getViewValue().java.lang.StringgetValidChars()Gets allowed characters.ValueTranslator<?,?>getValueTranslator()Gets the value translator.java.lang.ObjectgetViewObject()Retrieves the internal native object of the component.<V> VgetViewValue()Retrieves the value from this component.
The value's type is that of the model.voidhideErrorPopup()Hides the error popup if shown.voidhideInfoPopup()Hides the info popup if shown.voidinvalidateSavedView()Invalidates the saved view.booleanisAutoSelect()Returns whether the auto-select feature is enabled.booleanisBindable()Determines whether this container is bindable.booleanisChangeable()Returns if this control is changeable.booleanisContainerChangeableIgnored()Returns whether setContainerChangeable is ignored by this control.booleanisErrorTemporary()Returns whether this is a temporary error.
Temporary errors are set by the value translators typically if some parsing failed.booleanisLenient()Returns whether parsing to model should be lenient.booleanisMandatory()Gets the mandatory option.booleanisModelUpdated()Returns whether model was updated and updateview not invoked since then.
Some components, such as FxTableView, never update the model because this is already done by the ObservableList.booleanisSavedViewObjectValid()Returns whether the view object is saved.booleanisUnsigned()Returns whether a numeric field is unsigned or signed.booleanisUTC()Returns whether this is a UTC timestamp.booleanisViewModified()Returns whether the user has modified the view since the lastFxControl.updateView().javafx.beans.property.BooleanPropertymandatoryProperty()Gets the mandatory property.voidmapErrorOffsetToCaretPosition()Sets the caret position according to the error offset.
Does nothing if error offset is null.voidremoveModelToViewListener(ModelToViewListener listener)Removes a model-to-view listener.voidremoveViewToModelListener(ViewToModelListener listener)Removes a view-to-model listener.voidsaveView()Creates a copy of the value shown to the user.voidsetAutoSelect(boolean autoSelect)Sets the auto-select feature.
A component with autoselect enabled will automatically select all characters if the component gets the keyboard focus.voidsetBindable(boolean bindable)Sets whether this control is bindable, i.e.voidsetBinding(FxComponentBinding binding)Sets the binding.voidsetBindingPath(java.lang.String bindingPath)Sets the path to bind this component to.voidsetCaseConversion(CaseConversion caseConversion)Sets the case conversion.voidsetChangeable(boolean changeable)Set the control to be changeable.
This is a unified abstraction and will be translated to setEditable or setDisabled, whatever is appropriate to this control.voidsetColumns(int columns)Sets the number of columns in this component.
The visible width is adjusted according to the current font.voidsetComponentPath(java.lang.String componentPath)Sets the component path.voidsetContainerChangableIgnored(boolean containerChangeableIgnored)Sets whether to ignore setContainerChangeable.voidsetContainerChangeable(boolean containerChangeable)Invoked when setChangeable() is invoked on the container of this component.voidsetDelegate(FxHTMLEditorDelegate delegate)Sets the delegate.
Useful for application specific needs.voidsetError(java.lang.String error)Sets the error message.
Notice that an empty string will set the style but dows not show any popup.voidsetErrorOffset(java.lang.Integer errorOffset)Sets the error offset.voidsetErrorTemporary(boolean errorTemporary)Sets the temporary error flag.voidsetFiller(char filler)Sets the filler character.
The default is space.voidsetGenericType(java.lang.reflect.Type type)Sets the generic type.voidsetHelpUrl(java.lang.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.voidsetInfo(java.lang.String info)Sets the info message.
Notice that an empty string will set the style but dows not show any popup.voidsetInvalidChars(java.lang.String invalidChars)Sets invalid characters.voidsetLenient(boolean lenient)Sets whether parsing to model should be lenient.voidsetMandatory(boolean mandatory)Sets the mandatory option.
Mandatory fields are differently visualized.voidsetMaxColumns(int maxColumns)Sets the maximum number of columns.
The number of columns will be enforced by the model.voidsetPattern(java.lang.String pattern)Sets the format pattern.
The format pattern is used to format the view of the data.voidsetScale(int scale)Changes the format according to the given scale.voidsetTableCell(FxTableCell<?,?> tableCell)Sets the table cell if the component is used as a table cell editor.voidsetTextAlignment(javafx.geometry.Pos textAlignment)Sets the text alignment.voidsetTextConverter(java.util.function.Function<java.lang.String,java.lang.String> textConverter)Sets a text converter.
Converts input text to the view's text.voidsetType(java.lang.Class<?> type)Sets the type for this component.voidsetUnsigned(boolean unsigned)Sets whether a numeric field is unsigned or signed.voidsetUTC(boolean utc)Sets whether this is a UTC timestamp.voidsetValidChars(java.lang.String validChars)Sets allowed characters.voidsetValueTranslator(ValueTranslator<?,?> valueTranslator)Sets a value translator.voidsetViewModified(boolean viewModified)Sets whether the view has been modified.voidsetViewObject(java.lang.Object viewObject)Sets the internal native object of the component.voidsetViewValue(java.lang.Object value)Sets a value in this component.
The value's type is that of the model.voidshowErrorPopup()Shows the error popup.
Requires the error message set.voidshowHelp()Displays online help if configured.voidshowInfoPopup()Shows the info popup.
Requires the info message set.java.lang.StringtoGenericString()Returns the classname plus optional fx:id.voidtriggerViewModified()Walks up the component hierarchy and updates the viewModified property.
This is done by comparing the saved view value with the current view.voidupdateModel()Updates the model according to the view.voidupdateView()Updates the view according to the model.javafx.beans.property.BooleanPropertyviewModifiedProperty()Gets the viewModified property.-
Methods inherited from class javafx.scene.web.HTMLEditor
createDefaultSkin, getHtmlText, print, setHtmlText
-
Methods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getClassCssMetaData, getContextMenu, getControlCssMetaData, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty
-
Methods 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, widthProperty
-
Methods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
-
Methods 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, visibleProperty
-
-
-
-
Method Detail
-
createDelegate
protected FxHTMLEditorDelegate createDelegate()
Creates the delegate.- Returns:
- the delegate
-
getDelegate
public FxHTMLEditorDelegate getDelegate()
Description copied from interface:FxControlGets the lazily created component delegate.- Specified by:
getDelegatein interfaceFxComponent- Specified by:
getDelegatein interfaceFxControl- Returns:
- the delegate
-
setDelegate
public void setDelegate(FxHTMLEditorDelegate delegate)
Sets the delegate.
Useful for application specific needs.- Parameters:
delegate- the delegate
-
getParentContainer
public FxContainer 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
public void setValueTranslator(ValueTranslator<?,?> valueTranslator)
Description copied from interface:FxComponentSets a value translator.- Specified by:
setValueTranslatorin interfaceFxComponent- Parameters:
valueTranslator- the translator
-
getValueTranslator
public ValueTranslator<?,?> 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
public void setViewValue(java.lang.Object value)
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
public void setType(java.lang.Class<?> type)
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 memleaks.
- Specified by:
setTypein interfaceFxComponent- Parameters:
type- the type
-
getType
public java.lang.Class<?> getType()
Description copied from interface:FxComponentGets the type this component returns viaFxComponent.getViewValue().- Specified by:
getTypein interfaceFxComponent- Returns:
- the type
-
setGenericType
public void setGenericType(java.lang.reflect.Type type)
Description copied from interface:FxComponentSets the generic type.- Specified by:
setGenericTypein interfaceFxComponent- Parameters:
type- the generic type
-
getGenericType
public java.lang.reflect.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
public void addModelToViewListener(ModelToViewListener listener)
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
public void removeModelToViewListener(ModelToViewListener listener)
Description copied from interface:FxControlRemoves a model-to-view listener.- Specified by:
removeModelToViewListenerin interfaceFxControl- Parameters:
listener- the value listener to remove
-
addViewToModelListener
public void addViewToModelListener(ViewToModelListener listener)
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
public void removeViewToModelListener(ViewToModelListener listener)
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)
Description copied from interface:FxComponentSets the mandatory option.
Mandatory fields are differently visualized. There is no further functional difference.- Specified by:
setMandatoryin interfaceFxComponent- Parameters:
mandatory- true if mandatory
-
isMandatory
public boolean isMandatory()
Description copied from interface:FxComponentGets the mandatory option.- Specified by:
isMandatoryin interfaceFxComponent- Returns:
- true if mandatory
-
mandatoryProperty
public javafx.beans.property.BooleanProperty mandatoryProperty()
Description copied from interface:FxComponentGets the mandatory property.- Specified by:
mandatoryPropertyin interfaceFxComponent- Returns:
- the property
-
setBindingPath
public void setBindingPath(java.lang.String bindingPath)
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 programatically as well.
- Specified by:
setBindingPathin interfaceFxComponent- Parameters:
bindingPath- the binding path, for ex."invoiceNumber", null if autobinding- See Also:
Binder
-
getBindingPath
public java.lang.String getBindingPath()
Description copied from interface:FxComponentGets the binding path.- Specified by:
getBindingPathin interfaceFxComponent- Returns:
- the field path, null if autobinding (default)
-
setComponentPath
public void setComponentPath(java.lang.String componentPath)
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
public java.lang.String getComponentPath()
Description copied from interface:FxComponentGets the component path.- Specified by:
getComponentPathin interfaceFxComponent- Returns:
- the component path, null if not bound
-
setBinding
public void setBinding(FxComponentBinding binding)
Description copied from interface:FxComponentSets the binding.- Specified by:
setBindingin interfaceFxComponent- Parameters:
binding- the binding, null if none.
-
getBinding
public FxComponentBinding getBinding()
Description copied from interface:FxComponentGets the binding.- Specified by:
getBindingin interfaceFxComponent- Returns:
- the binding, null if none
-
setChangeable
public void setChangeable(boolean changeable)
Description copied from interface:FxControlSet the control to be changeable.
This is a unified abstraction and will be translated to setEditable or setDisabled, whatever is appropriate to this control.- Specified by:
setChangeablein interfaceFxControl- Parameters:
changeable- true the user can edit the data, false if show only
-
isChangeable
public boolean isChangeable()
Description copied from interface:FxControlReturns if this control is changeable.- Specified by:
isChangeablein interfaceFxControl- Returns:
- true the user can edit the data, false if show only
-
changeableProperty
public javafx.beans.property.ReadOnlyBooleanProperty changeableProperty()
Description copied from interface:FxControlGets the changaeble property.- Specified by:
changeablePropertyin interfaceFxControl- Returns:
- the property
-
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
-
setContainerChangableIgnored
public void setContainerChangableIgnored(boolean containerChangeableIgnored)
Description copied from interface:FxControlSets whether to ignore setContainerChangeable.- Specified by:
setContainerChangableIgnoredin 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)
Description copied from interface:FxControlSets whether the view has been modified.- Specified by:
setViewModifiedin interfaceFxControl- Parameters:
viewModified- true if user has modified the visual representation
-
isViewModified
public boolean isViewModified()
Description copied from interface:FxControlReturns whether the user has modified the view since the lastFxControl.updateView().- Specified by:
isViewModifiedin interfaceFxControl- Returns:
- true if user changed the visual representation
-
viewModifiedProperty
public javafx.beans.property.BooleanProperty viewModifiedProperty()
Description copied from interface:FxControlGets the viewModified property.- Specified by:
viewModifiedPropertyin interfaceFxControl- Returns:
- the property
-
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
public java.lang.Object 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
public java.lang.Object getViewObject()
Description copied from interface:FxComponentRetrieves the internal native object of the component.- Specified by:
getViewObjectin interfaceFxComponent- Returns:
- the component's object
-
setViewObject
public void setViewObject(java.lang.Object viewObject)
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
public void setHelpUrl(java.lang.String helpUrl)
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
public java.lang.String 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
public java.lang.String 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
public void setError(java.lang.String error)
Description copied from interface:ErrorPopupSupportedSets the error message.
Notice that an empty string will set the style but dows not show any popup.- Specified by:
setErrorin interfaceErrorPopupSupported- Parameters:
error- the error message, null to clear
-
getError
public java.lang.String 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
public void setInfo(java.lang.String info)
Description copied from interface:InfoPopupSupportedSets the info message.
Notice that an empty string will set the style but dows not show any popup.- Specified by:
setInfoin interfaceInfoPopupSupported- Parameters:
info- the info message, null to clear
-
getInfo
public java.lang.String 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 and 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
public void setTableCell(FxTableCell<?,?> tableCell)
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
public FxTableCell<?,?> 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
-
setColumns
public void setColumns(int columns)
Description copied from interface:FxTextComponentSets the number of columns in this component.
The visible width is adjusted according to the current font.- Specified by:
setColumnsin interfaceFxTextComponent- Parameters:
columns- the number of columns ≥ 0
-
getColumns
public int getColumns()
Description copied from interface:FxTextComponentGets the columns.- Specified by:
getColumnsin interfaceFxTextComponent- Returns:
- the columns
-
setMaxColumns
public void setMaxColumns(int maxColumns)
Description copied from interface:FxTextComponentSets the maximum number of columns.
The number of columns will be enforced by the model.- Specified by:
setMaxColumnsin interfaceFxTextComponent- Parameters:
maxColumns- the maximum number of columns, 0 if unlimited (default)
-
getMaxColumns
public int getMaxColumns()
Description copied from interface:FxTextComponentGets the maximum number of columns.- Specified by:
getMaxColumnsin interfaceFxTextComponent- Returns:
- the maximum number of columns, 0 if unlimited (default)
-
setAutoSelect
public void setAutoSelect(boolean autoSelect)
Description copied from interface:FxTextComponentSets the auto-select feature.
A component with autoselect enabled will automatically select all characters if the component gets the keyboard focus. Useful for numerical fields, for example.- Specified by:
setAutoSelectin interfaceFxTextComponent- Parameters:
autoSelect- true if autoselect enabled, false if disabled (default)
-
isAutoSelect
public boolean isAutoSelect()
Description copied from interface:FxTextComponentReturns whether the auto-select feature is enabled.- Specified by:
isAutoSelectin interfaceFxTextComponent- Returns:
- true if autoselect enabled, false if disabled (default)
-
setPattern
public void setPattern(java.lang.String pattern)
Description copied from interface:FxTextComponentSets the format pattern.
The format pattern is used to format the view of the data.- Specified by:
setPatternin interfaceFxTextComponent- Parameters:
pattern- the format pattern
-
getPattern
public java.lang.String getPattern()
Description copied from interface:FxTextComponentGets the format pattern.- Specified by:
getPatternin interfaceFxTextComponent- Returns:
- the format pattern
-
isLenient
public boolean isLenient()
Description copied from interface:FxTextComponentReturns whether parsing to model should be lenient.- Specified by:
isLenientin interfaceFxTextComponent- Returns:
- true if lenient, false is default
-
setLenient
public void setLenient(boolean lenient)
Description copied from interface:FxTextComponentSets whether parsing to model should be lenient.- Specified by:
setLenientin interfaceFxTextComponent- Parameters:
lenient- true if lenient
-
setScale
public void setScale(int scale)
Description copied from interface:FxTextComponentChanges the format according to the given scale.- Specified by:
setScalein interfaceFxTextComponent- Parameters:
scale- the number of digits after the comma
-
getScale
public int getScale()
Description copied from interface:FxTextComponentGets the current scale.- Specified by:
getScalein interfaceFxTextComponent- Returns:
- the scale
-
setUnsigned
public void setUnsigned(boolean unsigned)
Description copied from interface:FxTextComponentSets whether a numeric field is unsigned or signed.- Specified by:
setUnsignedin interfaceFxTextComponent- Parameters:
unsigned- true if unsigned
-
isUnsigned
public boolean isUnsigned()
Description copied from interface:FxTextComponentReturns whether a numeric field is unsigned or signed.- Specified by:
isUnsignedin interfaceFxTextComponent- Returns:
- true if unsigned
-
setUTC
public void setUTC(boolean utc)
Description copied from interface:FxTextComponentSets whether this is a UTC timestamp.- Specified by:
setUTCin interfaceFxTextComponent- Parameters:
utc- true if UTC
-
isUTC
public boolean isUTC()
Description copied from interface:FxTextComponentReturns whether this is a UTC timestamp.- Specified by:
isUTCin interfaceFxTextComponent- Returns:
- true if UTC
-
setCaseConversion
public void setCaseConversion(CaseConversion caseConversion)
Description copied from interface:FxTextComponentSets the case conversion.- Specified by:
setCaseConversionin interfaceFxTextComponent- Parameters:
caseConversion- the conversion, null if no conversion (default)
-
getCaseConversion
public CaseConversion getCaseConversion()
Description copied from interface:FxTextComponentGets the case conversion.- Specified by:
getCaseConversionin interfaceFxTextComponent- Returns:
- the conversion, null if no conversion (default)
-
setFiller
public void setFiller(char filler)
Description copied from interface:FxTextComponentSets the filler character.
The default is space.- Specified by:
setFillerin interfaceFxTextComponent- Parameters:
filler- the filler
-
getFiller
public char getFiller()
Description copied from interface:FxTextComponentGets the filler character.- Specified by:
getFillerin interfaceFxTextComponent- Returns:
- the filler
-
setTextAlignment
public void setTextAlignment(javafx.geometry.Pos textAlignment)
Description copied from interface:FxTextComponentSets the text alignment.- Specified by:
setTextAlignmentin interfaceFxTextComponent- Parameters:
textAlignment- the alignment, null if component's default
-
getTextAlignment
public javafx.geometry.Pos getTextAlignment()
Description copied from interface:FxTextComponentGets the text alignment.- Specified by:
getTextAlignmentin interfaceFxTextComponent- Returns:
- the alignment, null if component's default
-
setValidChars
public void setValidChars(java.lang.String validChars)
Description copied from interface:FxTextComponentSets allowed characters.- Specified by:
setValidCharsin interfaceFxTextComponent- Parameters:
validChars- the valid characters, null = all (default)
-
getValidChars
public java.lang.String getValidChars()
Description copied from interface:FxTextComponentGets allowed characters.- Specified by:
getValidCharsin interfaceFxTextComponent- Returns:
- the valid characters, null = all (default)
-
setInvalidChars
public void setInvalidChars(java.lang.String invalidChars)
Description copied from interface:FxTextComponentSets invalid characters.- Specified by:
setInvalidCharsin interfaceFxTextComponent- Parameters:
invalidChars- the invalid characters, null = none (default)
-
getInvalidChars
public java.lang.String getInvalidChars()
Description copied from interface:FxTextComponentGets invalid characters.- Specified by:
getInvalidCharsin interfaceFxTextComponent- Returns:
- the invalid characters, null = none (default)
-
setTextConverter
public void setTextConverter(java.util.function.Function<java.lang.String,java.lang.String> textConverter)
Description copied from interface:FxTextComponentSets a text converter.
Converts input text to the view's text.- Specified by:
setTextConverterin interfaceFxTextComponent- Parameters:
textConverter- the converter
-
getTextConverter
public java.util.function.Function<java.lang.String,java.lang.String> getTextConverter()
Description copied from interface:FxTextComponentGets the text converter.- Specified by:
getTextConverterin interfaceFxTextComponent- Returns:
- the converter
-
setErrorOffset
public void setErrorOffset(java.lang.Integer errorOffset)
Description copied from interface:FxTextComponentSets the error offset.- Specified by:
setErrorOffsetin interfaceFxTextComponent- Parameters:
errorOffset- null to clear
-
getErrorOffset
public java.lang.Integer getErrorOffset()
Description copied from interface:FxTextComponentGets the error offset.- Specified by:
getErrorOffsetin interfaceFxTextComponent- Returns:
- the offset, null if no offset
-
mapErrorOffsetToCaretPosition
public void mapErrorOffsetToCaretPosition()
Description copied from interface:FxTextComponentSets the caret position according to the error offset.
Does nothing if error offset is null.- Specified by:
mapErrorOffsetToCaretPositionin interfaceFxTextComponent
-
autoSelect
public void autoSelect()
Description copied from interface:FxTextComponentSelects or deselects all text in the text input.- Specified by:
autoSelectin interfaceFxTextComponent- See Also:
FxTextComponent.isAutoSelect()
-
-