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
EventListener
s 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 TypeMethodDescriptionvoid
accept
(Flow.Subscription subscription) void
addComponent
(Component component) This method is used to add a component to the list of components that are used in bindings.void
addDisposable
(Disposable disposable) void
void
addListener
(EventListener listener) void
dispose()
static void
dispose
(ClientPropertyAware source) static void
disposeAndClean
(JComponent component) static BinderContext
static BinderContext
getIfAbsentCreateThenAddComponent
(JComponent component) void
removeComponent
(Component component) void
void
removeListener
(TableModelListener listener) void
void
static void
unsubscribe
(JComponent component, String key)
-
Field Details
-
BINDER_KEY
- See Also:
-
-
Constructor Details
-
BinderContext
public BinderContext()
-
-
Method Details
-
unsubscribe
public void unsubscribe() -
accept
- Specified by:
accept
in 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:
dispose
in interfaceDisposable
-
getIfAbsentCreateThenAddComponent
-
getIfAbsentCreateThenAddComponent
-
unsubscribe
-
dispose
-
disposeAndClean
- Parameters:
component
- The component which is to be disposed and cleaned.
-