java.lang.Object
org.tentackle.fx.FxControlDelegate
org.tentackle.fx.FxComponentDelegate
org.tentackle.fx.component.delegate.FxChoiceBoxDelegate
- All Implemented Interfaces:
ErrorPopupSupported,FxComponent,FxControl,InfoPopupSupported
Delegate for FxChoiceBox.
As a convenience for boolean model types the choicebox can fake the boolean with 2 items: first for TRUE and the second for FALSE. If the application already specified 2 items, they will be kept, otherwise overridden from the name of the model member.
- Author:
- harald
-
Property Summary
Properties inherited from class org.tentackle.fx.FxComponentDelegate
mandatoryProperties inherited from class org.tentackle.fx.FxControlDelegate
changeable, viewModifiedProperties inherited from interface org.tentackle.fx.FxControl
changeable, viewModified -
Field Summary
Fields inherited from class org.tentackle.fx.FxComponentDelegate
ERROR_STYLE, INFO_STYLE, MANDATORY_STYLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFxChoiceBox<?>Gets the component of this delegate.Gets the parent container.Retrieves the internal native object of the component.<V> VRetrieves the value from this component.
The value's type is that of the model.booleanReturns whether deselect is allowed.voidSets the type for this component.voidsetViewObject(Object value) 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.Methods inherited from class org.tentackle.fx.FxComponentDelegate
createChangeableProperty, getBinding, getBindingPath, getComponentPath, getDelegate, getError, getGenericType, getInfo, getLastViewObject, getNode, getSavedViewObject, getTableCell, getTreeTableCell, getType, getValueTranslator, handleInputFailure, hideErrorPopup, hideInfoPopup, invalidateSavedView, isErrorTemporary, isListenerSuppressedIfModelUnchanged, isListenerSuppressedIfViewUnchanged, isMandatory, isModelUpdated, isSavedViewObjectValid, isUpdatingModel, isUpdatingView, mandatoryProperty, saveView, setBinding, setBindingPath, setComponentPath, setContainerChangeable, setError, setErrorTemporary, setGenericType, setInfo, setLastViewObject, setListenerSuppressedIfModelUnchanged, setListenerSuppressedIfViewUnchanged, setMandatory, setTableCell, setTreeTableCell, setValueTranslator, showErrorPopup, showInfoPopup, toGenericString, toString, triggerViewModified, updateChangeable, updateErrorStyle, updateInfoStyle, updateMandatoryStyle, updateModel, updateViewMethods inherited from class org.tentackle.fx.FxControlDelegate
addModelToViewListener, addViewToModelListener, changeableProperty, fireModelToViewListeners, fireViewToModelListeners, getHelpUrl, getModelToViewListeners, getViewToModelListeners, isBindable, isChangeable, isContainerChangeableIgnored, isControlChangeable, isViewModified, removeModelToViewListener, removeViewToModelListener, setBindable, setChangeable, setContainerChangeableIgnored, setHelpUrl, setViewModified, showHelp, viewModifiedPropertyMethods 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 org.tentackle.fx.FxControl
addModelToViewListener, addViewToModelListener, changeableProperty, getHelpUrl, isBindable, isChangeable, isContainerChangeableIgnored, isViewModified, removeModelToViewListener, removeViewToModelListener, setBindable, setChangeable, setContainerChangeableIgnored, setHelpUrl, setViewModified, showHelp, viewModifiedProperty
-
Constructor Details
-
FxChoiceBoxDelegate
Creates the delegate.- Parameters:
component- the component
-
-
Method Details
-
getComponent
Description copied from class:FxComponentDelegateGets the component of this delegate.- Specified by:
getComponentin classFxComponentDelegate- Returns:
- the component
-
getParentContainer
Description copied from interface:FxControlGets the parent container.- Specified by:
getParentContainerin interfaceFxControl- Overrides:
getParentContainerin classFxComponentDelegate- Returns:
- the parent, null if not a component of a container
-
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- Overrides:
setTypein classFxComponentDelegate- Parameters:
type- the type
-
setViewObject
Description copied from interface:FxComponentSets the internal native object of the component.- Parameters:
value- the internal object
-
getViewObject
Description copied from interface:FxComponentRetrieves the internal native object of the component.- Returns:
- the component's object
-
setViewValue
Description copied from interface:FxComponentSets a value in this component.
The value's type is that of the model.- Specified by:
setViewValuein interfaceFxComponent- Overrides:
setViewValuein classFxComponentDelegate- Parameters:
value- is the value to set
-
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- Overrides:
getViewValuein classFxComponentDelegate- Type Parameters:
V- the value's type- Returns:
- the value shown by the component
-
isDeselectAllowed
public boolean isDeselectAllowed()Returns whether deselect is allowed.- Returns:
- true if allowed
-