-
- 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 FxControlParent interface of all FxComponents and FxContainers.- Author:
- harald
-
-
Method Summary
All Methods Instance Methods Abstract 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.javafx.beans.property.ReadOnlyBooleanPropertychangeableProperty()Gets the changaeble property.FxControlDelegategetDelegate()Gets the lazily created component delegate.java.lang.StringgetHelpUrl()Gets the online-help URL.FxContainergetParentContainer()Gets the parent container.voidinvalidateSavedView()Invalidates the saved view.booleanisBindable()Determines whether this container is bindable.booleanisChangeable()Returns if this control is changeable.booleanisContainerChangeableIgnored()Returns whether setContainerChangeable is ignored by this control.booleanisViewModified()Returns 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.voidsetContainerChangableIgnored(boolean containerChangeableIgnored)Sets whether to ignore setContainerChangeable.voidsetContainerChangeable(boolean containerChangeable)Invoked when setChangeable() is invoked on the container of this component.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.voidsetViewModified(boolean viewModified)Sets whether the view has been modified.voidshowHelp()Displays online help if configured.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.
-
-
-
Method Detail
-
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 changaeble property.- Returns:
- the property
-
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
-
setContainerChangableIgnored
void setContainerChangableIgnored(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.- Returns:
- the property
-
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
void setHelpUrl(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.- Parameters:
helpUrl- the help url
-
getHelpUrl
java.lang.String getHelpUrl()
Gets the online-help URL.- Returns:
- the help url, default is null
-
showHelp
void showHelp()
Displays online help if configured.
-
toGenericString
java.lang.String toGenericString()
Returns the classname plus optional fx:id.- Returns:
- the generic string for diagnostics and logging
-
addModelToViewListener
void addModelToViewListener(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.- Parameters:
listener- the value listener to add
-
removeModelToViewListener
void removeModelToViewListener(ModelToViewListener listener)
Removes a model-to-view listener.- Parameters:
listener- the value listener to remove
-
addViewToModelListener
void addViewToModelListener(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.- Parameters:
listener- the value listener to add
-
removeViewToModelListener
void removeViewToModelListener(ViewToModelListener listener)
Removes a view-to-model listener.- Parameters:
listener- the value listener to remove
-
-