Adds a link between the content of the text component and the given
Enablable
.
Everytime the contents of the text component changes, the following code will be executed:
boolean enabled = c.isEnabled(text); e.setEnabled(enabled);
where
text
is an
ITextContent
instance representing the current text in the text component.
Note: This code is executed on the event-dispatching thread, so the computation of the condition must be very fast.
The enabled state of the Enablable
is automatically updated to reflect the current state of the text component.
If a link is added to an Enablable
that has already been added to this enabler, the previous link is removed.