Interface AbstractDataBinding<V>
- Type Parameters:
V- Type of the value being bound
- All Known Subinterfaces:
AbstractSelectObjectDataBinding<V>,ContainerDataBinding<T,,V> EmfDataBinding<T,V>
- All Known Implementing Classes:
AbstractAutoCompleteTextDataBinding,AbstractBooleanDataBinding,AbstractComboboxDataBinding,AbstractTextDataBinding,AutoCompleteTextDataBinding,BooleanDataBinding,ComboboxDataBinding,ContainerAutoCompleteTextDataBinding,ContainerBooleanDataBinding,ContainerComboboxDataBinding,ContainerTextDataBinding,EmfAutoCompleteTextDataBinding,EmfBooleanDataBinding,EmfComboboxDataBinding,EmfTextDataBinding,TextDataBinding
public interface AbstractDataBinding<V>
Interface for defining data binding behavior between UI controls and model values.
Provides methods for getting/setting values, executing binding actions, and managing control state.
Key features:
- Two-way data binding between UI and model
- Control enable/disable management
- Built-in error decoration support
- Action handling for value changes
- Author:
- Ionov Ivan
-
Method Summary
Modifier and TypeMethodDescriptionvoidCreates and initializes the data binding.default org.eclipse.jface.fieldassist.ControlDecorationcreateControlDecoration(org.eclipse.swt.widgets.Control control, String message) Creates a standard error decoration for a control.voidPerforms an action when the value changes.voidenable(boolean enable) Enables or disables the bound control.voidExecutes the binding to pull data from UI control to model.voidExecutes the binding to push data from model to UI control (target).getValue()Gets the current value from the binding.voidsetControl(Object control) Sets the UI control for this binding.
-
Method Details
-
getValue
V getValue()Gets the current value from the binding.- Returns:
- The current value of type V
-
doAction
Performs an action when the value changes.- Parameters:
newValue- The new value being set
-
executeToTarget
void executeToTarget()Executes the binding to push data from model to UI control (target). -
executeToModel
void executeToModel()Executes the binding to pull data from UI control to model. -
createBinding
void createBinding()Creates and initializes the data binding. -
setControl
Sets the UI control for this binding.- Parameters:
control- The control to bind to
-
enable
void enable(boolean enable) Enables or disables the bound control.- Parameters:
enable- true to enable, false to disable
-
createControlDecoration
default org.eclipse.jface.fieldassist.ControlDecoration createControlDecoration(org.eclipse.swt.widgets.Control control, String message) Creates a standard error decoration for a control.- Parameters:
control- The control to decoratemessage- The error message to display- Returns:
- Configured ControlDecoration (hidden by default)
-