- All Known Subinterfaces:
FxComponent,FxContainer,FxTextComponent
- All Known Implementing Classes:
AbstractTextFieldDelegate,FxAccordion,FxAccordionDelegate,FxAnchorPane,FxAnchorPaneDelegate,FxBorderPane,FxBorderPaneDelegate,FxButtonBar,FxButtonBarDelegate,FxCheckBox,FxCheckBoxDelegate,FxChoiceBox,FxChoiceBoxDelegate,FxColorPicker,FxColorPickerDelegate,FxComboBox,FxComboBoxDelegate,FxComponentDelegate,FxContainerDelegate,FxControlDelegate,FxDatePicker,FxDatePickerDelegate,FxDialogPane,FxDialogPaneDelegate,FxFlowPane,FxFlowPaneDelegate,FxGridPane,FxGridPaneDelegate,FxHBox,FxHBoxDelegate,FxHTMLEditor,FxHTMLEditorDelegate,FxListView,FxListViewDelegate,FxPane,FxPaneDelegate,FxPasswordField,FxPasswordFieldDelegate,FxRadioButton,FxRadioButtonDelegate,FxScrollPane,FxScrollPaneDelegate,FxSplitPane,FxSplitPaneDelegate,FxStackPane,FxStackPaneDelegate,FxTab,FxTabDelegate,FxTableView,FxTableViewDelegate,FxTabPane,FxTabPaneDelegate,FxTextArea,FxTextAreaDelegate,FxTextComponentDelegate,FxTextField,FxTextFieldDelegate,FxTextFlow,FxTextFlowDelegate,FxTilePane,FxTilePaneDelegate,FxTitledPane,FxTitledPaneDelegate,FxToggleButton,FxToggleButtonDelegate,FxToolBar,FxToolBarDelegate,FxTreeTableView,FxTreeTableViewDelegate,FxTreeView,FxTreeViewDelegate,FxVBox,FxVBoxDelegate,TotalsTableView
public interface FxControl
Parent interface of all FxComponents and FxContainers.
- Author:
- harald
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ReadOnlyBooleanPropertyGets the changeable property.javafx.beans.property.BooleanPropertyGets the viewModified property. -
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.Gets the lazily created component delegate.Gets the online-help URL.Gets the parent container.voidInvalidates the saved view.booleanDetermines whether this container is bindable.booleanReturns if this control is changeable.booleanReturns whether setContainerChangeable is ignored by this control.booleanReturns whether the user has modified the view since the lastupdateView().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.voidsetBindable(boolean bindable) Sets whether this control is bindable, i.e.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.voidsetContainerChangeable(boolean containerChangeable) Invoked when setChangeable() is invoked on the container of this component.voidsetContainerChangeableIgnored(boolean containerChangeableIgnored) Sets whether to ignore setContainerChangeable.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.voidsetViewModified(boolean viewModified) Sets whether the view has been modified.voidshowHelp()Displays online help if configured.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.
-
Property Details
-
changeable
javafx.beans.property.ReadOnlyBooleanProperty changeablePropertyGets the changeable property.- See Also:
-
viewModified
javafx.beans.property.BooleanProperty viewModifiedPropertyGets the viewModified property.- See Also:
-
-
Method Details
-
getDelegate
FxControlDelegate getDelegate()Gets the lazily created component delegate.- Returns:
- the delegate
-
getParentContainer
FxContainer getParentContainer()Gets the parent container.- Returns:
- the parent, null if not a component of a container
-
setChangeable
void setChangeable(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.- Parameters:
changeable- true the user can edit the data, false if show only
-
isChangeable
boolean isChangeable()Returns if this control is changeable.- Returns:
- true the user can edit the data, false if show only
-
changeableProperty
javafx.beans.property.ReadOnlyBooleanProperty changeableProperty()Gets the changeable property.- See Also:
-
setContainerChangeable
void setContainerChangeable(boolean containerChangeable) Invoked when setChangeable() is invoked on the container of this component.- Parameters:
containerChangeable- true if container is changeable, false if all components readonly
-
setContainerChangeableIgnored
void setContainerChangeableIgnored(boolean containerChangeableIgnored) Sets whether to ignore setContainerChangeable.- Parameters:
containerChangeableIgnored- true if ignore, default is false
-
isContainerChangeableIgnored
boolean isContainerChangeableIgnored()Returns whether setContainerChangeable is ignored by this control.- Returns:
- true if ignore
-
updateView
void updateView()Updates the view according to the model. -
updateModel
void updateModel()Updates the model according to the view. -
saveView
void saveView()Creates a copy of the value shown to the user. -
invalidateSavedView
void invalidateSavedView()Invalidates the saved view. -
triggerViewModified
void triggerViewModified()Walks up the component hierarchy and updates the viewModified property.
This is done by comparing the saved view value with the current view. -
setViewModified
void setViewModified(boolean viewModified) Sets whether the view has been modified.- Parameters:
viewModified- true if user has modified the visual representation
-
isViewModified
boolean isViewModified()Returns whether the user has modified the view since the lastupdateView().- Returns:
- true if user changed the visual representation
-
viewModifiedProperty
javafx.beans.property.BooleanProperty viewModifiedProperty()Gets the viewModified property.- See Also:
-
setBindable
void setBindable(boolean bindable) Sets whether this control is bindable, i.e. should be checked within a binding hierarchy.- Parameters:
bindable- true if bindable, else not eligible for the binding process
-
isBindable
boolean isBindable()Determines whether this container is bindable.- Returns:
- true if bindable, else not eligible for the binding process
-
setHelpUrl
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.- Parameters:
helpUrl- the help url
-
getHelpUrl
String getHelpUrl()Gets the online-help URL.- Returns:
- the help url, default is null
-
showHelp
void showHelp()Displays online help if configured. -
toGenericString
String toGenericString()Returns the classname plus optional fx:id.- Returns:
- the generic string for diagnostics and logging
-
addModelToViewListener
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.- Parameters:
listener- the value listener to add
-
removeModelToViewListener
Removes a model-to-view listener.- Parameters:
listener- the value listener to remove
-
addViewToModelListener
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.- Parameters:
listener- the value listener to add
-
removeViewToModelListener
Removes a view-to-model listener.- Parameters:
listener- the value listener to remove
-