@Override public void setupErrorOutdatingUserActivityWatcher(final CommittablePanel panel, final DomElement... elements) { final UserActivityWatcher userActivityWatcher = createEditorAwareUserActivityWatcher(); userActivityWatcher.addUserActivityListener(new UserActivityListener() { private boolean isProcessingChange; @Override public void stateChanged() { if (isProcessingChange) return; isProcessingChange = true; try { for (final DomElement element : elements) { DomElementAnnotationsManagerImpl.outdateProblemHolder(element); } CommittableUtil.updateHighlighting(panel); } finally { isProcessingChange = false; } } }, panel); userActivityWatcher.register(panel.getComponent()); }
public void setupErrorOutdatingUserActivityWatcher(final CommittablePanel panel, final DomElement... elements) { final UserActivityWatcher userActivityWatcher = createEditorAwareUserActivityWatcher(); userActivityWatcher.addUserActivityListener(new UserActivityListener() { private boolean isProcessingChange; public void stateChanged() { if (isProcessingChange) return; isProcessingChange = true; try { for (final DomElement element : elements) { DomElementAnnotationsManagerImpl.outdateProblemHolder(element); } CommittableUtil.updateHighlighting(panel); } finally { isProcessingChange = false; } } }, panel); userActivityWatcher.register(panel.getComponent()); }
protected void installWatcher(JComponent c) { myWatcher = new UserActivityWatcher(); myWatcher.register(c); UserActivityListener userActivityListener = new UserActivityListener() { @Override public void stateChanged() { fireEditorStateChanged(); } }; myWatcher.addUserActivityListener(userActivityListener, this); }
@Override public void registerValidator(final FacetEditorValidator validator, JComponent... componentsToWatch) { myValidators.add(validator); final UserActivityWatcher watcher = new UserActivityWatcher(); for (JComponent component : componentsToWatch) { watcher.register(component); } watcher.addUserActivityListener(new UserActivityListener() { @Override public void stateChanged() { validate(); } }); }
protected void installWatcher(JComponent c) { myWatcher = new UserActivityWatcher(); myWatcher.register(c); myWatcher.addUserActivityListener(this::fireEditorStateChanged, this); }
public abstract UserActivityWatcher createEditorAwareUserActivityWatcher();