Class BinderContext
java.lang.Object
com.inductiveautomation.ignition.designer.mvvm.binders.swing.BinderContext
- All Implemented Interfaces:
Disposable,Consumer<Flow.Subscription>
Contains references to subscriptions and
EventListeners for usage in conjunction with the mvvm binder
classes. For a given component, all the subscriptions and bindings associated with a particular binding is stored
here, so that subscriptions and listeners can be added and removed when needed.
As an example for clarification: TextComponentBinders which binds JTextField, when bound
to JTextComponent.setText(String) may store subscriptions to the
PropertyPublisher (String) in this class,
and the associated DocumentListener also.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(Flow.Subscription subscription) voidaddComponent(Component component) This method is used to add a component to the list of components that are used in bindings.voidaddDisposable(Disposable disposable) voidvoidaddListener(EventListener listener) voiddispose()static voiddispose(ClientPropertyAware source) static voiddisposeAndClean(JComponent component) static BinderContextstatic BinderContextgetIfAbsentCreateThenAddComponent(JComponent component) voidremoveComponent(Component component) voidvoidremoveListener(TableModelListener listener) voidvoidstatic voidunsubscribe(JComponent component, String key)
-
Field Details
-
BINDER_KEY
- See Also:
-
-
Constructor Details
-
BinderContext
public BinderContext()
-
-
Method Details
-
unsubscribe
public void unsubscribe() -
accept
- Specified by:
acceptin interfaceConsumer<Flow.Subscription>
-
addListener
-
removeListener
-
getListeners
-
addComponent
This method is used to add a component to the list of components that are used in bindings. -
removeComponent
-
unregisterListeners
public void unregisterListeners() -
addDisposable
-
addHandler
-
removeHandler
-
dispose
public void dispose()- Specified by:
disposein interfaceDisposable
-
getIfAbsentCreateThenAddComponent
-
getIfAbsentCreateThenAddComponent
-
unsubscribe
-
dispose
-
disposeAndClean
- Parameters:
component- The component which is to be disposed and cleaned.
-